summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* USB: core: remove CONFIG_USB_DEBUG usageGreg Kroah-Hartman2013-12-213-18/+7
| | | | | | | | | | | | | | | | CONFIG_USB_DEBUG is going away, so remove the few places in the USB core that relied on them. This means that we always now do the "debug" checks for every urb submitted, which is a good idea, as who knows how many driver bugs we have been ignoring when people forget to enable this option. Also, with the overall speed of USB, doing these extra checks should not cause any additional overhead. Also, no longer announce all devices being added to the system if CONFIG_USB_DEBUG is enabled, as it's not going to be around much longer. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* USB: gadget: fix up some comments about CONFIG_USB_DEBUGGreg Kroah-Hartman2013-12-212-2/+2
| | | | | | | | | These two gadget drivers said that their #endif was for CONFIG_USB_DEBUG, but they really were not, so fix them up to be correct. Cc: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge tag 'for-usb-next-2013-12-20' of ↵Greg Kroah-Hartman2013-12-213-7/+10
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-next Sarah writes: xhci: Cleanups, non-urgent fixes for 3.14. Happy Holidays, Greg! Here's four patches to be queued to usb-next for 3.14. One adds a module parameter to the xHCI driver to allow users to enable xHCI quirks without recompiling their kernel, which you've already said is fine. The second patch is a bug fix for new usbtest code that's only in usb-next. The third patch is simple cleanup. The last patch is a non-urgent bug fix for xHCI platform devices. The bug has been in the code since 3.9. You've been asking me to hold off on non-urgent bug fixes after -rc4/-rc5, so it can go into usb-next, and be backported to stable once 3.14 is out. These have all been tested over the past week. I did run across one oops, but it turned out to be a bug in 3.12, and therefore not related to any of these patches. Please queue these for usb-next and 3.14. Thanks, Sarah Sharp
| * usb: xhci: Check for XHCI_PLAT in xhci_cleanup_msix()Jack Pham2013-12-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If CONFIG_PCI is enabled, make sure xhci_cleanup_msix() doesn't try to free a bogus PCI IRQ or dereference an invalid pci_dev when the xHCI device is actually a platform_device. This patch should be backported to kernels as old as 3.9, that contain the commit 52fb61250a7a132b0cfb9f4a1060a1f3c49e5a25 "xhci-plat: Don't enable legacy PCI interrupts." Signed-off-by: Jack Pham <jackp@codeaurora.org> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Cc: stable@vger.kernel.org
| * xhci: Remove unused variable 'addr' in inc_deq() and inc_enq().Lin Wang2013-12-171-6/+0
| | | | | | | | | | | | | | This patch remove unused variable 'addr' in inc_deq() and inc_enq(). Signed-off-by: Lin Wang <lin.x.wang@intel.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
| * usbtest: Fix BOS control test for USB 2.01 devices.Sarah Sharp2013-12-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit c952a8ba7136505cd1ca01735cc748ddc08c7d2f "usb: usbtest: add a test case to support bos for queue control" will cause USB 2.01 and USB 2.10 devices with a BOS descriptor to fail case 15 of the control test. The Link PM errata (released in 2007, updated in 2011) says: "The value of the bcdUSB field in the standard USB 2.0 Device Descriptor is used to indicate that the device supports the request to read the BOS Descriptor (i.e. GetDescriptor(BOS)). Devices that support the BOS descriptor must have a bcdUSB value of 0201H or larger." The current code says that non-SuperSpeed devices *must* return -EPIPE, as this comment shows: /* sign of this variable means: * -: tested code must return this (negative) error code * +: tested code may return this (negative too) error code */ int expected = 0; This means the test will fail with USB 2.01 and USB 2.10 devices that provide a BOS descriptor. Change it to only require a stall response if the USB device bcdUSB is less than 2.01. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Acked-by: Huang Rui <ray.huang@amd.com>
| * xhci: Add quirks module optionTakashi Iwai2013-12-131-0/+6
| | | | | | | | | | | | | | | | | | | | | | It makes easier for debugging some hardware specific issues. Note that this option won't override the value to be set. That is, you can turn quirks on by this option but cannot turn them off if set by the driver. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
* | uwb: move mutex_lock to error case in uwbd_evt_handle_rc_bp_slot_changeThomas Pugliese2013-12-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only acquire rc->uwb_dev.mutex in the error case in uwbd_evt_handle_rc_bp_slot_change. This fixes a bug where establishing a reservation on a new channel will fail if we were unable to establish a reservation on the previous channel due to DRP conflict. If rc->uwb_dev.mutex is acquired in the non-error case when the uwb system is attempting to start beaconing, it will block because the start beaconing code is holding this mutex. This prevents any other notifications from the URC from being processed. In particular, the DRP_AVAILABILITY notification will not be processed during the start beaconing process which can result in a failure to establish a reservation. It is safe to not hold the mutex in the non-error case since the only other place rc->uwb_dev.beacon_slot is accessed is in the same worker thread that uwbd_evt_handle_rc_bp_slot_change executes in. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | uwb: use uwb_rsv_callback instead of calling rsv->callback directlyThomas Pugliese2013-12-201-1/+1
| | | | | | | | | | | | | | | | | | Use uwb_rsv_callback wrapper instead of calling rsv->callback directly. uwb_rsv_callback checks for NULL and is used by other callers of the callback routine. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | uwb: whitespace and comment cleanupsThomas Pugliese2013-12-203-9/+9
| | | | | | | | | | | | | | various whitespace and comment cleanups Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | uwb: add debug prints during channel change and beacon actionsThomas Pugliese2013-12-202-1/+6
| | | | | | | | | | | | | | Add debug prints during channel change and beacon actions. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | usb: wusbcore: add debug prints to reservation and channel changeThomas Pugliese2013-12-202-0/+2
| | | | | | | | | | | | | | | | This patch adds debug prints to the reservation and channel change sequence to help with debugging channel change problems. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | usb: cdc-wdm: avoid hanging on zero length readsBjørn Mork2013-12-201-32/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 73e06865ead1 ("USB: cdc-wdm: support back-to-back USB_CDC_NOTIFY_RESPONSE_AVAILABLE notifications") implemented queued response handling. This added a new requirement: The read urb must be resubmitted every time we clear the WDM_READ flag if the response counter indicates that the device is waiting for a read. Fix by factoring out the code handling the WMD_READ clearing and possible urb submission, calling it everywhere we clear the flag. Without this fix, the driver ends up in a state where the read urb is inactive, but the response counter is positive after a zero length read. This prevents the read urb from ever being submitted again and the driver appears to be hanging. Fixes: 73e06865ead1 ("USB: cdc-wdm: support back-to-back USB_CDC_NOTIFY_RESPONSE_AVAILABLE notifications") Cc: Greg Suarez <gsuarez@smithmicro.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Cc: stable <stable@vger.kernel.org> # 3.13 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | USB: c67x00: remove CONFIG_USB_DEBUG dependancyGreg Kroah-Hartman2013-12-202-14/+3
| | | | | | | | | | | | | | | | | | | | | | | | This removes the usage of CONFIG_USB_DEBUG in the c67x00 driver. There was only one place, where the TD was dumped to the kernel log, and that was using the dynamic debug infrastructure already, with the exception of the call to print_hex_dump(). So move everything to the dynamic debug infrastructure, including one odd printk(KERN_DEBUG...) line that looks like it was forgotten about a long time ago. Acked-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | uwb: umc-dev: add missing put_device callLevente Kurusa2013-12-191-0/+1
| | | | | | | | | | | | | | This is required so that we give up the last reference to the device. Signed-off-by: Levente Kurusa <levex@linux.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | drivers: usb: Mark function as static in metro-usb.cRashika Kheria2013-12-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Mark function metrousb_is_unidirectional_mode() in serial/metro-usb.c because it is not used outside this file. This eliminates the following warning in serial/metro-usb.c: drivers/usb/serial/metro-usb.c:57:12: warning: no previous prototype for ‘metrousb_is_unidirectional_mode’ [-Wmissing-prototypes] Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | drivers: usb: Mark function as static in usbsevseg.cRashika Kheria2013-12-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Mark function my_memlen() as static in misc/usbsevseg.c because it is not used outside this file. This eliminates the following warning in misc/usbsevseg.c: drivers/usb/misc/usbsevseg.c:60:15: warning: no previous prototype for ‘my_memlen’ [-Wmissing-prototypes] Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | USB: ohci-octeon: Use devm_ioremap_resource()Jingoo Han2013-12-181-18/+5
| | | | | | | | | | | | | | | | Use devm_ioremap_resource() to make cleanup paths simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: David Daney <david.daney@cavium.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | USB: ohci-spear: Use devm_ioremap_resource()Jingoo Han2013-12-181-10/+3
| | | | | | | | | | | | | | | | Use devm_ioremap_resource() to make cleanup paths simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | USB: ohci-ppc-of: Use devm_ioremap_resource()Jingoo Han2013-12-181-18/+4
| | | | | | | | | | | | | | Use devm_ioremap_resource() to make cleanup paths simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | USB: ohci-nxp: Use devm_clk_get()Jingoo Han2013-12-181-18/+8
| | | | | | | | | | | | | | Use devm_clk_get() to make cleanup paths simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | USB: ehci-w90x900: Use devm_ioremap_resource()Jingoo Han2013-12-181-16/+5
| | | | | | | | | | | | | | Use devm_ioremap_resource() to make cleanup paths simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | USB: ohci-da8xx: Use devm_*() functionsJingoo Han2013-12-181-40/+15
| | | | | | | | | | | | | | Use devm_*() functions to make cleanup paths simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | USB: ohci-jz4740: Use devm_*() functionsJingoo Han2013-12-181-30/+9
| | | | | | | | | | | | | | Use devm_*() functions to make cleanup paths simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | USB: ohci-pxa27x:Use devm_*() functionsJingoo Han2013-12-181-28/+10
| | | | | | | | | | | | | | Use devm_*() functions to make cleanup paths simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | USB: ehci-octeon: Use devm_ioremap_resource()Jingoo Han2013-12-181-18/+5
| | | | | | | | | | | | | | | | Use devm_ioremap_resource() to make cleanup paths simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: David Daney <david.daney@cavium.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | USB: ehci-fsl: Use devm_ioremap_resource()Jingoo Han2013-12-181-21/+7
| | | | | | | | | | | | | | Use devm_ioremap_resource() to make cleanup paths simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | USB: ehci-orion: Use devm_*() functionsJingoo Han2013-12-181-31/+12
| | | | | | | | | | | | | | | | Use devm_*() functions to make cleanup paths simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Jason Cooper <jason@lakedaemon.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | USB: ohci-ppc-of: use dev_err() instead of printk()Jingoo Han2013-12-181-3/+5
| | | | | | | | | | | | | | | | Use dev_err() instead of printk() to provide a better message to userspace. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | USB: ohci-omap: use dev_err() instead of printk()Jingoo Han2013-12-181-2/+2
| | | | | | | | | | | | | | | | Use dev_err() instead of printk() to provide a better message to userspace. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | USB: ehci-xilinx-of: use dev_err() instead of printk()Jingoo Han2013-12-181-1/+2
| | | | | | | | | | | | | | | | Use dev_err() instead of printk() to provide a better message to userspace. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | USB: ehci-ppc-of: use dev_err() instead of printk()Jingoo Han2013-12-181-1/+2
| | | | | | | | | | | | | | | | Use dev_err() instead of printk() to provide a better message to userspace. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | USB: ehci-orion: use dev_warn() instead of printk()Jingoo Han2013-12-181-1/+1
| | | | | | | | | | | | | | | | | | Use dev_warn() instead of printk() to provide a better message to userspace. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Jason Cooper <jason@lakedaemon.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | USB: ehci-grlib: use dev_err() instead of printk()Jingoo Han2013-12-181-1/+2
| | | | | | | | | | | | | | | | Use dev_err() instead of printk() to provide a better message to userspace. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | USB: ehci-fsl: use dev_warn() instead of printk()Jingoo Han2013-12-181-1/+1
| | | | | | | | | | | | | | | | Use dev_warn() instead of printk() to provide a better message to userspace. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | usb: ohci-at91: use device managed clk retrievalBoris BREZILLON2013-12-181-23/+7
| | | | | | | | | | | | | | | | | | Replace clk_get calls by devm_clk_get calls. Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | usb: ohci-at91: use dev variable instead of &pdev->devBoris BREZILLON2013-12-181-9/+9
| | | | | | | | | | | | | | | | | | | | Make use of the dev variable instead of referencing the dev field of the pdev struct. Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | usb: ohci-at91: replace request_mem_region + ioremap by devm_ioremap_resourceBoris BREZILLON2013-12-181-21/+6
| | | | | | | | | | | | | | | | | | | | | | Replace the request_mem_region + ioremap calls by the devm_ioremap_resource call which does the same things but with device managed resources. Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | usb: option: add new zte 3g modem pids to option driver张君2013-12-181-0/+11
| | | | | | | | | | | | Signed-off-by: Jun zhang <zhang.jun92@zte.com.cn> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | usb: usbtest: Always clear halt else further tests will failRoger Quadros2013-12-181-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | In test_halt() we set an endpoint halt condition and return on halt verification failure, then the enpoint will remain halted and all further tests related to that enpoint will fail. This is because we don't tackle endpoint halt error condition in any of the tests. To avoid that situation, make sure to clear the halt condition before exiting test_halt(). Signed-off-by: Roger Quadros <rogerq@ti.com> Reviewed-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | usb: usbtest: Add timetout to simple_io()Roger Quadros2013-12-181-3/+11
| | | | | | | | | | | | | | | | Without a timetout some tests e.g. test_halt() can remain stuck forever. Signed-off-by: Roger Quadros <rogerq@ti.com> Reviewed-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | usb: wusbcore: add isochronous IN support to HWAThomas Pugliese2013-12-171-98/+207
| | | | | | | | | | | | | | | | | | | | This patch adds support for isochronous IN transfers to the HWA driver. The changes include removing the checks that return errors for isoc IN URBs and adding functionality to read the isoc data returned from the HWA. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Merge branch 3.13-rc4 into usb-nextGreg Kroah-Hartman2013-12-16121-5242/+6998
|\ \ | |/
| * USB: emi62: Provide the correct bitstream firmwareBen Hutchings2013-12-101-4295/+6030
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit b8e24bfabb03 ('emi62: use request_firmware()') made emi62/bitstream.HEX a copy of emi26/bitstream.HEX. Re-do the conversion from drivers/usb/misc/emi62_fw_{m,s}.h (these headers contained the same bitstream but different firmware). This produces an identical blob to the known working version in http://people.xiph.org/~xiphmont/emagic/emi-20131209.tgz Reported-by: Monty <xiphmont@xiph.org> Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * Merge tag 'for-usb-next-2013-12-10' of ↵Greg Kroah-Hartman2013-12-107-21/+87
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-next Sarah Writes: usb: Enumeration change under xHCI for 3.14. Hi Greg, Here's two patches for 3.14. There are buggy USB devices that don't enumerate under xHCI because they expect a 64-byte Get Descriptor request before the Set Address control transfer. David Moore has a USB 2.0 webcam that exhibits this behavior: http://marc.info/?l=linux-usb&m=135879694716380&w=2 These patches change the way USB 2.0 devices are enumerated under xHCI, to try the Windows enumeration scheme first. The USB 3.0 device enumeration scheme is unchanged. This should allow these buggy USB 2.0 devices to enumerate under xHCI. I've tested this code with USB 3.0 hubs and mass storage devices, and many different USB 2.0 devices (webcam, headset, ethernet, serial, mouse, keyboard, etc). They all work, so these patches are ready for wider testing. Sarah Sharp
| | * xhci: clarify logging in xhci_setup_deviceDan Williams2013-12-101-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | Specify whether we are only performing the context setup portion of the 'address device' command, or the full operation issuing 'SetAddress' on the wire. Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
| | * usb: xhci: change enumeration scheme to 'new scheme' by defaultDan Williams2013-12-107-11/+75
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the default enumeration scheme for xhci attached non-SuperSpeed devices from: Reset SetAddress [xhci address-device BSR = 0] GetDescriptor(8) GetDescriptor(18) ...to: Reset [xhci address-device BSR = 1] GetDescriptor(64) Reset SetAddress [xhci address-device BSR = 0] GetDescriptor(18) ...as some devices misbehave when encountering a SetAddress command prior to GetDescriptor. There are known legacy devices that require this scheme, but testing has found at least one USB3 device that fails enumeration when presented with this ordering. For now, follow the ehci case and enable 'new scheme' by default for non-SuperSpeed devices. To support this enumeration scheme on xhci the AddressDevice operation needs to be performed twice. The first instance of the command enables the HC's device and slot context info for the device, but omits sending the device a SetAddress command (BSR == block set address request). Then, after GetDescriptor completes, follow up with the full AddressDevice+SetAddress operation. As mentioned before, this ordering of events with USB3 devices causes an extra state transition to be exposed to xhci. Previously USB3 devices would transition directly from 'enabled' to 'addressed' and never need to underrun responses to 'get descriptor'. We do see the 64-byte descriptor fetch the correct data, but the following 18-byte descriptor read after the reset gets: bLength = 0 bDescriptorType = 0 bcdUSB = 0 bDeviceClass = 0 bDeviceSubClass = 0 bDeviceProtocol = 0 bMaxPacketSize0 = 9 instead of: bLength = 12 bDescriptorType = 1 bcdUSB = 300 bDeviceClass = 0 bDeviceSubClass = 0 bDeviceProtocol = 0 bMaxPacketSize0 = 9 which results in the discovery process looping until falling back to 'old scheme' enumeration. Acked-by: Alan Stern <stern@rowland.harvard.edu> Reported-by: David Moore <david.moore@gmail.com> Suggested-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
| * USB: storage: fix compile warningMing Lei2013-12-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch should fix the below compile warning: drivers/usb/storage/protocol.c: In function 'usb_stor_access_xfer_buf': drivers/usb/storage/protocol.c:155:22: warning: comparison of distinct pointer types lacks a cast [enabled by default] Reported-by: kbuild test robot <fengguang.wu@intel.com> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Ming Lei <ming.lei@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * usb: wusbcore: set packet count correctly on isoc transfersThomas Pugliese2013-12-091-0/+5
| | | | | | | | | | | | | | | | | | | | This patch correctly sets the dwNumOfPackets field of the HWA transfer request for isochronous transfers with multiple segments. Previously all segments used the value that was set for the first segment which may not be correct. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * usb: wusbcore: move isoc_frame_index from wa_xfer to wa_segThomas Pugliese2013-12-091-11/+10
| | | | | | | | | | | | | | | | | | | | If multiple segments belonging to an isoc transfer are submitted concurrently, the isoc_frame_index field in struct wa_xfer can get corrupted. This patch moves the isoc_frame_index field from struct wa_xfer to struct wa_seg to prevent this from happening. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
OpenPOWER on IntegriCloud