aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'android-omap-3.0' into android-omap-tuna-3.0Iliyan Malchev2011-09-271-77/+56
|\
| * Merge branch 'android-3.0' into android-omap-3.0Iliyan Malchev2011-09-271-77/+56
| |\
| | * usb: otg: Temporarily grab wakelock on charger and disconnect eventsTodd Poynor2011-09-261-77/+56
| | | | | | | | | | | | | | | Change-Id: If995d4af4adcb08e8369009483f2956ad9627267 Signed-off-by: Todd Poynor <toddpoynor@google.com>
* | | Revert "HACK: modem_if: usb: Force enumeration if modem is not responding"Benoit Goby2011-09-251-15/+0
| | | | | | | | | | | | This reverts commit 862603be14597c407d4906684e44e8e9848a1e20.
* | | HACK: modem_if: usb: Force enumeration if modem is not respondingBenoit Goby2011-09-191-0/+15
| | | | | | | | | | | | | | | Change-Id: If5a6dd7dae7f375bba4866b3ac51757de5f26f49 Signed-off-by: Benoit Goby <benoit@android.com>
* | | usb: musb: Enable DMA mode1 RX for USB-Mass-StorageVikram Pandita2011-09-151-12/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch enables the DMA mode1 RX support for endpoints that use BULK transactions. This will result in a throughput increase of around 30-40% for BULK transfers (mass-storage/mtp/ptp usecases) Tested: Mass-storage, MTP, PTP, ADB, RNDIS gadgets Based on Original work by Anand Gadiyar <gadiyar@ti.com> on 2.6.35 kernel Change-Id: Ie372af621aa201a3722b2fb2b4f5ec3d7a0595c5 Signed-off-by: Moiz Sonasath <m-sonasath@ti.com> Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
* | | usb: core: Add NO_RESET_RESUME quirkBenoit Goby2011-09-152-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | If resume fails, usb core will try to reset-resume the device. The LTE modem does not support it. Add a quirk to disable reset-resume retry. Change-Id: I3fab61317702725f95e062ee35eaa148e0138d1f Signed-off-by: Benoit Goby <benoit@android.com>
* | | Merge branch 'android-omap-3.0' into android-omap-tuna-3.0Dima Zavin2011-09-141-13/+20
|\ \ \ | |/ /
| * | Merge branch 'android-3.0' into android-omap-3.0Dima Zavin2011-09-141-13/+20
| |\ \ | | |/
| | * usb: gadget: android: always update the sw_connected stateDima Zavin2011-09-141-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we go through connected->configured->disconnected cycle very quickly, it is possible that we may not generate a disconnect uevent to userspace. Connected+configured could have happened before the work item got executed, and thus would not have updated the sw_connected state. On the disconnect, it would have noticed that a config is no longer there but since sw_connected was still 0, it would not have sent the disconnect event. Change-Id: Id71175f784e3e1cf3f828bd8b24fceea1078a06b Signed-off-by: Dima Zavin <dima@android.com>
| | * usb: gadget: android: dump the uevents sent when changing statesDima Zavin2011-09-141-10/+12
| | | | | | | | | | | | | | | Change-Id: If5011e39f400b3aca036a890b8b932a7606a7ac2 Signed-off-by: Dima Zavin <dima@android.com>
| | * usb: gadget: android: follow proper order on disconnectDima Zavin2011-09-141-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | We should composite_disconnect *before* updating our internal state and sending uevent to userspace. Also, hold cdev->lock while updating internal state. Change-Id: If66a5a4f7d4a102a44aefc3ce4a154a5a1517dcf Signed-off-by: Dima Zavin <dima@android.com>
* | | Merge branch 'android-omap-3.0' into android-omap-tuna-3.0Dima Zavin2011-09-132-10/+37
|\ \ \ | |/ /
| * | Merge branch 'linux-omap-3.0' into android-omap-3.0Dima Zavin2011-09-132-10/+37
| |\ \
| | * | usb: musb: omap2430: process all otg events, not just the latest oneDima Zavin2011-09-132-10/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the omap2430 musb driver just caches the latest otg event and schedules work in its otg notifier. Because of this, it may miss intermediate events and only handle the latest one. This can cause the driver state to become inconsistent since it doesn't store whether or not it has enabled the phy, or did a runtime_pm get, but relies purely on the fact that events occur in the proper order. This patch converts the single work item in musb struct into a singlethreaded workqueue, to which work items for each otg event are allocated and posted. This forces the driver to process every event in order. Ideally, the driver should keep the state of what is enabled so that this is not necessary. Change-Id: I123e40d62424a0e339549e6ff051b423f24c4d08 Signed-off-by: Dima Zavin <dima@android.com>
| | * | usb: musb: omap2+: fix cleanup on errors in init and in exitDima Zavin2011-09-131-0/+2
| | | | | | | | | | | | | | | | | | | | Change-Id: Ida2f6f47a25f527f14a68bdbd8b6e5645c2d65d4 Signed-off-by: Dima Zavin <dima@android.com>
* | | | Merge branch 'android-omap-3.0' into android-omap-tuna-3.0Dima Zavin2011-09-111-0/+59
|\ \ \ \ | |/ / /
| * | | Merge branch 'android-3.0' into android-omap-3.0Dima Zavin2011-09-111-0/+59
| |\ \ \ | | | |/ | | |/|
| | * | usb: otg_id: add suspend/resume interfaceDima Zavin2011-09-111-0/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is possible that while one driver has already suspended, another driver calls otg_id_notify() because it has not yet been suspended. It would then be possible for the suspended driver's detect callback to be called. This is undesirable. Introduce new otg_id_suspend/otg_id_resume functions that keep a suspended count, and if a notification happens while someone is suspended, that notification is deferred until all the drivers are resumed. If the notification happens before the last driver is suspended, that suspend will be aborted and once the final driver resumes through otg_id_resume, the notification will be delivered. Change-Id: I32fd32bec65e366e5f97a25c15255d94773b85b3 Signed-off-by: Dima Zavin <dima@android.com>
* | | | Merge branch 'android-omap-3.0' into android-omap-tuna-3.0Erik Gilling2011-09-071-2/+7
|\ \ \ \ | |/ / /
| * | | Merge remote branch 'pcommon/android-3.0' into android-omap-3.0Erik Gilling2011-09-071-2/+7
| |\ \ \ | | |/ /
| | * | USB: gadget: android: pass ctrl requests to accessory function when disabledMike Lockwood2011-09-071-2/+7
| | | | | | | | | | | | | | | | Signed-off-by: Mike Lockwood <lockwood@android.com>
* | | | Merge branch 'android-omap-3.0' into android-omap-tuna-3.0Iliyan Malchev2011-09-065-0/+44
|\ \ \ \ | |/ / /
| * | | Merge branch 'linux-omap-3.0' into android-omap-3.0Iliyan Malchev2011-09-063-0/+9
| |\ \ \ | | | |/ | | |/|
| | * | usb: musb: fix context api'sVikram Pandita2011-09-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RxFifoSz, TxFifoSz, RxFifoAddr, TxFifoAddr are all indexed registers. So before doing a context save or restore, INDEX register should be set, then only one gets to the right register offset. Change-Id: I33ab09f8c214457914ee848e097880c8800de9e6 Signed-off-by: Vikram Pandita <vikram.pandita@ti.com> Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
| | * | usb: musb: omap2+: save and restore OTG_INTERFSELHema HK2011-09-062-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | we need to save and restore OTG_INTERFSEL register else we will be unable to function on resume after OFF mode. Change-Id: I6c29c69596d5f47e00cf74ab0e32bb44ef71dda9 Reported-by: Devaraj Rangasamy <dev@ti.com> Signed-off-by: Hema HK <hemahk@ti.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
| * | | Merge branch 'android-3.0' into android-omap-3.0Iliyan Malchev2011-09-062-0/+35
| |\ \ \ | | | |/ | | |/|
| | * | usb: ehci: make HC see up-to-date qh/qtd descriptor ASAPMing Lei2011-09-062-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces the helper of ehci_sync_mem to flush qtd/qh into memory immediately on some ARM, so that HC can see the up-to-date qtd/qh descriptor asap. This patch fixs one performance bug on ARM Cortex A9 dual core platform, which has been reported on quite a few ARM machines (OMAP4, Tegra 2, snowball...), see details from link of https://bugs.launchpad.net/bugs/709245. The patch has been tested ok on OMAP4 panda A1 board, and the performance of 'dd' over usb mass storage can be increased from 4~5MB/sec to 14~16MB/sec after applying this patch. Change-Id: I7994c58a1001c7f46f13e09420328a3916bbfcef Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Russell King <linux@arm.linux.org.uk> Signed-off-by: Ming Lei <ming.lei@canonical.com> Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
* | | | HACK: ehci recovery from port resume failureVikram Pandita2011-09-061-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is giving some error-recovery now on the failing device. This patch is not for merge yet Change-Id: I279af9a27220f45e987448f9247393e686df65a0 Signed-off-by: Vikram Pandita <vikram.pandita@ti.com> Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
* | | | HACK: fix ehci suspend/resume failureAnand Gadiyar2011-09-061-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Its observed with some PHY, the 60Mhz clock gets cut too soon for OMAP EHCI, leaving OMAP-EHCI in a bad state. So on starting port suspend, make sure the 60Mhz clock to EHCI is kept alive using an internal clock, so that EHCi can cleanly transition its hw state machine on a port suspend. Its not proven if this is the issue hit on USB3333, but the symptoms look very similar. NOTE: This is core linux file. The right fix is to re-implement the function for ehci-omap and put the fix there. Change-Id: I6f9bd7dbc2c228d882a626a8d41541b8a64d5d8a Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
* | | | Toro: Update USB gadget for DM featuresujin119.kim2011-08-222-0/+322
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Add RNDIS+DM composite for modem logging 2. Add f_dm.c to support DM port Change-Id: I195f7654efe9e0fb5d4b32abd10768605c6cf8cd Signed-off-by: sujin119.kim <sujin119.kim@samsung.com>
* | | | Merge branch 'android-omap-3.0' into android-omap-tuna-3.0Colin Cross2011-08-161-0/+1
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | Conflicts: drivers/usb/musb/musb_gadget.c Change-Id: If663b5cb848e8085fd92758529f2aae8d086ac70
| * | | Merge branch 'linux-omap-3.0' into android-omap-3.0Colin Cross2011-08-163-1/+18
| |\ \ \ | | | |/ | | |/|
| | * | usb: musb: fix pm_runtime calls while atomicVikram Pandita2011-08-162-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | musb pm_runtime_get_sync call happens in interrupt context on cable attach case That can result in re-enabling the interrupts and cause side affects. So move the code to a work queue. Following is the error path hit on cable attach: Backtrace: [<c00518d0>] (dump_backtrace+0x0/0x10c) from [<c0539ae8>] (dump_stack+0x18/0x1c) [<c0539ad0>] (dump_stack+0x0/0x1c) from [<c007bca8>] (__might_sleep+0x108/0x128) [<c007bba0>] (__might_sleep+0x0/0x128) from [<c027f770>] (__pm_runtime_resume+0x90/0x98) [<c027f6e0>] (__pm_runtime_resume+0x0/0x98) from [<c0327a24>] (musb_otg_notifications+0xd4/0x1f4) [<c0327950>] (musb_otg_notifications+0x0/0x1f4) from [<c00adfc0>] (notifier_call_chain+0x4c/0x8c) [<c00adf74>] (notifier_call_chain+0x0/0x8c) from [<c00ae688>] (__atomic_notifier_call_chain+0x40/0x54) [<c00ae648>] (__atomic_notifier_call_chain+0x0/0x54) from [<c00ae6bc>] (atomic_notifier_call_chain+0x20/0x28) Tested with: MUSB Device mode: Cold boot / Hot plug MUSB Host mode: Cold boot / Hot plug Change-Id: Ia05925a71158271ed4882ba1c95e79ae1371b61f Signed-off-by: Vikram Pandita <vikram.pandita@ti.com> Signed-off-by: Moiz Sonasath <m-sonasath@ti.com>
| | * | usb: musb: gadget: avoid runtime pm call in atomic contextVikram Pandita2011-08-161-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid calling runtime pm calls when interrupts are disabled. Fixes the following warning: Backtrace: [<c00520f0>] (dump_backtrace+0x0/0x110) from [<c054f474>] (dump_stack+0x18/0x1c) [<c054f45c>] (dump_stack+0x0/0x1c) from [<c007f59c>] (__might_sleep+0x130/0x134) [<c007f46c>] (__might_sleep+0x0/0x134) from [<c02c2794>] (__pm_runtime_resume+0x94/0x98) [<c02c2700>] (__pm_runtime_resume+0x0/0x98) from [<c0338d90>] (musb_gadget_pullup+0x4c/0x84) [<c0338d44>] (musb_gadget_pullup+0x0/0x84) from [<c034afec>] (android_bind+0x4c/0x2e8) [<c034afa0>] (android_bind+0x0/0x2e8) from [<c03459fc>] (composite_bind+0x130/0x314) [<c03458cc>] (composite_bind+0x0/0x314) from [<c0338e7c>] (usb_gadget_probe_driver+0xb4/0x1e0) [<c0338dc8>] (usb_gadget_probe_driver+0x0/0x1e0) from [<c034da30>] (usb_composite_probe+0x94/0x98) [<c034d99c>] (usb_composite_probe+0x0/0x98) from [<c002a458>] (init+0x188/0x1a4) [<c002a2d0>] (init+0x0/0x1a4) from [<c00475b8>] (do_one_initcall+0x3c/0x18c) [<c004757c>] (do_one_initcall+0x0/0x18c) from [<c0008444>] (kernel_init+0xb0/0x13c) [<c0008394>] (kernel_init+0x0/0x13c) from [<c0094388>] (do_exit+0x0/0x720) Syncing with upstream patch that is queued for 3.1: https://lkml.org/lkml/2011/7/20/357 Change-Id: Ifee0e988e263d3864805a2aff5f371bb8c3a59e5 Signed-off-by: Dan Murphy <dmurphy@ti.com> Signed-off-by: Moiz Sonasath <m-sonasath@ti.com> Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
* | | | Merge branch 'android-omap-3.0' into android-omap-tuna-3.0Colin Cross2011-08-154-6/+53
|\ \ \ \ | |/ / /
| * | | Merge branch 'linux-omap-3.0' into android-omap-3.0Colin Cross2011-08-151-2/+27
| |\ \ \ | | |/ / | | | | | | | | Change-Id: Ibcb7ca7cd55ec1755d1564a9fecd7cc332a884a3
| | * | usb: ehci-omap: control transceiver clockVikram Pandita2011-08-151-2/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow ehci driver to enable/disable any external transceiver clocks as part of USB bus suspend/resume Bus suspend/resume functions are a good place holder to do transceiver power management as the USB bus is going through suspend/resume cycles in these handlers. Change-Id: I7110eed9b321764d882a73944187480f16b637a6 Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
| | * | Merge commit 'v3.0.1' into linux-omap-3.0Colin Cross2011-08-108-50/+84
| | |\ \
| * | \ \ Merge branch 'android-3.0' into android-omap-3.0Colin Cross2011-08-153-4/+26
| |\ \ \ \ | | | |_|/ | | |/| |
| | * | | usb: gadget: android: Only call ctrlrequest callback on enabled functionsMike Lockwood2011-08-121-2/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Mike Lockwood <lockwood@android.com>
| | * | | USB: gadget: android: Use "rndis%d" for RNDIS device name instead of "usb%d"Mike Lockwood2011-08-123-2/+25
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Mike Lockwood <lockwood@android.com>
* | | | | usb: musb: fix pm_runtime calls while atomicVikram Pandita2011-08-112-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | musb pm_runtime_get_sync call happens in intrrupt context on cable attach case That can result in re-enabling the interrupts and cause side affects. So move the code to a work queue. Following is the error path hit on cable attach: Backtrace: [<c00518d0>] (dump_backtrace+0x0/0x10c) from [<c0539ae8>] (dump_stack+0x18/0x1c) [<c0539ad0>] (dump_stack+0x0/0x1c) from [<c007bca8>] (__might_sleep+0x108/0x128) [<c007bba0>] (__might_sleep+0x0/0x128) from [<c027f770>] (__pm_runtime_resume+0x90/0x98) [<c027f6e0>] (__pm_runtime_resume+0x0/0x98) from [<c0327a24>] (musb_otg_notifications+0xd4/0x1f4) [<c0327950>] (musb_otg_notifications+0x0/0x1f4) from [<c00adfc0>] (notifier_call_chain+0x4c/0x8c) [<c00adf74>] (notifier_call_chain+0x0/0x8c) from [<c00ae688>] (__atomic_notifier_call_chain+0x40/0x54) [<c00ae648>] (__atomic_notifier_call_chain+0x0/0x54) from [<c00ae6bc>] (atomic_notifier_call_chain+0x20/0x28) [<c00ae69c>] (atomic_notifier_call_chain+0x0/0x28) from [<c006e128>] (tuna_fsa_usb_detected+0x168/0x1a0) [<c006dfc0>] (tuna_fsa_usb_detected+0x0/0x1a0) from [<c029394c>] (_detected+0x58/0x5c) [<c02938f4>] (_detected+0x0/0x5c) from [<c0293ad4>] (fsa9480_detect_callback+0x184/0x1cc) [<c0293950>] (fsa9480_detect_callback+0x0/0x1cc) from [<c0327f34>] (__otg_id_notify+0x74/0xbc) [<c0327ec0>] (__otg_id_notify+0x0/0xbc) from [<c0327fe8>] (otg_id_init+0x30/0x40) [<c0327fb8>] (otg_id_init+0x0/0x40) from [<c00475a0>] (do_one_initcall+0x44/0x1a4) [<c004755c>] (do_one_initcall+0x0/0x1a4) from [<c0008428>] (kernel_init+0x90/0x138) [<c0008398>] (kernel_init+0x0/0x138) from [<c008faa0>] (do_exit+0x0/0x6e0) Tested with: MUSB Device mode: Cold boot / Hot plug MUSB Host mode: Cold boot / Hot plug Change-Id: Ia05925a71158271ed4882ba1c95e79ae1371b61f Signed-off-by: Vikram Pandita <vikram.pandita@ti.com> Signed-off-by: Moiz Sonasath <m-sonasath@ti.com>
* | | | | usb: musb: gadget: avoid runtime pm call in atomic contextVikram Pandita2011-08-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid calling runtime pm calls when interrupts are disabled. Fixes the following warning: Backtrace: [<c00520f0>] (dump_backtrace+0x0/0x110) from [<c054f474>] (dump_stack+0x18/0x1c) [<c054f45c>] (dump_stack+0x0/0x1c) from [<c007f59c>] (__might_sleep+0x130/0x134) [<c007f46c>] (__might_sleep+0x0/0x134) from [<c02c2794>] (__pm_runtime_resume+0x94/0x98) [<c02c2700>] (__pm_runtime_resume+0x0/0x98) from [<c0338d90>] (musb_gadget_pullup+0x4c/0x84) [<c0338d44>] (musb_gadget_pullup+0x0/0x84) from [<c034afec>] (android_bind+0x4c/0x2e8) [<c034afa0>] (android_bind+0x0/0x2e8) from [<c03459fc>] (composite_bind+0x130/0x314) [<c03458cc>] (composite_bind+0x0/0x314) from [<c0338e7c>] (usb_gadget_probe_driver+0xb4/0x1e0) [<c0338dc8>] (usb_gadget_probe_driver+0x0/0x1e0) from [<c034da30>] (usb_composite_probe+0x94/0x98) [<c034d99c>] (usb_composite_probe+0x0/0x98) from [<c002a458>] (init+0x188/0x1a4) [<c002a2d0>] (init+0x0/0x1a4) from [<c00475b8>] (do_one_initcall+0x3c/0x18c) [<c004757c>] (do_one_initcall+0x0/0x18c) from [<c0008444>] (kernel_init+0xb0/0x13c) [<c0008394>] (kernel_init+0x0/0x13c) from [<c0094388>] (do_exit+0x0/0x720) Syncing with upstream patch that is queued for 3.1: https://lkml.org/lkml/2011/7/20/357 Change-Id: Ic8ca43e46f5c89fe6e813f5330ded39a347308b3 Signed-off-by: Moiz Sonasath <m-sonasath@ti.com> Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
* | | | | Merge branch 'android-omap-3.0' into android-omap-tuna-3.0Colin Cross2011-08-108-50/+84
|\ \ \ \ \ | |/ / / /
| * | | | Merge branch 'android-3.0' into android-omap-3.0Colin Cross2011-08-108-50/+84
| |\ \ \ \ | | |/ / /
| | * | | Merge commit 'v3.0.1' into android-3.0Colin Cross2011-08-108-50/+84
| | |\ \ \ | | | | |/ | | | |/|
| | | * | EHCI: fix direction handling for interrupt data togglesAlan Stern2011-08-042-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit e04f5f7e423018bcec84c11af2058cdce87816f3 upstream. This patch (as1480) fixes a rather obscure bug in ehci-hcd. The qh_update() routine needs to know the number and direction of the endpoint corresponding to its QH argument. The number can be taken directly from the QH data structure, but the direction isn't stored there. The direction is taken instead from the first qTD linked to the QH. However, it turns out that for interrupt transfers, qh_update() gets called before the qTDs are linked to the QH. As a result, qh_update() computes a bogus direction value, which messes up the endpoint toggle handling. Under the right combination of circumstances this causes usb_reset_endpoint() not to work correctly, which causes packets to be dropped and communications to fail. Now, it's silly for the QH structure not to have direct access to all the descriptor information for the corresponding endpoint. Ultimately it may get a pointer to the usb_host_endpoint structure; for now, adding a copy of the direction flag solves the immediate problem. This allows the Spyder2 color-calibration system (a low-speed USB device that sends all its interrupt data packets with the toggle set to 0 and hance requires constant use of usb_reset_endpoint) to work when connected through a high-speed hub. Thanks to Graeme Gill for supplying the hardware that allowed me to track down this bug. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Reported-by: Graeme Gill <graeme@argyllcms.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | | * | EHCI: only power off port if over-current is activeSergei Shtylyov2011-08-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 81463c1d707186adbbe534016cd1249edeab0dac upstream. MAX4967 USB power supply chip we use on our boards signals over-current when power is not enabled; once it's enabled, over-current signal returns to normal. That unfortunately caused the endless stream of "over-current change on port" messages. The EHCI root hub code reacts on every over-current signal change with powering off the port -- such change event is generated the moment the port power is enabled, so once enabled the power is immediately cut off. I think we should only cut off power when we're seeing the active over-current signal, so I'm adding such check to that code. I also think that the fact that we've cut off the port power should be reflected in the result of GetPortStatus request immediately, hence I'm adding a PORTSCn register readback after write... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | | * | usb: musb: restore INDEX register in resume pathAjay Kumar Gupta2011-08-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 3c5fec75e121b21a2eb35e5a6b44291509abba6f upstream. Restoring the missing INDEX register value in musb_restore_context(). Without this suspend resume functionality is broken with offmode enabled. Acked-by: Anand Gadiyar <gadiyar@ti.com> Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>