summaryrefslogtreecommitdiffstats
path: root/drivers/usb/core
Commit message (Collapse)AuthorAgeFilesLines
...
| * | usb: Use the USB_SS_MULT() macro to decode burst multiplier for log messageBen Hutchings2015-12-011-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | usb_parse_ss_endpoint_companion() now decodes the burst multiplier correctly in order to check that it's <= 3, but still uses the wrong expression if warning that it's > 3. Fixes: ff30cbc8da42 ("usb: Use the USB_SS_MULT() macro to get the ...") Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | usb: core : hub: Fix BOS 'NULL pointer' kernel panicHans Yang2015-12-011-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a USB 3.0 mass storage device is disconnected in transporting state, storage device driver may handle it as a transport error and reset the device by invoking usb_reset_and_verify_device() and following could happen: in usb_reset_and_verify_device(): udev->bos = NULL; For U1/U2 enabled devices, driver will disable LPM, and in some conditions: from usb_unlocked_disable_lpm() --> usb_disable_lpm() --> usb_enable_lpm() udev->bos->ss_cap->bU1devExitLat; And it causes 'NULL pointer' and 'kernel panic': [ 157.976257] Unable to handle kernel NULL pointer dereference at virtual address 00000010 ... [ 158.026400] PC is at usb_enable_link_state+0x34/0x2e0 [ 158.031442] LR is at usb_enable_lpm+0x98/0xac ... [ 158.137368] [<ffffffc0006a1cac>] usb_enable_link_state+0x34/0x2e0 [ 158.143451] [<ffffffc0006a1fec>] usb_enable_lpm+0x94/0xac [ 158.148840] [<ffffffc0006a20e8>] usb_disable_lpm+0xa8/0xb4 ... [ 158.214954] Kernel panic - not syncing: Fatal exception This commit moves 'udev->bos = NULL' behind usb_unlocked_disable_lpm() to prevent from NULL pointer access. Issue can be reproduced by following setup: 1) A SS pen drive behind a SS hub connected to the host. 2) Transporting data between the pen drive and the host. 3) Abruptly disconnect hub and pen drive from host. 4) With a chance it crashes. Signed-off-by: Hans Yang <hansy@nvidia.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: quirks: Fix another ELAN touchscreenAdrien Vergé2015-12-011-0/+3
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Like other buggy models that had their fixes [1], the touchscreen with id 04f3:21b8 from ELAN Microelectronics needs the device-qualifier quirk. Otherwise, it fails to respond, blocks the boot for a random amount of time and pollutes dmesg with: [ 2887.373196] usb 1-5: new full-speed USB device number 41 using xhci_hcd [ 2889.502000] usb 1-5: unable to read config index 0 descriptor/start: -71 [ 2889.502005] usb 1-5: can't read configurations, error -71 [ 2889.654571] usb 1-5: new full-speed USB device number 42 using xhci_hcd [ 2891.783438] usb 1-5: unable to read config index 0 descriptor/start: -71 [ 2891.783443] usb 1-5: can't read configurations, error -71 [1]: See commits c68929f, 876af5d, d749947, a32c99e and dc703ec. Tested-by: Adrien Vergé <adrienverge@gmail.com> Signed-off-by: Adrien Vergé <adrienverge@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | new helpers: no_seek_end_llseek{,_size}()Al Viro2015-12-232-50/+2
|/ | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* usb: kconfig: fix warning of select USB_OTGPeter Chen2015-11-191-2/+1
| | | | | | | | | | | | | | | When choose randconfig for kernel build, it reports below warning: "warning: (USB_OTG_FSM && FSL_USB2_OTG && USB_MV_OTG) selects USB_OTG which has unmet direct dependencies (USB_SUPPORT && USB && PM)" In fact, USB_OTG is visible symbol and depends on PM, so the driver needs to depend on it to reduce dependency problem. Signed-off-by: Peter Chen <peter.chen@freescale.com> Reported-by: Arnd Bergmann <arnd@arndb.de> Cc: Felipe Balbi <balbi@ti.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* USB: core: Codestyle fix in urb.cJonas Hesselmann2015-10-261-2/+1
| | | | | | | Delete braces around single statement block suggested by checkpatch.pl Signed-off-by: Jonas Hesselmann <jonas.hesselmann@hotmail.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: hcd: use USB_DT_*Sergei Shtylyov2015-10-161-14/+15
| | | | | | | | Fix using the bare numbers to set the 'bDescriptorType' descriptor fields while the values are #define'd in <linux/usb/ch9.h>. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge 4.3-rc5 into usb-nextGreg Kroah-Hartman2015-10-121-0/+13
|\ | | | | | | | | | | We want the USB fixes in here as well to make merges easier. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * usb: Add device quirk for Logitech PTZ camerasVincent Palatin2015-10-041-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a device quirk for the Logitech PTZ Pro Camera and its sibling the ConferenceCam CC3000e Camera. This fixes the failed camera enumeration on some boot, particularly on machines with fast CPU. Tested by connecting a Logitech PTZ Pro Camera to a machine with a Haswell Core i7-4600U CPU @ 2.10GHz, and doing thousands of reboot cycles while recording the kernel logs and taking camera picture after each boot. Before the patch, more than 7% of the boots show some enumeration transfer failures and in a few of them, the kernel is giving up before actually enumerating the webcam. After the patch, the enumeration has been correct on every reboot. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * USB: Add reset-resume quirk for two Plantronics usb headphones.Yao-Wen Mao2015-10-041-0/+6
| | | | | | | | | | | | | | | | | | These two headphones need a reset-resume quirk to properly resume to original volume level. Signed-off-by: Yao-Wen Mao <yaowen@google.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | usb: otg: don't set a_alt_hnp_support feature for OTG 2.0 deviceLi Jun2015-10-041-29/+39
| | | | | | | | | | | | | | | | | | | | | | | | Since a_alt_hnp_support is obsolete in OTG 2.0, HNP capable host should send this set feature request only if the otg device is connecting to a non-HNP port and it's compliant with OTG 1.x revision. This is done by checking its otg descriptor length, OTG 2.0 uses usb_otg20_descriptor which has different length than OTG 1.x using usb_otg_descriptor. Signed-off-by: Li Jun <jun.li@freescale.com> Acked-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | usb: core: driver: Use kmalloc_arrayMuhammad Falak R Wani2015-10-041-4/+2
| | | | | | | | | | | | | | | | | | Use kmalloc_array instead of kmalloc to allocate memory for an array. Also, remove the dev_warn for a memory leak, making the if check more sleek. Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | usb: message: remove redundant declarationKris Borer2015-10-041-2/+0
| | | | | | | | | | | | | | | | | | | | Fix the Sparse warning: message.c:1390:21: warning: symbol 'i' shadows an earlier one message.c:1294:13: originally declared here Signed-off-by: Kris Borer <kborer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | usb: hub: remove redundant declarationsKris Borer2015-10-041-2/+1
| | | | | | | | | | | | | | | | | | | | Fix two occurrences of the Sparse warning: warning: symbol XXX shadows an earlier one Signed-off-by: Kris Borer <kborer@gmail.com> Reviewed-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | usb: core: hub: Removed some warnings generated by checkpatch.plChase Metzger2015-10-041-8/+8
| | | | | | | | | | | | | | | | Removed some checkpatch.pl warnings saying there was an unwanted space between function names and their arguments. Signed-off-by: Chase Metzger <chasemetzger15@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | usb: define HCD_USB31 speed option for hosts that support USB 3.1 featuresMathias Nyman2015-10-041-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Hosts that support USB 3.1 Enhaned SuperSpeed can set their speed to HCD_USB31 to let usb core and host drivers know that the controller supports new USB 3.1 features. make sure usb core handle HCD_USB31 hosts correctly, for now similar to HCD_USB3. Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | usb: store the new usb 3.1 SuperSpeedPlus device capability descriptorMathias Nyman2015-10-041-0/+4
| | | | | | | | | | | | | | | | | | | | If a device supports usb 3.1 SupeerSpeedPlus Gen2 speeds it povides a SuperSpeedPlus device capability descriptor as a part of its BOS descriptor. If we find one while parsing the BOS then save it togeter with the other device capabilities found in the BOS Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Merge 4.3-rc3 into usb-nextGreg Kroah-Hartman2015-09-291-2/+3
|\ \ | |/ | | | | | | | | We want the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * usb: Use the USB_SS_MULT() macro to get the burst multiplier.Mathias Nyman2015-09-211-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bits 1:0 of the bmAttributes are used for the burst multiplier. The rest of the bits used to be reserved (zero), but USB3.1 takes bit 7 into use. Use the existing USB_SS_MULT() macro instead to make sure the mult value and hence max packet calculations are correct for USB3.1 devices. Note that burst multiplier in bmAttributes is zero based and that the USB_SS_MULT() macro adds one. Cc: <stable@vger.kernel.org> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | usb: interface authorization: Use a flag for the default device authorizationStefan Koch2015-09-222-11/+22
| | | | | | | | | | | | | | | | With this patch a flag instead of a variable is used for the default device authorization. Signed-off-by: Stefan Koch <stefan.koch10@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | usb: interface authorization: SysFS part of USB interface authorizationStefan Koch2015-09-221-0/+36
| | | | | | | | | | | | | | | | | | This introduces an attribute for each interface to authorize (1) or deauthorize (0) it: /sys/bus/usb/devices/INTERFACE/authorized Signed-off-by: Stefan Koch <stefan.koch10@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | usb: interface authorization: Introduces the USB interface authorizationStefan Koch2015-09-222-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | The kernel supports the device authorization because of wireless USB. These is usable for wired USB devices, too. These new interface authorization allows to enable or disable individual interfaces instead a whole device. If a deauthorized interface will be authorized so the driver probing must be triggered manually by writing INTERFACE to /sys/bus/usb/drivers_probe Signed-off-by: Stefan Koch <stefan.koch10@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | usb: interface authorization: Control interface probing and claimingStefan Koch2015-09-221-0/+8
| | | | | | | | | | | | | | | | Driver probings and interface claims get rejected if an interface is not authorized. Signed-off-by: Stefan Koch <stefan.koch10@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | usb: interface authorization: Introduces the default interface authorizationStefan Koch2015-09-222-0/+48
|/ | | | | | | | | Interfaces are allowed per default. This can disabled or enabled (again) by writing 0 or 1 to /sys/bus/usb/devices/usbX/interface_authorized_default Signed-off-by: Stefan Koch <stefan.koch10@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Revert "usb: interface authorization: Introduces the default interface ↵Greg Kroah-Hartman2015-08-182-48/+0
| | | | | | | | | | authorization" This reverts commit 1d958bef45030acfc5578263e9de3bb07032b8da as the signed-off-by address is invalid. Cc: Stefan Koch <stefan.koch10@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Revert "usb: interface authorization: Control interface probing and claiming"Greg Kroah-Hartman2015-08-181-8/+0
| | | | | | | | This reverts commit de7718bd9c4d3db96991a98c2a0cb38258a04e47 as the signed-off-by address is invalid. Cc: Stefan Koch <stefan.koch10@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Revert "usb: interface authorization: Introduces the USB interface ↵Greg Kroah-Hartman2015-08-182-40/+0
| | | | | | | | | | authorization" This reverts commit ef0909c50fe63be3f9aa09bdf4db7efaa5919be9 as the signed-off-by address is invalid. Cc: Stefan Koch <stefan.koch10@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Revert "usb: interface authorization: SysFS part of USB interface authorization"Greg Kroah-Hartman2015-08-181-36/+0
| | | | | | | | This reverts commit 187b3d75bbfba45a38b5d1d3656c0f11f6f6f2d0 as the signed-off-by address is invalid. Cc: Stefan Koch <stefan.koch10@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Revert "usb: interface authorization: Use a flag for the default device ↵Greg Kroah-Hartman2015-08-182-22/+11
| | | | | | | | | | authorization" This reverts commit 3cf1fc80655d3af7083ea4b3615e5f8532543be7 as the signed-off-by address is invalid. Cc: Stefan Koch <stefan.koch10@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: core: hub: Removed some warnings generated by checkpatch.plChase Metzger2015-08-141-12/+12
| | | | | | | | Removed some checkpatch.pl warnings saying there was an unwanted space between function names and their arguments. Signed-off-by: Chase Metzger <chasemetzger15@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: interface authorization: Use a flag for the default device authorizationStefan Koch2015-08-142-11/+22
| | | | | | | | With this patch a flag instead of a variable is used for the default device authorization. Signed-off-by: Stefan Koch <skoch@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: interface authorization: SysFS part of USB interface authorizationStefan Koch2015-08-141-0/+36
| | | | | | | | | This introduces an attribute for each interface to authorize (1) or deauthorize (0) it: /sys/bus/usb/devices/INTERFACE/authorized Signed-off-by: Stefan Koch <skoch@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: interface authorization: Introduces the USB interface authorizationStefan Koch2015-08-142-0/+40
| | | | | | | | | | | | | The kernel supports the device authorization because of wireless USB. These is usable for wired USB devices, too. These new interface authorization allows to enable or disable individual interfaces instead a whole device. If a deauthorized interface will be authorized so the driver probing must be triggered manually by writing INTERFACE to /sys/bus/usb/drivers_probe Signed-off-by: Stefan Koch <skoch@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: interface authorization: Control interface probing and claimingStefan Koch2015-08-141-0/+8
| | | | | | | | Driver probings and interface claims get rejected if an interface is not authorized. Signed-off-by: Stefan Koch <skoch@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: interface authorization: Introduces the default interface authorizationStefan Koch2015-08-142-0/+48
| | | | | | | | | Interfaces are allowed per default. This can disabled or enabled (again) by writing 0 or 1 to /sys/bus/usb/devices/usbX/interface_authorized_default Signed-off-by: Stefan Koch <skoch@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: hub: remove assignment from if conditionKris Borer2015-08-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix one occurrence of the checkpatch.pl error: ERROR: do not use assignment in if condition The semantic patch that makes this change is: // <smpl> @@ identifier i; expression E, E2, E3; statement S1, S2; binary operator b; @@ + i = E; if ( - (i = E) + i b ... && E2 && E3 ) S1 else S2 // </smpl> Signed-off-by: Kris Borer <kborer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: endpoint: convert spaces to tabsKris Borer2015-08-141-1/+1
| | | | | | | | | Fix one occurrence of the checkpatch error: ERROR: code indent should use tabs where possible Signed-off-by: Kris Borer <kborer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: otg_whitelist: remove whitespaceKris Borer2015-08-141-1/+1
| | | | | | | | | Fix one occurrence of the checkpatch error: ERROR: space prohibited before open square bracket '[' Signed-off-by: Kris Borer <kborer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: core: hub.c: Removed some warnings generated by checkpatch.plChase Metzger2015-08-081-20/+20
| | | | | | | | Removed some checkpatch.pl warnings saying there was an unwanted space between function names and their arguments. Signed-off-by: Chase Metzger <chasemetzger15@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: devio: fix spacingKris Borer2015-08-081-2/+2
| | | | | | | | | | | | | Fix two occurrences of the checkpatch.pl error: ERROR: space prohibited before that ',' (ctx:WxW) Fix one occurrence of the checkpatch error: ERROR: space required before the open parenthesis '(' Signed-off-by: Kris Borer <kborer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: devio: remove assignment from if conditionKris Borer2015-08-051-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix five occurrences of the checkpatch.pl error: ERROR: do not use assignment in if condition The semantic patch that makes this change is: // <smpl> @@ identifier i; expression E; statement S1, S2; @@ + i = E; if ( - (i = E) + i ) S1 else S2 @@ identifier i; expression E; statement S; constant c; binary operator b; @@ + i = E; if ( - (i = E) + i b c ) S // </smpl> Signed-off-by: Kris Borer <kborer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge 4.2-rc4 into usb-nextGreg Kroah-Hartman2015-07-273-3/+7
|\ | | | | | | | | | | | | We want the USB fixes that went into that release in this branch as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * usb: core: lpm: set lpm_capable for root hub deviceLu Baolu2015-07-223-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 25cd2882e2fc ("usb/xhci: Change how we indicate a host supports Link PM.") removed the code to set lpm_capable for USB 3.0 super-speed root hub. The intention of that change was to avoid touching usb core internal field, a.k.a. lpm_capable, and let usb core to set it by checking U1 and U2 exit latency values in the descriptor. Usb core checks and sets lpm_capable in hub_port_init(). Unfortunately, root hub is a special usb device as it has no parent. Hub_port_init() will never be called for a root hub device. That means lpm_capable will by no means be set for the root hub. As the result, lpm isn't functional at all in Linux kernel. This patch add the code to check and set lpm_capable when registering a root hub device. It could be back-ported to kernels as old as v3.15, that contains the Commit 25cd2882e2fc ("usb/xhci: Change how we indicate a host supports Link PM."). Cc: stable@vger.kernel.org # 3.15 Reported-by: Kevin Strasser <kevin.strasser@linux.intel.com> Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | usbcore: add sysfs support to xHCI usb3 hardware LPMKevin Strasser2015-07-222-0/+35
| | | | | | | | | | | | | | | | Add a sysfs node to make it easier to verify if LPM is supported and being enabled for USB 3.0 devices. Signed-off-by: Kevin Strasser <kevin.strasser@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | usb: move assignment out of if conditionKris Borer2015-07-221-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix four occurrences of checkpatch.pl error: ERROR: do not use assignment in if condition The semantic patch that makes this change is: // <smpl> @@ identifier i; expression E; statement S; constant c; binary operator b; @@ + i = E; if ( - (i = E) + i b c ) S @@ identifier i, i2; expression E1, E2; constant c; @@ + if( E1->i ) { + i2 = E2; + if (i2 < c) { - if( E1->i && (i2 = E2) < c ) { ... - } + } + } // </smpl> Signed-off-by: Kris Borer <kborer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | usb: fix coding style issueKris Borer2015-07-221-0/+1
|/ | | | | | | Fixed coding style issue: newline after declaration Signed-off-by: Kris Borer <kborer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge tag 'usb-for-v4.2' of ↵Greg Kroah-Hartman2015-06-021-0/+20
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next Felipe writes: usb: patches for v4.2 merge window - dwc2 adds hibernation support - preparation for sunxi glue to musb driver - new ULPI bus - new ULPI PHY driver for TUSB1210 - musb patches to support multiple DMA engines on same binary - support for R-Car E2 on renesas_usbhs Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: add bus type for USB ULPIHeikki Krogerus2015-05-131-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | UTMI+ Low Pin Interface (ULPI) is a commonly used PHY interface for USB 2.0. The ULPI specification describes a standard set of registers which the vendors can extend for their specific needs. ULPI PHYs provide often functions such as charger detection and ADP sensing and probing. There are two major issues that the bus type is meant to tackle: Firstly, ULPI registers are accessed from the controller. The bus provides convenient method for the controller drivers to share that access with the actual PHY drivers. Secondly, there are already platforms that assume ULPI PHYs are runtime detected, such as many Intel Baytrail based platforms. They do not provide any kind of hardware description for the ULPI PHYs like separate ACPI device object that could be used to enumerate a device from. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Acked-by: David Cohen <david.a.cohen@linux.intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* | usb: core: Fix USB 3.0 devices lost in NOTATTACHED state after a hub port resetRobert Schlabbach2015-05-311-49/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix USB 3.0 devices lost in NOTATTACHED state after a hub port reset. Dissolve the function hub_port_finish_reset() completely and divide the actions to be taken into those which need to be done after each reset attempt and those which need to be done after the full procedure is complete, and place them in the appropriate places in hub_port_reset(). Also, remove an unneeded forward declaration of hub_port_reset(). Verbose Problem Description: USB 3.0 devices may be "lost for good" during a hub port reset. This makes Linux unable to boot from USB 3.0 devices in certain constellations of host controllers and devices, because the USB device is lost during initialization, preventing the rootfs from being mounted. The underlying problem is that in the affected constellations, during the processing inside hub_port_reset(), the hub link state goes from 0 to SS.inactive after the initial reset, and back to 0 again only after the following "warm" reset. However, hub_port_finish_reset() is called after each reset attempt and sets the state the connected USB device based on the "preliminary" status of the hot reset to USB_STATE_NOTATTACHED due to SS.inactive, yet when the following warm reset is complete and hub_port_finish_reset() is called again, its call to set the device to USB_STATE_DEFAULT is blocked by usb_set_device_state() which does not allow taking USB devices out of USB_STATE_NOTATTACHED state. Thanks to Alan Stern for guiding me to the proper solution and how to submit it. Link: http://lkml.kernel.org/r/trinity-25981484-72a9-4d46-bf17-9c1cf9301a31-1432073240136%20()%203capp-gmx-bs27 Signed-off-by: Robert Schlabbach <robert_s@gmx.net> Cc: stable <stable@vger.kernel.org> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | USB: devio: fix a condition in async_completed()Dan Carpenter2015-05-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | Static checkers complain that the current condition is never true. It seems pretty likely that it's a typo and "URB" was intended instead of "USB". Fixes: 3d97ff63f899 ('usbdevfs: Use scatter-gather lists for large bulk transfers') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
OpenPOWER on IntegriCloud