summaryrefslogtreecommitdiff
path: root/drivers/usb/host
AgeCommit message (Collapse)Author
2011-03-14Revert "tegra: usb: ehci: Handling for hsic phy rx error"Seshendra Gadagottu
This reverts commit 03bc8a7c8aec3ed2c2bbe60442df9d4789975f1f. Revert "tegra: usb: ehci: Error handling for hsic phy rx error" This reverts commit ea85e0c7a3a8a8b70478befb1fd7c9ff1d69821b. Bug 791857 Change-Id: Ied16b58afd572c42eb7cfc77352996b5fafaf4d1 Reviewed-on: http://git-master/r/22737 Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Tested-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
2011-03-02tegra: usb: ehci: Handling for hsic phy rx errortegra-11.2.1Seshendra Gadagottu
Increased timeout values to maximum safe values BUG 791857 Change-Id: Ib3aa2a495391b8cf1e3795759bfe3bb78598839d Reviewed-on: http://git-master/r/21234 Tested-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-by: Shail Dave <sdave@nvidia.com>
2011-03-01tegra: usb: ehci: Error handling for hsic phy rx errorSeshendra Gadagottu
Implementation of recover function for hsic phy rx error. BUG 791857 Change-Id: Iedd16caf8ce61a9fa280ae3f62d4f1475318ee72 Reviewed-on: http://git-master/r/21225 Tested-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2011-02-22tegra: usb: ehci: Enabling interrupts during resumeSeshendra Gadagottu
Fixing the hsic resuem issue by enabling the interrupts on ehci-restart. BUG 790888 Change-Id: Ibdd6e844c2f80d2f3ba0a17266717fea949cc383 Reviewed-on: http://git-master/r/20063 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com>
2011-02-14merging android-tegra-2.6.36 into git-master/linux-2.6/android-tegra-2.6.36Nitin Kumbhar
Conflicts: drivers/usb/host/ehci-tegra.c include/linux/usb.h include/linux/usb/hcd.h Change-Id: I2499459b717e36a2a994af9d7a5ae1ecb5e7ca9c
2011-02-10tegra hsic: Adding USB hsic driver support to K36Seshendra Gadagottu
Adding hsic funtionality to USB2 instance. Add the changes required for hsic functionality and power management. BUG 756184 Change-Id: Ife8a1fc6ea95b15f66d840b1565d858ee25d5ded Reviewed-on: http://git-master/r/15192 Tested-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-by: Michael Hsu <mhsu@nvidia.com> Tested-by: Michael Hsu <mhsu@nvidia.com> Reviewed-by: Shail Dave <sdave@nvidia.com>
2011-02-08USB: ehci: tegra: Align DMA transfers to 32 bytesRobert Morell
The Tegra2 USB controller doesn't properly deal with misaligned DMA buffers, causing corruption. This is especially prevalent with USB network adapters, where skbuff alignment is often in the middle of a 4-byte dword. To avoid this, allocate a temporary buffer for the DMA if the provided buffer isn't sufficiently aligned. Signed-off-by: Robert Morell <rmorell@nvidia.com>
2011-02-04merging android-tegra-2.6.36 into git-master/linux-2.6/android-tegra-2.6.36Nitin Kumbhar
Conflicts: arch/arm/mach-tegra/include/mach/dc.h drivers/video/tegra/dc/hdmi.c drivers/video/tegra/host/nvhost_acm.c Change-Id: Iddf74984cc02f08dca3738967c0580ba7c375337
2011-01-28merging android-tegra-2.6.36 into git-master/linux-2.6/android-tegra-2.6.36Nitin Kumbhar
Conflicts: arch/arm/mach-tegra/tegra2_dvfs.c Change-Id: I3853d668107c191c94f731256a8d0b63149e8279
2011-01-27usb: host: tegra: Fix SetPortFeature PORT_SUSPENDBenoit Goby
This fixes a regression where hubs cannot detect new devices once they have been auto-suspended. Change-Id: I4b3efcaa9634b9a912060e438527000bbc83dc32 Signed-off-by: Benoit Goby <benoit@android.com> Reviewed-on: http://git-master/r/16710 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com>
2011-01-27usb: host: tegra: Fix resuming low speed devices from lp0Benoit Goby
Change-Id: I9576853bbe0fae52c5c2cfab26ce8f2017077d4e Signed-off-by: Benoit Goby <benoit@android.com> Reviewed-on: http://git-master/r/16709 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com>
2011-01-25usb: host: tegra: Request 400MHz emc clockBenoit Goby
while USB is active to eliminate all USB buffer underruns. Change-Id: I9977224601e715e950284708958be98d37b3e6b1 Signed-off-by: Nathan Connell <w14185@motorola.com>
2011-01-20usb: host: tegra: Enable emc clock while usb is resumedBenoit Goby
Change-Id: I03a102f40134686fabbd5cfa1830816a691cf876 Signed-off-by: Benoit Goby <benoit@android.com>
2011-01-18usb: host: tegra: Fix SetPortFeature PORT_SUSPENDBenoit Goby
This fixes a regression where hubs cannot detect new devices once they have been auto-suspended. Change-Id: I4b3efcaa9634b9a912060e438527000bbc83dc32 Signed-off-by: Benoit Goby <benoit@android.com>
2011-01-18usb: host: tegra: Fix resuming low speed devices from lp0Benoit Goby
Change-Id: I9576853bbe0fae52c5c2cfab26ce8f2017077d4e Signed-off-by: Benoit Goby <benoit@android.com>
2011-01-10merging android-tegra-2.6.36 into git-master/linux-2.6/android-tegra-2.6.36Nitin Kumbhar
Conflicts: arch/arm/mach-tegra/fuse.c drivers/misc/Makefile Change-Id: I300b925d78b31efe00c342190d8dbd50e2e81230
2011-01-09usb: ehci: tegra: continues driving FS-J during resumeJay Cheng
To prevent USB glitch. Also only program PTC bits when resume from LP0 Change-Id: Iced668e33f986828d3a483b411055948b5b257e1 Signed-off-by: Jay Cheng <jacheng@nvidia.com>
2011-01-09usb: ehci: tegra: remove reschedule rh_timerJay Cheng
Reschedule rh_timer may cause usb device resume fail, as rh_timer may be timeout and send USB_REQ_GET_STATUS SETUP control transfer by the time when the device is handling clear suspend feature, which in turn the device may drop clear suspend feature request. Actually on port resume case, the host driver don't need to reschedule rh_timer to check port status. The host driver will check port status right after suspend feature is cleared. Change-Id: I6205e97af49ed4349b6215b851f6b5f1394258d8 Signed-off-by: Jay Cheng <jacheng@nvidia.com>
2011-01-07Merge commit 'v2.6.36.3' into linux-tegra-2.6.36Colin Cross
2011-01-07xhci: Fix issue with port array setup and buggy hosts.Sarah Sharp
commit f8bbeabc34aa945ab4275abc9a4dfde0aea798ca upstream. Fix two bugs with the port array setup. The first bug will only show up with broken xHCI hosts with Extended Capabilities registers that have duplicate port speed entries for the same port. The idea with the original code was to set the port_array entry to -1 if the duplicate port speed entry said the port was a different speed than the original port speed entry. That would mean that later, the port would not be exposed to the USB core. Unfortunately, I forgot a continue statement, and the port_array entry would just be overwritten in the next line. The second bug would happen if there are conflicting port speed registers (so that some entry in port_array is -1), or one of the hardware port registers was not described in the port speed registers (so that some entry in port_array is 0). The code that sets up the usb2_ports array would accidentally claim those ports. That wouldn't really cause any user-visible issues, but it is a bug. This patch should go into the stable trees that have the port array and USB 3.0 port disabling prevention patches. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-06usb: host: tegra: Fix enumeration after lp0Benoit Goby
Fix enumeration when a device is plugged while the host is in lp0 state. Change-Id: Idb491f347172daac8a5603ed098b422b15cc534e Signed-off-by: Benoit Goby <benoit@android.com>
2011-01-04usb: host: tegra: Fix a possible int storm on resume from lp0Benoit Goby
usbcore will reenable usb interrupts later once the bus has been resumed. Change-Id: If78088bc86710f50293d84234d764655f4bba979 Signed-off-by: Benoit Goby <benoit@android.com>
2011-01-03merging android-tegra-2.6.36 into git-master/linux-2.6/android-tegra-2.6.36Nitin Kumbhar
Change-Id: I0c8b3e31cf0e02661c69afce7795c163e103aac6
2010-12-28usb: ehci: tegra: Don't change the hcd state on restartBenoit Goby
usbcore will change it once the bus has been resumed. This fixes the "hub 3-0:1.0: activate --> -22" error on resume. Change-Id: Icff283a60634b4d003e77aafb5a5127d415cbd3f Signed-off-by: Benoit Goby <benoit@android.com>
2010-12-23merging android-tegra-2.6.36 into git-master/linux-2.6/android-tegra-2.6.36Nitin Kumbhar
Conflicts: arch/arm/mach-tegra/board-ventana-power.c drivers/mfd/tps6586x.c Change-Id: Ic8c46d4251d6e71fa2900b7e876f87e256299bc4
2010-12-21Merge commit 'v2.6.36.2' into linux-tegra-2.6.36Colin Cross
2010-12-17USB: ehci: tegra: Align DMA transfers to 32 bytesRobert Morell
The Tegra2 USB controller doesn't properly deal with misaligned DMA buffers, causing corruption. This is especially prevalent with USB network adapters, where skbuff alignment is often in the middle of a 4-byte dword. To avoid this, allocate a temporary buffer for the DMA if the provided buffer isn't sufficiently aligned. Change-Id: Ica56c52c3b2152e3ba2b96506cf15105462a0602 Signed-off-by: Robert Morell <rmorell@nvidia.com> Reviewed-on: http://git-master/r/13382 Reviewed-by: Scott Williams <scwilliams@nvidia.com> Reviewed-by: Janne Hellsten <jhellsten@nvidia.com>
2010-12-15merging android-tegra-2.6.36 into git-master/linux-2.6/android-tegra-2.6.36Nitin Kumbhar
Change-Id: I84ac6254ede2e88e8141e6ffd630eb753d9b1d91
2010-12-10merging android-tegra-2.6.36 into git-master/linux-2.6/android-tegra-2.6.36Nitin Kumbhar
Change-Id: I1312ec33ba8bac38dc395d7d1a2f485b13d74c14
2010-12-09usb: host: tegra: Remove clear PORT_RESUME to clear PORT_SUSPENDJay Cheng
PORT_SUSPEND bit will be cleared by the host controller when PORT_RESUME change to 0. Change-Id: I94a72f51be1cebee414f11ace89a7e8b3249278d Signed-off-by: Jay Cheng <jacheng@nvidia.com>
2010-12-09USB: ehci: disable LPM and PPCD for nVidia MCP89 chipsBrian J. Tarricone
commit a85b4e7f4481c5a1ca89fa63c9c871151965075e upstream. Tested on MacBookAir3,1. Without this, we get EPROTO errors when fetching device config descriptors. Signed-off-by: Brian Tarricone <brian@tarricone.org> Reported-by: Benoit Gschwind <gschwind@gnu-log.net> Tested-by: Edgar Hucek <gimli@dark-green.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-09USB: EHCI: fix obscure race in ehci_endpoint_disableAlan Stern
commit 02e2c51ba3e80acde600721ea784c3ef84da5ea1 upstream. This patch (as1435) fixes an obscure and unlikely race in ehci-hcd. When an async URB is unlinked, the corresponding QH is removed from the async list. If the QH's endpoint is then disabled while the URB is being given back, ehci_endpoint_disable() won't find the QH on the async list, causing it to believe that the QH has been lost. This will lead to a memory leak at best and quite possibly to an oops. The solution is to trust usbcore not to lose track of endpoints. If the QH isn't on the async list then it doesn't need to be taken off the list, but the driver should still wait for the QH to become IDLE before disabling it. In theory this fixes Bugzilla #20182. In fact the race is so rare that it's not possible to tell whether the bug is still present. However, adding delays and making other changes to force the race seems to show that the patch works. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Reported-by: Stefan Richter <stefanr@s5r6.in-berlin.de> CC: David Brownell <david-b@pacbell.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-09USB: ehci: fix debugfs 'lpm' permissionsGreg Kroah-Hartman
commit 723b991a62d94f74c9f19abd3da6e937288eb969 upstream. The permissions for the lpm debugfs file is incorrect, this fixes it. Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Cc: Alek Du <alek.du@intel.com> Cc: Jacob Pan <jacob.jun.pan@intel.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-09USB: ohci-jz4740: Fix spelling in MODULE_ALIASStefan Weil
commit 1c0a38038e8fcfaa6b5a81d53a4898f3f939f582 upstream. platfrom -> platform Cc: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Reviewed-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-09xhci: Don't let the USB core disable SuperSpeed ports.Sarah Sharp
commit 6dd0a3a7e0793dbeae1b951f091025d8cf896cb4 upstream. 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 <sarah.a.sharp@linux.intel.com> Tested-by: Don Zickus <dzickus@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-09xhci: Setup array of USB 2.0 and USB 3.0 ports.Sarah Sharp
commit da6699ce4a889c3795624ccdcfe7181cc89f18e8 upstream. 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 <sarah.a.sharp@linux.intel.com> Tested-by: Don Zickus <dzickus@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-09xhci: Fix reset-device and configure-endpoint commandsPaul Zimmerman
commit 7a3783efffc7bc2e702d774e47fad5b8e37e9ad1 upstream. 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 <paulz@synopsys.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-09xHCI: fix wMaxPacketSize maskAndiry Xu
commit dc07c91b9b4067022210e68d914a6890a4d70622 upstream. USB2.0 spec 9.6.6 says: For all endpoints, bit 10..0 specify the maximum packet size(in bytes). So the wMaxPacketSize mask should be 0x7ff rather than 0x3ff. This patch should be queued for the stable tree. The bug in xhci_endpoint_init() was present as far back as 2.6.31, and the bug in xhci_get_max_esit_payload() was present when the function was introduced in 2.6.34. Reported-by: Sander Eikelenboom <linux@eikelenboom.it> Signed-off-by: Andiry Xu <andiry.xu@amd.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-09xhci: Remove excessive printks with shared IRQs.Sarah Sharp
commit 241b652f1995de138106afd2f2e4eda9f8a3c240 upstream. If the xHCI host controller shares an interrupt line with another device, the xHCI driver needs to check if the interrupt was generated by its hardware. Unfortunately, the user will see a ton of "Spurious interrupt." lines if the other hardware interrupts often. Lawrence found his dmesg output cluttered with this output when the xHCI host shared an interrupt with his i915 hardware. Remove the warning, as sharing an interrupt is a normal thing. This should be applied to the 2.6.36 stable tree. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Reported-by: Lawrence Rust <lvr@softsystem.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-09usb: ehci: Reduce overhead of the scan_periodic loopBenoit Goby
scan_periodic is called with irq disabled. Merged Alan Stern's patch to reduce the overhead of scan_periodic: http://article.gmane.org/gmane.linux.usb.general/37441 Here is a patch which ought to reduce the overhead of the loop. It avoids doing the expensive call to qh_completions() more than once for each qh. Change-Id: I218c75a1ce21edd3d58c7e8abd3e7f75880b6ad0 Signed-off-by: Benoit Goby <benoit@android.com>
2010-12-03Revert "usb: host: tegra: Remove programing PTC bits based on bus speed."Benoit Goby
This reverts commit 91e80b79243c1b6341c1a8d6e8e5e872b837bfea. This is needed to resume usb from lp0
2010-12-03merging android-tegra-2.6.36 into git-master/linux-2.6/android-tegra-2.6.36Nitin Kumbhar
Change-Id: I7299b3bed83fbf41f5666724e328980cfcda1186
2010-11-29usb: host: tegra: Reduce busy polling durationJay Cheng
Change-Id: I63e271409818e33b4c19bb99b00e556bc5a2a4b3 Signed-off-by: Jay Cheng <jacheng@nvidia.com>
2010-11-26merging android-tegra-2.6.36 into git-master/linux-2.6/android-tegra-2.6.36Nitin Kumbhar
Change-Id: Id26b47f3db282d85af7b88234c3b0bd336a0af48
2010-11-24usb: host: tegra: protect bus suspend with CONFIG_PMAllen Martin
Protect the bus suspend/resume functions behind #ifdef CONFIG_PM. This prevents a compile error if CONFIG_PM is turned off. Signed-off-by: Allen Martin <amartin@nvidia.com> Signed-off-by: Colin Cross <ccross@android.com>
2010-11-23merging android-tegra-2.6.36 into git-master/linux-2.6/android-tegra-2.6.36Nitin Kumbhar
Change-Id: Ibd208fc6b803bbf729d1f554839ebaee8c8461ce
2010-11-22usb: host: tegra: rewrite usb suspend/resume routine.Jay Cheng
Tegra host controller will time the resume operation to clear the bit when the port control state switches to HS or FS Idle. This behavior is different from EHCI where the host controller driver is required to set this bit to a zero after the resume duration is timed in the driver. Poll PORT_SUSPEND bit till the suspend is completed. Write PORT_RESUME to 0 to clear PORT_SUSPEND bit. Disable disconnect detection during resume. Change-Id: I30a45dc7e7a87773a93c128877d0f0827e5d44b7 Signed-off-by: Jay Cheng <jacheng@nvidia.com>
2010-11-22usb: r8a66597-hcd: Change mistake of the outsw functionNobuhiro Iwamatsu
commit ac9dfe9cdda4eb42ecaa9f13b0fee518e0b6518e upstream. Some functions changed by 1c98347e613bf17ea2f18c9766ce0ab77f65a96d. However, There was a change mistake of the function (outsw). Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> CC: Paul Mundt <lethal@linux-sh.org> Acked-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-18Merge branch android-tegra-2.6.36 into git-master/linux-2.6/android-tegra-2.6.36Nitin Kumbhar
Change-Id: Ib01f171e7159768fc5ed3509b5a3e0b987dc57ef
2010-11-15usb: host: tegra: Remove programing PTC bits based on bus speed.Jay Cheng
Program PTC bits as NORMAL_OP is enough when resume. Change-Id: I229eb3ef2ebaff72d023179502ec7a8904e87682 Signed-off-by: Jay Cheng <jacheng@nvidia.com>