Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CHROMIUM: usb: gadget: f_fs: Fix kernel panic for SuperSpeed
Android N adds os_desc_compat in v2_descriptor by init_functionfs() (system/core/adb/usb_linux_client.cpp) to support automatic install of MTP driver on Windows for USB device mode. current __ffs_data_do_os_desc() of f_fs.c will check reserved1 field and return -EINVAL. This results in a second adb_write of usb_linux_client.cpp (system/core/adb/) which doesn't have ss_descriptors filled. And later kernel_panic (composite.c) occurs when ss_descriptors as a pointer with NULL is accessed. Fix is to ignore the checking on reserved1 field so adb_write goes successfully with v2_descriptor which has ss_descriptors filled. BUG=chrome-os-partner:52060 TEST=Connected our device to USB3.0 connector of ubuntu PC host with USB3.0 cable. Change-Id: Ib179f982b9ae93fb2fe3b6ac9cd37fb0473235b3 Signed-off_by: Jim Lin <jilin@nvidia.com> Reviewed-on: https://chromium-review.googlesource.com/340167 Commit-Ready: Jim Lin <jilin@nvidia.com> Tested-by: Jim Lin <jilin@nvidia.com> Reviewed-by: Badhri Jagan Sridharan <badhri@google.com> Reviewed-by: Benson Leung <bleung@chromium.org> Reviewed-by: Mark Kuo <mkuo@nvidia.com> (cherry picked from commit 2b0c2bef2a6ab6cd814f5bf4f552cea22f4e5a68) Reviewed-on: https://chromium-review.googlesource.com/341970 Reviewed-by: Stephen Barber <smbarber@chromium.org> Commit-Queue: Stephen Barber <smbarber@chromium.org> Tested-by: Stephen Barber <smbarber@chromium.org>
- Loading branch information