aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-06-07ANDROID: proc: fix depreciated call to get_user_pages in task_mmulinaro-android-4.6Michael Scott
"mm: add a field to store names for private anonymous memory" (AOSP commit ee8c5f78f09a) uses a depreciated call to get_user_pages which generates the following compile warning: fs/proc/task_mmu.c: In function 'seq_print_vma_name': fs/proc/task_mmu.c:154:3: warning: 'get_user_pages8' is deprecated (declared at include/linux/mm.h:1295) [-Wdeprecated-declarations] pages_pinned = get_user_pages(current, mm, page_start_vaddr, ^ include/linux/mm.h explains get_user_pages function call using struct task_struct *tsk and struct mm_struct *mm (not using current task and current->mm) should now be: get_user_pages_remote Signed-off-by: Michael Scott <michael.scott@linaro.org> Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
2016-06-07ANDROID: usb: gadget: fix MTP OS desc supportAmit Pundir
Upstream commit 1ae1602de028 "configfs: switch ->default groups to a linked list" replaced the current config groups with a linked list. Hence we no longer need to kfree the groups. Also the initialization for default_groups now happens in the function config_group_init() which is called by config_group_init_type_name(). If we call usb_os_desc_prepare_interf_dir() prior to this initialization the kernel crashes when we create MTP function i.e when it reaches configfs_add_default_group(&d->group, os_desc_group) which is accessing uninitialized data. Fix this crash by moving usb_os_desc_prepare_interf_dir() to after the call to config_group_init_type_name(). Fixes change id --> I9397072ca3d183efbc9571c6cde3790f10d8851e "ANDROID: usb: gadget: Add support for MTP OS desc". [MichaelS: Updated commit log for kernel crash] Signed-off-by: Michael Scott <michael.scott@linaro.org> Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
2016-06-07ANDROID: staging: sync: remove struct sync_ptAmit Pundir
struct sync_pt is merged into struct fence in upstream commit b55b54b5db33 "staging/android: remove struct sync_pt". Use struct fence directly. Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
2016-06-07ANDROID: restrict access to perf eventsJeff Vander Stoep
Add: CONFIG_SECURITY_PERF_EVENTS_RESTRICT=y to android-base.cfg The kernel.perf_event_paranoid sysctl is set to 3 by default. No unprivileged use of the perf_event_open syscall will be permitted unless it is changed. Bug: 29054680 Change-Id: Ie7512259150e146d8e382dc64d40e8faaa438917
2016-06-07FROMLIST: security,perf: Allow further restriction of perf_event_openJeff Vander Stoep
When kernel.perf_event_open is set to 3 (or greater), disallow all access to performance events by users without CAP_SYS_ADMIN. Add a Kconfig symbol CONFIG_SECURITY_PERF_EVENTS_RESTRICT that makes this value the default. This is based on a similar feature in grsecurity (CONFIG_GRKERNSEC_PERF_HARDEN). This version doesn't include making the variable read-only. It also allows enabling further restriction at run-time regardless of whether the default is changed. https://lkml.org/lkml/2016/1/11/587 Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Bug: 29054680 Change-Id: Iff5bff4fc1042e85866df9faa01bce8d04335ab8
2016-06-07ARM64: Ignore Image-dtb from git point of viewDmitry Shmidt
Change-Id: I5bbf1db90f28ea956383b4a5d91ad508eea656dc Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2016-06-07arm64: add option to build Image-dtbHaojian Zhuang
Some bootloaders couldn't decompress Image.gz-dtb. Change-Id: I698cd0c4ee6894e8d0655d88f3ecf4826c28a645 Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2016-06-07ANDROID: usb: gadget: f_midi: set fi->f to NULL when free f_midi functionWinter Wang
fi->f is set in f_midi's alloc_func, need to clean this to NULL in free_func, otherwise on ConfigFS's function switch, midi->usb_function it self is freed, fi->f will be a wild pointer and run into below kernel panic: --------------- [ 58.950628] Unable to handle kernel paging request at virtual address 63697664 [ 58.957869] pgd = c0004000 [ 58.960583] [63697664] *pgd=00000000 [ 58.964185] Internal error: Oops: 80000005 [#1] PREEMPT SMP ARM [ 58.970111] Modules linked in: [ 58.973191] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.1.15-03504-g34c857c-dirty #89 [ 58.981024] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) [ 58.987557] task: c110bd70 ti: c1100000 task.ti: c1100000 [ 58.992962] PC is at 0x63697664 [ 58.996120] LR is at android_setup+0x78/0x138 <..snip..> [ 60.044980] 1fc0: ffffffff ffffffff c1000684 00000000 00000000 c108ecd0 c11f7294 c11039c0 [ 60.053181] 1fe0: c108eccc c110d148 1000406a 412fc09a 00000000 1000807c 00000000 00000000 [ 60.061420] [<c073b1fc>] (android_setup) from [<c0730490>] (udc_irq+0x758/0x1034) [ 60.068951] [<c0730490>] (udc_irq) from [<c017c650>] (handle_irq_event_percpu+0x50/0x254) [ 60.077165] [<c017c650>] (handle_irq_event_percpu) from [<c017c890>] (handle_irq_event+0x3c/0x5c) [ 60.086072] [<c017c890>] (handle_irq_event) from [<c017f3ec>] (handle_fasteoi_irq+0xe0/0x198) [ 60.094630] [<c017f3ec>] (handle_fasteoi_irq) from [<c017bcfc>] (generic_handle_irq+0x2c/0x3c) [ 60.103271] [<c017bcfc>] (generic_handle_irq) from [<c017bfb8>] (__handle_domain_irq+0x7c/0xec) [ 60.112000] [<c017bfb8>] (__handle_domain_irq) from [<c0101450>] (gic_handle_irq+0x24/0x5c) -------------- Signed-off-by: Winter Wang <wente.wang@nxp.com>
2016-06-07cpufreq: interactive: drop cpufreq_{get,put}_global_kobject func callsAmit Pundir
Upstream commit 8eec1020f0c0 (cpufreq: create cpu/cpufreq at boot time) make sure that cpufreq sysfs entry get created at boot time, and there is no need to create/destroy it on need basis anymore. So drop deprecated cpufreq_{get,put}_global_kobject function calls which otherwise result in following compilation errors: drivers/cpufreq/cpufreq_interactive.c: In function 'cpufreq_governor_interactive': drivers/cpufreq/cpufreq_interactive.c:1187:4: error: implicit declaration of function 'cpufreq_get_global_kobject' [-Werror=implicit-function-declaration] WARN_ON(cpufreq_get_global_kobject()); ^ drivers/cpufreq/cpufreq_interactive.c:1197:5: error: implicit declaration of function 'cpufreq_put_global_kobject'[-Werror=implicit-function-declaration] cpufreq_put_global_kobject(); ^ Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
2016-06-07xt_qtaguid: Fix panic caused by processing non-full socket.John Stultz
In an issue very similar to 4e461c777e3 (xt_qtaguid: Fix panic caused by synack processing), we were seeing panics on occasion in testing. In this case, it was the same issue, but caused by a different call path, as the sk being returned from qtaguid_find_sk() was not a full socket. Resulting in the sk->sk_socket deref to fail. This patch adds an extra check to ensure the sk being retuned is a full socket, and if not it returns NULL. Reported-by: Milosz Wasilewski <milosz.wasilewski@linaro.org> Signed-off-by: John Stultz <john.stultz@linaro.org>
2016-06-07fiq_debugger: Add fiq_debugger.disable optionDmitry Shmidt
This change allows to use same kernel image with different console options for uart and fiq_debugger. If fiq_debugger.disable will be set to 1/y/Y, fiq_debugger will not be initialized. Change-Id: I71fda54f5f863d13b1437b1f909e52dd375d002d Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2016-06-07UPSTREAM: procfs: fixes pthread cross-thread naming if !PR_DUMPABLEJanis Danisevskis
The PR_DUMPABLE flag causes the pid related paths of the proc file system to be owned by ROOT. The implementation of pthread_set/getname_np however needs access to /proc/<pid>/task/<tid>/comm. If PR_DUMPABLE is false this implementation is locked out. This patch installs a special permission function for the file "comm" that grants read and write access to all threads of the same group regardless of the ownership of the inode. For all other threads the function falls back to the generic inode permission check. Signed-off-by: Janis Danisevskis <jdanis@google.com>
2016-06-07FROMLIST: wlcore: Disable filtering in AP roleJimmy Perchet
When you configure (set it up) a STA interface, the driver install a multicast filter. This is normal behavior, when one application subscribe to multicast address the filter is updated. When Access Point interface is configured, there is no filter installation and the "filter update" path is disabled in the driver. The problem happens when you switch an interface from STA type to AP type. The filter is installed but there are no means to update it. Change-Id: Ied22323af831575303abd548574918baa9852dd0 Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2016-06-07fiq_debugger: Add option to apply uart overlay by FIQ_DEBUGGER_UART_OVERLAYDmitry Shmidt
fiq_debugger is taking over uart, so it is necessary to disable original uart in DT file. It can be done manually or by overlay. Change-Id: I9f50ec15b0e22e602d73b9f745fc8666f8925d09 Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2016-06-07usb: dual-role: make stub functions inlineJack Pham
If CONFIG_DUAL_ROLE_USB_INTF is disabled but the exported functions are referenced, the build will result in warnings such as: In file included from include/linux/usb/class-dual-role.h:112:13: warning: ‘dual_role_instance_changed’ defined but not used [-Wunused-function] These stub functions should be static inline. Change-Id: I5a9ef58dca32306fac5a4c7f28cdaa36fa8ae078 Signed-off-by: Jack Pham <jackp@codeaurora.org> (cherry picked from commit 2d152dbb0743526b21d6bbefe097f874c027f860) (cherry picked from commit 8ad66cafaa10e6ba94ff79a8dbc2cc437c6bfe93)
2016-06-07quick selinux support for tracefsYongqin Liu
Here is just the quick fix for tracefs with selinux. just add tracefs to the list of whitelisted filesystem types in selinux_is_sblabel_mnt(), but the right fix would be to generalize this logic as described in the last item on the todo list, https://bitbucket.org/seandroid/wiki/wiki/ToDo Change-Id: I2aa803ccffbcd2802a7287514da7648e6b364157 Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
2016-06-07xt_qtaguid: Fix panic caused by synack processingJohn Stultz
In upstream commit ca6fb06518836ef9b65dc0aac02ff97704d52a05 (tcp: attach SYNACK messages to request sockets instead of listener) http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=ca6fb0651883 The building of synack messages was changed, which made it so the skb->sk points to a casted request_sock. This is problematic, as there is no sk_socket in a request_sock. So when the qtaguid_mt function tries to access the sk->sk_socket, it accesses uninitialized memory. After looking at how other netfilter implementations handle this, I realized there was a skb_to_full_sk() helper added, which the xt_qtaguid code isn't yet using. This patch adds its use, and resovles panics seen when accessing uninitialzed memory when processing synack packets. Reported-by: YongQin Liu <yongquin.liu@linaro.org> Signed-off-by: John Stultz <john.stultz@linaro.org>
2016-06-07fuse: Add support for d_canonical_pathDaniel Rosenberg
Allows FUSE to report to inotify that it is acting as a layered filesystem. The userspace component returns a string representing the location of the underlying file. If the string cannot be resolved into a path, the top level path is returned instead. bug: 23904372 Change-Id: Iabdca0bbedfbff59e9c820c58636a68ef9683d9f Signed-off-by: Daniel Rosenberg <drosen@google.com>
2016-06-07vfs: change d_canonical_path to take two pathsDaniel Rosenberg
bug: 23904372 Change-Id: I4a686d64b6de37decf60019be1718e1d820193e6 Signed-off-by: Daniel Rosenberg <drosen@google.com>
2016-06-07netfilter: xt_qtaguid: seq_printf fixesAmit Pundir
Update seq_printf() usage in xt_qtaguid to align with changes from mainline commit 6798a8caaf64 "fs/seq_file: convert int seq_vprint/seq_printf/etc... returns to void". Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
2016-06-07ANDROID: base-cfg: enable CONFIG_IP_NF_NATAmit Pundir
IP_NF_TARGET_{MASQUERADE,NETMAP,REDIRECT} configs, already enabled in android-base.cfg for tethering, are of no use if CONFIG_IP_NF_NAT is not enabled. Don't rely on platform config for that and enable CONFIG_IP_NF_NAT in android-base.cfg as well. Change-Id: Ic72bcebbd925b142b09539466bf963188c83108a Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
2016-06-07android: base-cfg: enable CONFIG_QUOTARom Lemarchand
Bug: 28032718 Change-Id: I7cb6b641f72085e69b90dca11d2ea68adcd02390 (cherry picked from commit e1b53a388e9cfcf870520a6899a37456cf1ae2c6)
2016-06-07ANDROID: mmc: Add CONFIG_MMC_SIMULATE_MAX_SPEEDMark Salyzyn
When CONFIG_MMC_SIMULATE_MAX_SPEED is enabled, Expose max_read_speed, max_write_speed and cache_size default module parameters and sysfs controls to simulate a slow eMMC device. Default values are 0 (off), 0 (off) and 4 MB respectively. Signed-off-by: Mark Salyzyn <salyzyn@google.com> Bug: 26976972 Change-Id: I342bfbd8b85f9b790e3f0e1e4e51a900ae07e05d
2016-06-07android: base-cfg: Add CONFIG_INET_DIAG_DESTROYDmitry Shmidt
Change-Id: I67430b05eca8fd520d2795d3db60faf2ec0fab9e Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2016-06-07cpufreq: interactive: only apply interactive boost when enabledDaniel Kurtz
Only apply the interactive boost when the interactive governor is enabled. This seems like the right thing to do. This was originally reviewed on https://chromium-review.googlesource.com/273501 Change-Id: I5f4a7320683eada099f9a4253e3d6b0f03057fe8 Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Reviewed-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: Dmitry Torokhov <dtor@google.com>
2016-06-07cpufreq: interactive: fix policy lockingDmitry Torokhov
cpufreq_interactive_speedchange_task() is running as a separate kernel thread and is calling __cpufreq_driver_target(), which requires callers to hold policy->rwsem for writing to prevent racing with other parts of the kernel trying to adjust the frequency, for example kernel thermal throttling. Let's change the code to take policy->rwsem and while at it refactor the code a bit. This was originally 2 changes reviewed at: https://chromium-review.googlesource.com/246273 https://chromium-review.googlesource.com/256120 Change-Id: Icc2d97c6c1b929acd2ee32e8c81d81fd2af778ab Signed-off-by: Dmitry Torokhov <dtor@chromium.org> Reviewed-by: Dylan Reid <dgreid@chromium.org> Reviewed-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: Dmitry Torokhov <dtor@google.com>
2016-06-07ANDROID: dm verity fec: add sysfs attribute fec/correctedSami Tolvanen
Add a sysfs entry that allows user space to determine whether dm-verity has come across correctable errors on the underlying block device. Bug: 22655252 Bug: 27928374 Change-Id: I80547a2aa944af2fb9ffde002650482877ade31b Signed-off-by: Sami Tolvanen <samitolvanen@google.com> (cherry picked from commit 7911fad5f0a2cf5afc2215657219a21e6630e001)
2016-06-07ANDROID: android: base-cfg: enable CONFIG_DM_VERITY_FECSami Tolvanen
Bug: 21893453 Change-Id: Idd0dfe4e3e527df2eff2f0d734effc40dce294c7 Signed-off-by: Sami Tolvanen <samitolvanen@google.com> (cherry picked from commit 9408350ed80005174918ce5147490035b2cf451b)
2016-06-07mm: Export do_munmapGuenter Roeck
The 0-day build bot reports the following build error, seen if SDCARD_FS is built as module. ERROR: "do_munmap" undefined! Fixes: 84a1b7d3d312 ("Included sdcardfs source code for kernel 3.0") Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Guenter Roeck <groeck@chromium.org>
2016-06-07sdcardfs: remove unneeded __init and __exitDaniel Rosenberg
Change-Id: I2a2d45d52f891332174c3000e8681c5167c1564f
2016-06-07sdcardfs: Remove unused codeDaniel Rosenberg
Change-Id: Ie97cba27ce44818ac56cfe40954f164ad44eccf6
2016-06-07fs: Export d_absolute_pathGuenter Roeck
The 0-day build bot reports the following build error, seen if SDCARD_FS is built as module. ERROR: "d_absolute_path" undefined! Fixes: 84a1b7d3d312 ("Included sdcardfs source code for kernel 3.0") Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Guenter Roeck <groeck@chromium.org>
2016-06-07sdcardfs: remove effectless config optionDaniel Rosenberg
CONFIG_SDCARD_FS_CI_SEARCH only guards a define for LOOKUP_CASE_INSENSITIVE, which is never used in the kernel. Remove both, along with the option matching that supports it. Change-Id: I363a8f31de8ee7a7a934d75300cc9ba8176e2edf Signed-off-by: Daniel Rosenberg <drosen@google.com>
2016-06-07inotify: Fix erroneous update of bit countDaniel Rosenberg
Patch "vfs: add d_canonical_path for stacked filesystem support" erroneously updated the ALL_INOTIFY_BITS count. This changes it back Change-Id: Idb04edc736da276159d30f04c40cff9d6b1e070f
2016-06-07fs: sdcardfs: Declare LOOKUP_CASE_INSENSITIVE unconditionallyGuenter Roeck
Attempts to build sdcardfs as module fail with fs/sdcardfs/lookup.c: In function '__sdcardfs_lookup': fs/sdcardfs/lookup.c:243:5: error: 'LOOKUP_CASE_INSENSITIVE' undeclared This occurs because the define is enclosed with #ifdef CONFIG_SDCARD_FS_CI_SEARCH. If SDCARD_FS_CI_SEARCH is configured to be built as module, this does not work. Alternatives would be to use #if IS_ENABLED(CONFIG_SDCARD_FS_CI_SEARCH), or to declare SDCARD_FS_CI_SEARCH as bool, but that does not work because the define is used unconditionally in the source. Note that LOOKUP_CASE_INSENSITIVE is only set but not evaluated in the current source code, so setting the flag has no real effect. Fixes: 84a1b7d3d312 ("Included sdcardfs source code for kernel 3.0") Cc: Daniel Rosenberg <drosen@google.com> Signed-off-by: Guenter Roeck <groeck@chromium.org>
2016-06-07trace: cpufreq: fix typo in min/max cpufreqThierry Strudel
Change-Id: Ieed402d3a912b7a318826e101efe2c24b07ebfe4 Signed-off-by: Thierry Strudel <tstrudel@google.com>
2016-06-07sdcardfs: Add support for d_canonical_pathDaniel Rosenberg
Change-Id: I5d6f0e71b8ca99aec4b0894412f1dfd1cfe12add Signed-off-by: Daniel Rosenberg <drosen@google.com>
2016-06-07vfs: add d_canonical_path for stacked filesystem supportDaniel Rosenberg
Inotify does not currently know when a filesystem is acting as a wrapper around another fs. This means that inotify watchers will miss any modifications to the base file, as well as any made in a separate stacked fs that points to the same file. d_canonical_path solves this problem by allowing the fs to map a dentry to a path in the lower fs. Inotify can use it to find the appropriate place to watch to be informed of all changes to a file. Change-Id: I09563baffad1711a045e45c1bd0bd8713c2cc0b6 Signed-off-by: Daniel Rosenberg <drosen@google.com>
2016-06-07sdcardfs: Bring up to date with Android M permissions:Daniel Rosenberg
In M, the workings of sdcardfs were changed significantly. This brings sdcardfs into line with the changes. Change-Id: I10e91a84a884c838feef7aa26c0a2b21f02e052e
2016-06-07Changed type-casting in packagelist managementDaniel Campello
Fixed existing type-casting in packagelist management code. All warnings at compile time were taken care of. Change-Id: I1ea97786d1d1325f31b9f09ae966af1f896a2af5 Signed-off-by: Daniel Campello <campello@google.com>
2016-06-07Port of sdcardfs to 4.4Daniel Campello
Change-Id: I25b99ecf214e72ebf6a57ec3085972542a8d7951 Signed-off-by: Daniel Rosenberg <drosen@google.com>
2016-06-07Included sdcardfs source code for kernel 3.0Daniel Campello
Only included the source code as is for kernel 3.0. Following patches take care of porting this file system to version 3.10. Change-Id: I09e76db77cd98a059053ba5b6fd88572a4b75b5b Signed-off-by: Daniel Campello <campello@google.com>
2016-06-07ANDROID: usb: gadget: Add support for MTP OS descBadhri Jagan Sridharan
Windows requires OS specific descriptors for automatic install of drivers for MTP devices. https://msdn.microsoft.com/en-us/library/windows/ hardware/gg463179.aspx BUG=24583401 BUG=chrome-os-partner:43409 Change-Id: I9397072ca3d183efbc9571c6cde3790f10d8851e Signed-off-by: Badhri Jagan Sridharan <Badhri@google.com> Reviewed-on: https://chromium-review.googlesource.com/304346 Commit-Ready: Andrew Bresticker <abrestic@chromium.org> Tested-by: Andrew Bresticker <abrestic@chromium.org> Reviewed-by: Andrew Bresticker <abrestic@chromium.org> Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
2016-06-07CHROMIUM: usb: gadget: f_accessory: add .raw_request callbackMark Kuo
After this upstream commit: 3c86726cfe38952f0366f86acfbbb025813ec1c2, .raw_request is mandatory in hid_ll_driver structure, hence add an empty raw_request() function. BUG=chrome-os-partner:49140 TEST=none Change-Id: Idd0bbe6960aad2c557376e4a24827d7e1df8e023 Signed-off-by: Mark Kuo <mkuo@nvidia.com> Reviewed-on: https://chromium-review.googlesource.com/321038 Commit-Ready: Andrew Bresticker <abrestic@chromium.org> Tested-by: Andrew Bresticker <abrestic@chromium.org> Reviewed-by: Andrew Bresticker <abrestic@chromium.org>
2016-06-07CHROMIUM: usb: gadget: audio_source: add .free_func callbackMark Kuo
When userspace unbinds gadget functions through configfs, the .free_func() callback is always invoked. (in config_usb_cfg_unlink()) Implement it as a no-op to avoid the following crash: [ 68.125679] configfs-gadget gadget: unbind function 'accessory'/ffffffc0720bf000 [ 68.133202] configfs-gadget gadget: unbind function 'audio_source'/ffffffc0012ca3c0 [ 68.142668] tegra-xudc 700d0000.usb-device: ep 0 disabled [ 68.148186] Bad mode in Synchronous Abort handler detected, code 0x86000006 [ 68.155144] CPU: 2 PID: 1 Comm: init Tainted: G U W 3.18.0-09419-g87296c3-dirty #561 [ 68.163743] Hardware name: Google Tegra210 Smaug Rev 1,3+ (DT) [ 68.169566] task: ffffffc0bc8d0000 ti: ffffffc0bc8bc000 task.ti: ffffffc0bc8bc000 [ 68.177039] PC is at 0x0 [ 68.179577] LR is at usb_put_function+0x14/0x1c .... BUG=chrome-os-partner:49140 TEST="setprop sys.usb.config accessory,audio_source" on A44 and then switch back to default: "setprop sys.usb.config mtp,adb", no crash will be seen. Change-Id: I5b6141964aab861e86e3afb139ded02d4d122dab Signed-off-by: Mark Kuo <mkuo@nvidia.com> Reviewed-on: https://chromium-review.googlesource.com/321013 Commit-Ready: Andrew Bresticker <abrestic@chromium.org> Tested-by: Andrew Bresticker <abrestic@chromium.org> Reviewed-by: Andrew Bresticker <abrestic@chromium.org>
2016-06-07CHROMIUM: usb: gadget: f_mtp: fix usb_ss_ep_comp_descriptorMark Kuo
wBytesPerInterval in SuperSpeed Endpoint Companion Descriptor needs to be set large enough to reserve enough bus time for associated periodic endpoint. Originally, wBytesPerInterval for mtp's interrupt IN endpoint is set to 2 and its single interrupt transfer will be split into many 2 bytes interrupt transfers. So, we change wBytesPerInterval to INTR_BUFFER_SIZE to ensure interrupt transfer will not be split. BUG=none TEST=Smaug works as a MTP device Change-Id: I49c0df892b2d9e0193a684eef23f73664ced9f91 Signed-off-by: Henry Lin <henryl@nvidia.com> Signed-off-by: Mark Kuo <mkuo@nvidia.com> Reviewed-on: https://chromium-review.googlesource.com/299091 Reviewed-by: Andrew Bresticker <abrestic@chromium.org>
2016-06-07CHROMIUM: usb: gadget: f_mtp: Add SuperSpeed supportMark Kuo
Add SuperSpeed endpoint and companion descriptors. BUG=chrome-os-partner:43682 TEST=Smaug enumerates as a SuperSpeed device. Change-Id: I2bf3125d180fcb07222a5740fa67f3526cf3e95c Signed-off-by: Hui Fu <hfu@nvidia.com> Signed-off-by: Henry Lin <henryl@nvidia.com> Signed-off-by: Mark Kuo <mkuo@nvidia.com> Signed-off-by: Andrew Bresticker <abrestic@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/294950
2016-06-07FROMLIST: pstore-ram: fix NULL reference when used with pdataBrian Norris
When using platform-data (not DT), we get an OOPS, because drvdata is only initialized after we try to use it. This addresses my comments made on the upstream submission here: https://patchwork.kernel.org/patch/7980651/ Fixes boot on Chrome OS systems, including the Pixel 2. Change-Id: I97360edf2ce61c83dc543cb6c169f3287e2dae4b Fixes: b1d1b7187c11 ("FROMLIST: pstore-ram: add Device Tree bindings") Signed-off-by: Brian Norris <briannorris@google.com>
2016-06-07usb: u_ether: Add missing rx_work initMatthew Moeller
commit 398a708ed5f3ef771d96dfb9b95b5d5170d17eb7 usb: u_ether: Add workqueue as bottom half handler for rx data path set up a worker for the rx data path but missed a case where the work_struct needed to be initialized. This patch adds the missing 'INIT_WORK' Change-Id: I2daabd39d35b3e17a3054837282d649d9c78a0aa Signed-off-by: Matthew Moeller <moeller.matt@gmail.com>
2016-06-07ANDROID: dm-crypt: run in a WQ_HIGHPRI workqueueTim Murray
(cherry pick from commit ad3ac5180979e5dd1f84e4a807f76fb9fb19f814) Running dm-crypt in a standard workqueue results in IO competing for CPU time with standard user apps, which can lead to pipeline bubbles and seriously degraded performance. Move to a WQ_HIGHPRI workqueue to protect against that. Signed-off-by: Tim Murray <timmurray@google.com> Bug: 25392275 Change-Id: I2828587c754a7c2cafdd78b3323b9896cb8cd4e7