aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb
AgeCommit message (Collapse)AuthorFilesLines
2010-12-03Merge branch 'sh/ehci' of ↵Greg Kroah-Hartman4-6/+249
master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6 into work * 'sh/ehci' of master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6: sh: Convert to USB_ARCH_HAS_OHCI/EHCI selects. usb: ehci-sh: Add missing ehci helpers. usb: ehci-sh: Fix up fault in shutdown path. sh: Add EHCI support for SH7786. usb: ehci-hcd: Add support for SuperH EHCI. usb: ohci-sh: Set IRQ as shared.
2010-12-03Merge branch 'for-next' of git://gitorious.org/usb/usb into usb-nextGreg Kroah-Hartman9-15/+20
* 'for-next' of git://gitorious.org/usb/usb: usb: musb: gadget: prevent a NULL pointer dereference usb: musb: add names for IRQs in structure resource usb: musb: remove board_data parameter from musb_platform_init()
2010-12-03usb: g_audio: Fix crash at driver removalRichard Röjfors1-5/+5
If g_audio fails to open the sound control device, it crashes at removal: Insertion: [ 4143.836536] g_audio gadget: unable to open sound control device file: /dev/snd/controlC0 [ 4143.836543] g_audio gadget: we need at least one control device [ 4143.836551] g_audio gadget: Linux USB Audio Gadget, version: Dec 18, 2008 [ 4143.836558] g_audio gadget: g_audio ready Removal: [ 4146.802643] BUG: unable to handle kernel paging request at 00023018 [ 4146.802655] IP: [<c10af9f5>] filp_close+0xa/0x5b [ 4146.802674] *pdpt = 0000000015426001 *pde = 0000000000000000 [ 4146.802684] Oops: 0000 [#1] PREEMPT SMP [ 4146.802692] last sysfs file: /sys/power/state [ 4146.802701] Modules linked in: g_audio(-) ioh_udc fuse asix usbnet [last unloaded: g_audio] [ 4146.802719] [ 4146.802728] Pid: 1394, comm: rmmod Not tainted 2.6.33.5-26.1-ivi #1 To be filled by O.E.M./To be filled by O.E.M. [ 4146.802738] EIP: 0060:[<c10af9f5>] EFLAGS: 00010206 CPU: 0 [ 4146.802746] EIP is at filp_close+0xa/0x5b [ 4146.802753] EAX: 00023000 EBX: 00023000 ECX: 00000046 EDX: df842680 [ 4146.802760] ESI: e071cd4c EDI: df842680 EBP: ddbbbef0 ESP: ddbbbee4 [ 4146.802768] DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068 [ 4146.802776] Process rmmod (pid: 1394, ti=ddbba000 task=dd95a4f0 task.ti=ddbba000) [ 4146.802782] Stack: [ 4146.802787] d540c280 e071cd4c df2bc000 ddbbbefc e071b82c df11e440 ddbbbf04 e071c622 [ 4146.802804] <0> ddbbbf28 e071c47f 00000008 e071cd74 df11e464 df2bc01c df2bc000 e071ce68 [ 4146.802822] <0> 00000880 ddbbbf38 e07fd1b8 e071cef0 00000000 ddbbbf40 e071b9f4 ddbbbf48 [ 4146.802842] Call Trace: [ 4146.802857] [<e071b82c>] ? gaudio_cleanup+0x87/0xe0 [g_audio] [ 4146.802869] [<e071c622>] ? audio_unbind+0x8/0xc [g_audio] [ 4146.802881] [<e071c47f>] ? composite_unbind+0x8d/0xcb [g_audio] [ 4146.802895] [<e07fd1b8>] ? usb_gadget_unregister_driver+0x7b/0xc0 [ioh_udc] [ 4146.802908] [<e071b9f4>] ? usb_composite_unregister+0x15/0x17 [g_audio] [ 4146.802920] [<e071c633>] ? cleanup+0xd/0xf [g_audio] [ 4146.802932] [<c105a938>] ? sys_delete_module+0x185/0x1dd [ 4146.802944] [<c101c3ea>] ? do_page_fault+0x248/0x276 [ 4146.802956] [<c10027d0>] ? sysenter_do_call+0x12/0x26 [ 4146.802962] Code: 12 5f 3a 00 8b 43 04 8b 40 0c 0f b3 30 3b 73 44 73 03 89 73 44 89 f8 e8 f1 61 3a 00 5b 5e 5f 5d c3 55 89 e5 57 89 d7 56 53 89 c3 <8b> 40 18 85 c0 75 0f 68 32 15 5e c1 31 f6 e8 52 39 3a 00 5a eb [ 4146.803058] EIP: [<c10af9f5>] filp_close+0xa/0x5b SS:ESP 0068:ddbbbee4 [ 4146.803071] CR2: 0000000000023018 [ 4146.803112] ---[ end trace 0989a7e023da0434 ]--- This patch makes sure not to assign the_card if gaudio_open_snd_dev fails, since the parent function will deallocate the card. Also make sure all filp's in gaudio_open_snd_dev is assigned NULL upon error and gaudio_close_snd_dev only cleanups when the filp's are non-NULL. Signed-off-by: Richard Röjfors <[email protected]> Cc: David Brownell <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-12-03plat-mxc/ehci.c: fix compile breakageEric Bénard1-2/+2
commits 2eb42d5c287f5e883a4b3ebe668ba880caa351e5 and 9e1dde33876ba83ad586c336647fff133d0f5472 renamed some defines but didn't fix all the places where these defines are used leading to a compile failure for USB on i.MX31, 35 and 27. Signed-off-by: Eric Bénard <[email protected]> Signed-off-by: Sascha Hauer <[email protected]>
2010-12-01usb: musb: gadget: prevent a NULL pointer dereferenceFelipe Balbi1-5/+8
Case we can't allocate struct musb_request, prevent a NULL pointer dereference by returning early. Signed-off-by: Felipe Balbi <[email protected]>
2010-12-01usb: musb: add names for IRQs in structure resourceHema Kalliguddi3-3/+3
Soon resource data will get automatically populated from a set of autogenerated data from TI's hardware database for the OMAP platform. Such database, might not have resources at the expected order by the current drivers. While we could hack in some exceptions to that tool to generate resources in a specific order, it seems less fragile to use the resource name instead. That way, no matter what order the resources are generated, the driver still work. Modified the OMAP, Blackfin and Davinci architecture files to add the name of the IRQs in the resource structures and musb driver to use the platform_get_irq_byname() api to get the device and dma irq numbers instead of using the index. Cc: Tony Lindgren <[email protected]> Acked-by: Kevin Hilman <[email protected]> Acked-by: Mike Frysinger <[email protected]> Signed-off-by: Hema HK <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2010-12-01usb: musb: remove board_data parameter from musb_platform_init()Hema Kalliguddi6-7/+9
Removed the board_data parameter being passed to musb_platform_init function as board_data can be extracted from device structure which is already member of musb structure. Acked-by: Kevin Hilman <[email protected]> Cc: Tony Lindgren <[email protected]> Signed-off-by: Hema HK <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2010-12-01sh: Convert to USB_ARCH_HAS_OHCI/EHCI selects.Paul Mundt1-6/+0
This switches over to selects for the subtypes to enable OHCI/EHCI support explicitly rather than littering the usb Kconfig with subtype dependencies. Suggested-by: David Daney <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2010-11-30Merge branch 'omap4-ehci-for-greg' of ↵Greg Kroah-Hartman3-69/+251
git://dev.omapzoom.org/pub/scm/anand/linux-omap-usb into usb-next * 'omap4-ehci-for-greg' of git://dev.omapzoom.org/pub/scm/anand/linux-omap-usb: omap4: 4430sdp: enable the ehci port on 4430SDP arm: omap4: select USB_ARCH_HAS_EHCI arm: omap4: usb: add platform init code for EHCI arm: omap4: add USBHOST and related base addresses usb: ehci-omap: Add OMAP4 support omap: usb: ehci: introduce HSIC mode usb: ehci-omap: add helpers for checking port mode usb: ehci-omap: use clkdev aliases for functional clocks omap: clock: add clkdev aliases for EHCI clocks usb: ehci: introduce CONFIG_USB_EHCI_HCD_OMAP usb: ehci-omap: don't hard-code TLL channel count usb: ehci-omap: update clock names to be more generic
2010-11-30USB: pxa: Add USB client support for Marvell PXA9xx/PXA168 chipscxie45-0/+2672
This patch add USB client support Marvell PXA9xx/PXA168 chips. The USB controller in PXA9xx/PXA168 is a High-Speed OTG controller. The available endpoints is different between PXA9xx and PXA168. NOTE: It is the first version of Marvell PXA9xx/PXA168 USB controller driver. The support for OTG mode will be added in later patch. PXA9xx and PXA168 has integrated UTMI PHY in the chips. The initialization for the PHY is a little different between PXA9xx and PXA168. Signed-off-by: Chao Xie <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-11-30usb: Add in missing EHCI helpers.Paul Mundt4-0/+10
Several of the EHCI glue drivers either predate or were merged in the same timeframe as API changes at the USB core level, resulting in some missing endpoint_reset and clear_tt_buffer_complete callbacks. This fixes up all of ehci-atmel, mxc, w90x900, and xilinx-of to tie in the new helpers, which brings them in line with everyone else. Reported-by: Alan Stern <[email protected]> Signed-off-by: Paul Mundt <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-11-30usb: gadget: langwell_udc: add usb test mode supportLuo Andy1-0/+23
This patch adds test mode support for Langwell gadget driver. Signed-off-by: Henry Yuan <[email protected]> Signed-off-by: Andy Luo <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-11-30usb: composite gadget: set vbus_draw current limitation during suspendHao Wu1-0/+8
This patch modifies the composite gadget to set vbus_draw current limitation during suspend state. This current limitation in suspend state shouldn't be more than 2.5mA Signed-off-by: Hao Wu <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-11-30usb: otg: twl4030-usb: Fix unbalanced regulator disables at module removalJarkko Nikula1-1/+2
Function twl4030_usb_remove can cause unbalanced regulator disables in twl4030_phy_power if the cable is not connected. Regulator enable/disable calls are in balance only if the twl4030_phy_resume was called prior the twl4030_usb_remove, that is, the cable was connected. Fix this by checking the 'asleep' variable in twl4030_usb_remove since that variable is used to check state in other functions. Signed-off-by: Jarkko Nikula <[email protected]> Cc: Felipe Balbi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-11-30usb-wwan: implement TIOCGSERIAL and TIOCSSERIAL to avoid blocking close(2)Dan Williams3-0/+81
Some devices (ex ZTE 2726) simply don't respond at all when data is sent to some of their USB interfaces. The data gets stuck in the TTYs queue and sits there until close(2), which them blocks because closing_wait defaults to 30 seconds (even though the fd is O_NONBLOCK). This is rarely desired. Implement the standard mechanism to adjust closing_wait and let applications handle it how they want to. Signed-off-by: Dan Williams <[email protected]>
2010-11-30USB: Remove unnecessary casts of void ptr returning alloc function return valuesJesper Juhl1-1/+1
Hi, The [vk][cmz]alloc(_node) family of functions return void pointers which it's completely unnecessary/pointless to cast to other pointer types since that happens implicitly. This patch removes such casts from drivers/usb/ Signed-off-by: Jesper Juhl <[email protected]>
2010-11-30usbmon: correct length for isochronousPete Zaitcev1-3/+31
Usually the usbmon returns the amount of data specified in urb->transfer_buffer_length for output submissions and urb->actual_length for input callbacks. However, for Isochronous input transfers, this is not enough, since the returned data buffer may contain "holes". One easy way to fix this is to use urb->transfer_buffer_length, but this often transfers a whole lot of unused data, so we find how much was actually used instead. Original patch by Márton Németh. See also kernel bug 22182. Signed-off-by: Pete Zaitcev <[email protected]> Signed-off-by: Márton Németh <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-11-30Merge branch 'for-greg' of git://gitorious.org/usb/usb into workGreg Kroah-Hartman3-38/+91
2010-11-30Merge branch 'for-usb-linus' of ↵Greg Kroah-Hartman4-0/+215
git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into work
2010-12-01usb: ehci-omap: Add OMAP4 supportAnand Gadiyar1-42/+212
Update the ehci-omap glue layer to support the controller in the OMAP4. Major differences from OMAP3 is that the OMAP4 has per-port clocking, and supports ULPI output clocking mode. The old input clocking mode is not supported. Also, there are only 2 externally available ports as against 3 in the OMAP3. The third port is internally tied off and should not be used. Signed-off-by: Keshava Munegowda <[email protected]> Signed-off-by: Anand Gadiyar <[email protected]>
2010-12-01usb: ehci-omap: add helpers for checking port modeAnand Gadiyar1-9/+12
Introduce helper functions to test port mode. These checks are performed in several places in the driver, and these helpers improve readability. Signed-off-by: Anand Gadiyar <[email protected]>
2010-12-01usb: ehci-omap: use clkdev aliases for functional clocksAnand Gadiyar1-2/+2
Use the recently updated aliases to get functional clocks needed by the driver. This allows the driver to acquire OMAP4-specific clocks without having to use different clock names for OMAP3 and OMAP4. Signed-off-by: Anand Gadiyar <[email protected]>
2010-12-01usb: ehci: introduce CONFIG_USB_EHCI_HCD_OMAPKeshava Munegowda2-1/+9
Introduce the CONFIG_USB_EHCI_HCD_OMAP option to select EHCI support on OMAP3 and later chips. This scales better than having a long line of dependencies for each new OMAP with EHCI support. Signed-off-by: Keshava Munegowda <[email protected]> Signed-off-by: Anand Gadiyar <[email protected]>
2010-12-01usb: ehci-omap: don't hard-code TLL channel countKeshava Munegowda1-4/+5
Make the TLL channel count a parameter instead of a hardcoded value. This allows us to be flexible with future OMAP revisions which could have a different number of channels. Signed-off-by: Keshava Munegowda <[email protected]> Signed-off-by: Anand Gadiyar <[email protected]>
2010-12-01usb: ehci-omap: update clock names to be more genericKeshava Munegowda1-22/+22
Rename usbhost2_120m_fck to usbhost_hs_fck and usbhost1_48m_fck to usbhost_fs_fck, to better reflect the clocks' functionalities. In OMAP4, the frequencies for the corresponding clocks are not necessarily the same as with OMAP3, however the functionalities are. Signed-off-by: Keshava Munegowda <[email protected]> Signed-off-by: Anand Gadiyar <[email protected]>
2010-11-30USB: fix autosuspend bug in usb-serialAlan Stern1-0/+3
This patch (as1437) fixes a bug in the usb-serial autosuspend handling. Since the usb-serial core now has autosuspend support, it must set the .supports_autosuspend member in every serial driver it registers. Otherwise the usb_autopm_get_interface() call won't work. This fixes Bugzilla #23012. Signed-off-by: Alan Stern <[email protected]> CC: [email protected] Reported-by: Kevin Smith <[email protected]> Reported-and-tested-by: Simon Gerber <[email protected]> Reported-and-tested-by: Matteo Croce <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-11-30USB: ehci: disable LPM and PPCD for nVidia MCP89 chipsBrian J. Tarricone1-0/+12
Tested on MacBookAir3,1. Without this, we get EPROTO errors when fetching device config descriptors. Signed-off-by: Brian Tarricone <[email protected]> Reported-by: Benoit Gschwind <[email protected]> Tested-by: Edgar Hucek <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-11-30USB: serial: ftdi_sio: Vardaan USB RS422/485 converter PID addedJacques Viviers2-0/+4
Add the PID for the Vardaan Enterprises VEUSB422R3 USB to RS422/485 converter. It uses the same chip as the FTDI_8U232AM_PID 0x6001. This should also work with the stable branches for: 2.6.31, 2.6.32, 2.6.33, 2.6.34, 2.6.35, 2.6.36 Signed-off-by: Jacques Viviers <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-11-30USB: yurex: add .llseek fop to file_operationsTomoki Sekiyama1-0/+1
Default llseek operation behavior was changed by the patch named "vfs: make no_llseek the default" after the yurex driver had been merged, so the llseek to yurex is now ignored. This patch add llseek fop with default_llseek to yurex driver to catch up to the change. Signed-off-by: Tomoki Sekiyama <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-11-30USB: ftdi_sio: Add ID for RT Systems USB-29B radio cableMichael Stuermer2-0/+2
Another variant of the RT Systems programming cable for ham radios. Signed-off-by: Michael Stuermer <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-11-29USB: cns3xxx: Add EHCI and OHCI bus glue for cns3xxx SOCsMac Lin6-0/+363
The CNS3XXX SOC has include USB EHCI and OHCI compatible controllers. This patch adds the necessary glue logic to allow ehci-hcd and ohci-hcd drivers to work on CNS3XXX The EHCI and OHCI controllers share a common clock control and reset bit, therefore additional check for the timming of enabling and disabling is required. The USB bit of PLL Power Down Control is also shared by OTG, 24MHzUART clock, Crypto clock, PCIe reference clock, and Clock Scale Generator. Therefore we only ensure it is enabled, while not disabling it. Signed-off-by: Mac Lin <[email protected]> Acked-by: Alan Stern <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Anton Vorontsov <[email protected]>
2010-11-27Merge branch 'cleanup-bd_claim' of ↵Jens Axboe1-5/+2
git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc into for-2.6.38/core
2010-11-26usb: ehci-sh: Add missing ehci helpers.Paul Mundt1-0/+2
The ehci-sh driver was missing tie-ins for endpoint_reset and clear_tt_buffer_complete, add them in. Reported-by: Alan Stern <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2010-11-26usb: ehci-sh: Fix up fault in shutdown path.Paul Mundt1-1/+10
We can't use the generic usb_hcd_platform_shutdown helper on account of the fact we don't stash the hcd pointer in the driver data, so we provide our own shutdown handler. Signed-off-by: Paul Mundt <[email protected]>
2010-11-24Merge branch 'usb-linus' of ↵Linus Torvalds19-48/+151
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6 * 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: USB: EHCI: fix obscure race in ehci_endpoint_disable USB: gadget: AT91: fix typo in atmel_usba_udc driver USB: isp1362-hcd - fix section mismatch warning USB: EHCI: AMD periodic frame list table quirk USB: OTG: langwell_otg: fix up some sysfs attribute permissions USB: misc: usbsevseg: fix up some sysfs attribute permissions USB: misc: usbled: fix up some sysfs attribute permissions USB: misc: trancevibrator: fix up a sysfs attribute permission USB: misc: cypress_cy7c63: fix up some sysfs attribute permissions USB: storage: sierra_ms: fix sysfs file attribute USB: ehci: fix debugfs 'lpm' permissions USB: atm: ueagle-atm: fix up some permissions on the sysfs files xhci: Fix command ring replay after resume. xHCI: fix wMaxPacketSize mask xHCI: release spinlock when setup interrupt xhci: Remove excessive printks with shared IRQs.
2010-11-22usb: musb: do not use dma for control transfersAnand Gadiyar3-0/+9
The Inventra DMA engine used with the MUSB controller in many SoCs cannot use DMA for control transfers on EP0, but can use DMA for all other transfers. The USB core maps urbs for DMA if hcd->self.uses_dma is true. (hcd->self.uses_dma is true for MUSB as well). Split the uses_dma flag into two - one that says if the controller needs to use PIO for control transfers, and another which says if the controller uses DMA (for all other transfers). Also, populate this flag for all MUSB by default. (Tested on OMAP3 and OMAP4 boards, with EHCI and MUSB HCDs simultaneously in use). Signed-off-by: Maulik Mankad <[email protected]> Signed-off-by: Santosh Shilimkar <[email protected]> Signed-off-by: Anand Gadiyar <[email protected]> Cc: Oliver Neukum <[email protected]> Cc: Alan Stern <[email protected]> Cc: Praveena NADAHALLY <[email protected]> Cc: Ajay Kumar Gupta <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2010-11-22usb: musb: gadget: fix compilation warningAjay Kumar Gupta1-0/+2
Fixes below compilation warning when musb driver is compiled for PIO mode: drivers/usb/musb/musb_gadget.c: In function 'musb_g_rx': drivers/usb/musb/musb_gadget.c:840: warning: label 'exit' defined but not used Signed-off-by: Ajay Kumar Gupta <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2010-11-22usb: musb: clear RXCSR_AUTOCLEAR before PIO readMing Lei1-2/+3
If RXCSR_AUTOCLEAR flag is not cleard before PIO reading, one packet may be recieved by musb fifo, but no chance to notify software, so cause packet loss, follows the detailed process: - PIO read one packet - musb fifo auto clear the MUSB_RXCSR_RXPKTRDY - musb continue to recieve the next packet, and MUSB_RXCSR_RXPKTRDY is set - software clear the MUSB_RXCSR_RXPKTRDY, so there is no chance for musb to notify software that the 2nd recieved packet. The patch does fix the g_ether issue below: - use fifo_mode 3 to enable double buffer - 'ping -s 1024 IP_OF_BEAGLE_XM' - one usb packet of 512 byte is lost, so ping failed, which can be observed by wireshark note: Beagle xm takes musb rtl1.8 and may fallback to pio mode for unaligned buffer. Signed-off-by: Ming Lei <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2010-11-22usb: musb: unmap dma buffer when switching to PIOHema Kalliguddi1-38/+79
Buffer is mapped to dma when dma channel is allocated. If, for some reason, dma channel programming fails, musb code will fallback to PIO mode to transfer that request. In that case, we need to unmap the buffer back to CPU. MUSB RTL1.8 and above cannot handle buffers which are not 32bit aligned. That happens to every request sent by g_ether gadget driver. Since the buffer sent was unaligned, we need to fallback to PIO. Because of that, g_ether was failing due to missing buffer unmapping. With this patch and [1] g_ether works fine with all MUSB revisions. Verified with OMAP3630 board, which has MUSB RTL1.8 using g_ether and g_zero. [1] http://www.spinics.net/lists/linux-usb/msg38400.html Signed-off-by: Hema HK <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2010-11-19xhci: Don't let the USB core disable SuperSpeed ports.Sarah Sharp1-0/+7
Disabling SuperSpeed ports is a Very Bad Thing (TM). It disables SuperSpeed terminations, which means that devices will never connect at SuperSpeed on that port. For USB 2.0/1.1 ports, disabling the port meant that the USB core could always get a connect status change later. That's not true with USB 3.0 ports. Do not let the USB core disable SuperSpeed ports. We can't rely on the device speed in the port status registers, since that isn't valid until there's a USB device connected to the port. Instead, we use the port speed array that's created from the Extended Capabilities registers. Signed-off-by: Sarah Sharp <[email protected]> Tested-by: Don Zickus <[email protected]> Cc: [email protected]
2010-11-19xhci: Setup array of USB 2.0 and USB 3.0 ports.Sarah Sharp2-0/+190
An xHCI host controller contains USB 2.0 and USB 3.0 ports, which can occur in any order in the PORTSC registers. We cannot read the port speed bits in the PORTSC registers at init time to determine the port speed, since those bits are only valid when a USB device is plugged into the port. Instead, we read the "Supported Protocol Capability" registers in the xHC Extended Capabilities space. Those describe the protocol, port offset in the PORTSC registers, and port count. We use those registers to create two arrays of pointers to the PORTSC registers, one for USB 3.0 ports, and another for USB 2.0 ports. A third array keeps track of the port protocol major revision, and is indexed with the internal xHCI port number. This commit is a bit big, but it should be queued for stable because the "Don't let the USB core disable SuperSpeed ports" patch depends on it. There is no other way to determine which ports are SuperSpeed ports without this patch. Signed-off-by: Sarah Sharp <[email protected]> Tested-by: Don Zickus <[email protected]> Cc: [email protected]
2010-11-19xhci: Fix reset-device and configure-endpoint commandsPaul Zimmerman1-0/+18
We have been having problems with the USB-IF Gold Tree tests when plugging and unplugging devices from the tree. I have seen that the reset-device and configure-endpoint commands, which are invoked from xhci_discover_or_reset_device() and xhci_configure_endpoint(), will sometimes time out. After much debugging, I determined that the commands themselves do not actually time out, but rather their completion events do not get delivered to the right place. This happens when the command ring has just wrapped around, and it's enqueue pointer is left pointing to the link TRB. xhci_discover_or_reset_device() and xhci_configure_endpoint() use the enqueue pointer directly as their command TRB pointer, without checking whether it's pointing to the link TRB. When the completion event arrives, if the command TRB is pointing to the link TRB, the check against the command ring dequeue pointer in handle_cmd_in_cmd_wait_list() fails, so the completion inside the command does not get signaled. The patch below fixes the timeout problem for me. This should be queued for the 2.6.35 and 2.6.36 stable trees. Signed-off-by: Paul Zimmerman <[email protected]> Signed-off-by: Sarah Sharp <[email protected]> Cc: [email protected]
2010-11-17USB: ce4100: Add support for CE4100 EHCI IP block to EHCI driverDirk Brandewie1-0/+7
This patch adds support for the EHCI IP block present on the Intel CE4100. Signed-off-by: Dirk Brandewie <[email protected]> CC: David Brownell <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-11-17usb: gadget: g_fs: Fix compilation warningMichal Nazarewicz2-40/+40
This commit fixes warning in f_fs.c introduced by "usb: gadget: f_fs: remove custom printk() wrappers": In file included from drivers/usb/gadget/g_ffs.c:64: drivers/usb/gadget/f_fs.c:30:1: warning: "pr_fmt" redefined Signed-off-by: Michal Nazarewicz <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-11-17BKL: remove extraneous #include <smp_lock.h>Arnd Bergmann11-11/+0
The big kernel lock has been removed from all these files at some point, leaving only the #include. Remove this too as a cleanup. Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-11-16USB: improve uses of usb_mark_last_busyAlan Stern3-16/+10
This patch (as1434) cleans up the uses of usb_mark_last_busy() in usbcore. The function will be called when a device is resumed and whenever a usage count is decremented. A call that was missing from the hub driver is added: A hub is used whenever one of its ports gets suspended (this prevents hubs from suspending immediately after their last child). In addition, the call to disable autosuspend support for new devices by default is moved from usb_detect_quirks() (where it doesn't really belong) into usb_new_device() along with all the other runtime-PM initializations. Finally, an extra pm_runtime_get_noresume() is added to prevent new devices from autosuspending while they are being registered. Signed-off-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-11-16USB: use the runtime-PM autosuspend implementationAlan Stern6-110/+13
This patch (as1428) converts USB over to the new runtime-PM core autosuspend framework. One slightly awkward aspect of the conversion is that USB devices will now have two suspend-delay attributes: the old power/autosuspend file and the new power/autosuspend_delay_ms file. One expresses the delay time in seconds and the other in milliseconds, but otherwise they do the same thing. The old attribute can be deprecated and then removed eventually. Signed-off-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-11-16USB: make usb_mark_last_busy use pm_runtime_mark_last_busyMing Lei5-16/+11
Since the runtime-PM core already defines a .last_busy field in device.power, this patch uses it to replace the .last_busy field defined in usb_device and uses pm_runtime_mark_last_busy to implement usb_mark_last_busy. Signed-off-by: Ming Lei <[email protected]> Reviewed-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-11-16USB: use sysfs_merge_group for power attributesAlan Stern1-33/+17
This patch (as1426) makes use of the new sysfs_merge_group() and sysfs_unmerge_group() routines to simplify the handling of power attributes for USB devices. Signed-off-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-11-16USB: use the no_callbacks flag for interfacesMing Lei2-53/+31
Call pm_runtime_no_callbacks to set no_callbacks flag for USB interfaces. Since interfaces cannot be power-managed separately from their parent devices, there's no reason for the runtime-PM core to invoke any callbacks for them. Signed-off-by: Ming Lei <[email protected]> Reviewed-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>