1. 25 5月, 2015 1 次提交
  2. 08 4月, 2015 1 次提交
  3. 10 1月, 2015 1 次提交
  4. 26 11月, 2014 1 次提交
  5. 04 11月, 2014 1 次提交
  6. 24 9月, 2014 1 次提交
  7. 20 9月, 2014 1 次提交
  8. 27 2月, 2014 1 次提交
  9. 04 12月, 2013 3 次提交
  10. 20 10月, 2013 1 次提交
  11. 15 10月, 2013 1 次提交
    • A
      USB: EHCI: create per-TT bandwidth tables · b35c5009
      Alan Stern 提交于
      This patch continues the scheduling changes in ehci-hcd by adding a
      table to store the bandwidth allocation below each TT.  This will
      speed up the scheduling code, as it will no longer need to read
      through the entire schedule to compute the bandwidth currently in use.
      
      Properly speaking, the FS/LS budget calculations should be done in
      terms of full-speed bytes per microframe, as described in the USB-2
      spec.  However the driver currently uses microseconds per microframe,
      and the scheduling code isn't robust enough at this point to change
      over.  For the time being, we leave the calculations as they are.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b35c5009
  12. 12 10月, 2013 3 次提交
    • A
      USB: EHCI: use a bandwidth-allocation table · d0ce5c6b
      Alan Stern 提交于
      This patch significantly changes the scheduling code in ehci-hcd.
      Instead of calculating the current bandwidth utilization by trudging
      through the schedule and adding up the times used by the existing
      transfers, we will now maintain a table holding the time used for each
      of 64 microframes.  This will drastically speed up the bandwidth
      computations.
      
      In addition, it eliminates a theoretical bug.  An isochronous endpoint
      may have bandwidth reserved even at times when it has no transfers
      listed in the schedule.  The table will keep track of the reserved
      bandwidth, whereas adding up entries in the schedule would miss it.
      
      As a corollary, we can keep bandwidth reserved for endpoints even
      when they aren't in active use.  Eventually the bandwidth will be
      reserved when a new alternate setting is installed; for now the
      endpoint's reservation takes place when its first URB is submitted.
      
      A drawback of this approach is that transfers with an interval larger
      than 64 microframes will have to be charged for bandwidth as though
      the interval was 64.  In practice this shouldn't matter much;
      transfers with longer intervals tend to be rather short anyway (things
      like hubs or HID devices).
      
      Another minor drawback is that we will keep track of two different
      period and phase values: the actual ones and the ones used for
      bandwidth allocation (which are limited to 64).  This adds only a
      small amount of overhead: 3 bytes for each endpoint.
      
      The patch also adds a new debugfs file named "bandwidth" to display
      the information stored in the new table.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d0ce5c6b
    • A
      USB: EHCI: create a "periodic schedule info" struct · ffa0248e
      Alan Stern 提交于
      This patch begins the process of unifying the scheduling parameters
      that ehci-hcd uses for interrupt and isochronous transfers.  It
      creates an ehci_per_sched structure, which will be stored in both
      ehci_qh and ehci_iso_stream structures, and will contain the common
      scheduling information needed for both.
      
      Initially we merely create the new structure and move some existing
      fields into it.  Later patches will add more fields and utilize these
      structures in improved scheduling algorithms.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ffa0248e
    • A
      USB: EHCI: change toggle only upon successful reset · 27c4a31d
      Alan Stern 提交于
      ehci-hcd uses a value of 0 in an endpoint's toggle flag to indicate
      that the endpoint has been reset (and therefore the Data Toggle bit
      needs to be cleared in the endpoint's QH overlay region).
      
      The toggle flag should be set to 0 only when ehci_endpoint_reset()
      succeeds.  This patch moves the usb_settoggle() call into the
      appropriate branch of the "if" statement.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      27c4a31d
  13. 27 9月, 2013 1 次提交
  14. 24 9月, 2013 1 次提交
  15. 18 9月, 2013 1 次提交
  16. 31 8月, 2013 2 次提交
  17. 13 8月, 2013 3 次提交
    • M
      USB: EHCI: support running URB giveback in tasklet context · 428aac8a
      Ming Lei 提交于
      All 4 transfer types can work well on EHCI HCD after switching to run
      URB giveback in tasklet context, so mark all HCD drivers to support
      it.
      
      Also we don't need to release ehci->lock during URB giveback any more.
      
      >From below test results on 3 machines(2 ARM and one x86), time
      consumed by EHCI interrupt handler droped much without performance
      loss.
      
      1 test description
      1.1 mass storage performance test:
      - run below command 10 times and compute the average performance
      
          dd if=/dev/sdN iflag=direct of=/dev/null bs=200M count=1
      
      - two usb mass storage device:
      A: sandisk extreme USB 3.0 16G(used in test case 1 & case 2)
      B: kingston DataTraveler G2 4GB(only used in test case 2)
      
      1.2 uvc function test:
      - run one simple capture program in the below link
      
         http://kernel.ubuntu.com/~ming/up/capture.c
      
      - capture format 640*480 and results in High Bandwidth mode on the
      uvc device: Z-Star 0x0ac8/0x3450
      
      - on T410(x86) laptop, also use guvcview to watch video capture/playback
      
      1.3 about test2 and test4
      - both two devices involved are tested concurrently by above test items
      
      1.4 how to compute irq time(the time consumed by ehci_irq)
      - use trace points of irq:irq_handler_entry and irq:irq_handler_exit
      
      1.5 kernel
      3.10.0-rc3-next-20130528
      
      1.6 test machines
      Pandaboard A1: ARM CortexA9 dural core
      Arndale board: ARM CortexA15 dural core
      T410: i5 CPU 2.67GHz quad core
      
      2 test result
      2.1 test case1: single mass storage device performance test
      --------------------------------------------------------------------
      		upstream 		| patched
      		perf(MB/s)+irq time(us)	| perf(MB/s)+irq time(us)
      --------------------------------------------------------------------
      Pandaboard A1:  25.280(avg:145,max:772)	| 25.540(avg:14, max:75)
      Arndale board:  29.700(avg:33, max:129)	| 29.700(avg:10,  max:50)
      T410: 		34.430(avg:17, max:154*)| 34.660(avg:12, max:155)
      ---------------------------------------------------------------------
      
      2.2 test case2: two mass storage devices' performance test
      --------------------------------------------------------------------
      		upstream 			| patched
      		perf(MB/s)+irq time(us)		| perf(MB/s)+irq time(us)
      --------------------------------------------------------------------
      Pandaboard A1:  15.840/15.580(avg:158,max:1216)	| 16.500/16.160(avg:15,max:139)
      Arndale board:  17.370/16.220(avg:33 max:234)	| 17.480/16.200(avg:11, max:91)
      T410: 		21.180/19.820(avg:18 max:160)	| 21.220/19.880(avg:11, max:149)
      ---------------------------------------------------------------------
      
      2.3 test case3: one uvc streaming test
      - uvc device works well(on x86, luvcview can be used too and has
      same result with uvc capture)
      --------------------------------------------------------------------
      		upstream 		| patched
      		irq time(us)		| irq time(us)
      --------------------------------------------------------------------
      Pandaboard A1:  (avg:445, max:873)	| (avg:33, max:44)
      Arndale board:  (avg:316, max:630)	| (avg:20, max:27)
      T410: 		(avg:39,  max:107)	| (avg:10, max:65)
      ---------------------------------------------------------------------
      
      2.4 test case4: one uvc streaming plus one mass storage device test
      --------------------------------------------------------------------
      		upstream 		| patched
      		perf(MB/s)+irq time(us)	| perf(MB/s)+irq time(us)
      --------------------------------------------------------------------
      Pandaboard A1:  20.340(avg:259,max:1704)| 20.390(avg:24, max:101)
      Arndale board:  23.460(avg:124,max:726)	| 23.370(avg:15, max:52)
      T410: 		28.520(avg:27, max:169)	| 28.630(avg:13, max:160)
      ---------------------------------------------------------------------
      
      2.5 test case5: read single mass storage device with small transfer
      - run below command 10 times and compute the average speed
      
       dd if=/dev/sdN iflag=direct of=/dev/null bs=4K count=4000
      
      1), test device A:
      --------------------------------------------------------------------
      		upstream 		| patched
      		perf(MB/s)+irq time(us)	| perf(MB/s)+irq time(us)
      --------------------------------------------------------------------
      Pandaboard A1:  6.5(avg:21, max:64)	| 6.5(avg:10, max:24)
      Arndale board:  8.13(avg:12, max:23)	| 8.06(avg:7,  max:17)
      T410: 		6.66(avg:13, max:131)   | 6.84(avg:11, max:149)
      ---------------------------------------------------------------------
      
      2), test device B:
      --------------------------------------------------------------------
      		upstream 		| patched
      		perf(MB/s)+irq time(us)	| perf(MB/s)+irq time(us)
      --------------------------------------------------------------------
      Pandaboard A1:  5.5(avg:21,max:43)	| 5.49(avg:10, max:24)
      Arndale board:  5.9(avg:12, max:22)	| 5.9(avg:7, max:17)
      T410: 		5.48(avg:13, max:155)	| 5.48(avg:7, max:140)
      ---------------------------------------------------------------------
      
      * On T410, sometimes read ehci status register in ehci_irq takes more
      than 100us, and the problem has been reported on the link:
      
      	http://marc.info/?t=137065867300001&r=1&w=2Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NMing Lei <ming.lei@canonical.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      428aac8a
    • M
      USB: EHCI: improve interrupt qh unlink · 9118f9eb
      Ming Lei 提交于
      ehci-hcd currently unlinks an interrupt QH when it becomes empty, that
      is, after its last URB completes.  This works well because in almost
      all cases, the completion handler for an interrupt URB resubmits the
      URB; therefore the QH doesn't become empty and doesn't get unlinked.
      
      When we start using tasklets for URB completion, this scheme won't work
      as well.  The resubmission won't occur until the tasklet runs, which
      will be some time after the completion is queued with the tasklet.
      During that delay, the QH will be empty and so will be unlinked
      unnecessarily.
      
      To prevent this problem, this patch adds a 5-ms time delay before empty
      interrupt QHs are unlinked.  Most often, during that time the interrupt
      URB will be resubmitted and thus we can avoid unlinking the QH.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NMing Lei <ming.lei@canonical.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9118f9eb
    • M
      USB: EHCI: improve ehci_endpoint_disable · 35371e4f
      Ming Lei 提交于
      The patch does the below improvement:
      
      - think QH_STATE_COMPLETING as unlinking state since all URBs on the
      endpoint should be in unlinking or unlinked when doing endpoint_disable()
      
      - add "WARN_ON(!list_empty(&qh->qtd_list));" if qh->qh_state is
      QH_STATE_LINKED because there shouldn't be any active transfer in qh
      
      - when qh->qh_state is QH_STATE_LINKED, the QH(async or periodic)
      should be in its corresponding list, so the search through the async
      list isn't necessary.
      
      - unlink periodic QH to speed up unlinking if the QH is in linked
      state
      
      Basically, only the last one is related with this patchset because
      the assumption of "periodic qh self-unlinks on empty" isn't true
      any more when we introduce unlink-wait for periodic qh.
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NMing Lei <ming.lei@canonical.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      35371e4f
  18. 18 6月, 2013 2 次提交
  19. 17 5月, 2013 1 次提交
  20. 18 4月, 2013 1 次提交
  21. 09 4月, 2013 5 次提交
    • M
      USB: EHCI: make ehci-msm a separate driver · 8c68e84f
      Manjunath Goudar 提交于
      Separate the  Qualcomm QSD/MSM on-chip host controller driver from
      ehci-hcd host code so that it can be built as a separate driver module.
      This work is part of enabling multi-platform kernels on ARM;
      however, note that other changes are still needed before Qualcomm QSD/MSM
      can be booted with a multi-platform kernel, which is not expected before
      3.11.
      
      With the infrastructure added by Alan Stern in patch 3e023203
      "USB: EHCI: prepare to make ehci-hcd a library module", we can
      avoid this problem by turning a bus glue into a separate
      module, as we do here for the msm bus glue.
      
      In V5 (arnd):
       - add FIXME about missing usb_add_hcd() or usb_remove_hcd() calls
      
      In V3:
       - Detailed commit message added here describing why this patch is required.
       - Arranged  #include's in alphabetical order.
       - driver.name initialized hcd_name[] = "ehci-msm" in platform_driver
         structure initialization instead of "msm-ehci", which was the reason
         why it broke in EHCI USB testing
      
      In V2:
      Tegra patch related changes removed from this patch.
      Signed-off-by: NManjunath Goudar <manjunath.goudar@linaro.org>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Acked-by: NDavid Brown <davidb@codeaurora.org>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8c68e84f
    • M
      USB: EHCI: make ehci-atmel a separate driver · 97736961
      Manjunath Goudar 提交于
      Separate the Atmel host controller driver from ehci-hcd host code
      so that it can be built as a separate driver module.
      This work is part of enabling multi-platform kernels on ARM;
      however, note that other changes are still needed before Atmel can be
      booted with a multi-platform kernel. This is currently planned for
      Linux-3.11.
      
      With the infrastructure added by Alan Stern in patch 3e023203
      "USB: EHCI: prepare to make ehci-hcd a library module", we can
      avoid this problem by turning a bus glue into a separate
      module, as we do here for the Atmel bus glue.
      
      In V4 (arnd):
       - reordered #include statements.
       - removed call to ehci_shutdown and the corresponding export
      
      In V3:
       - Detailed commit message added here about why this patch is required.
       - Replaced hcd_name string "ehci-atmel" to "atmel-ehci".
       - Inserted blank line in the Makefile to separate the EHCI drivers from
         the following non-EHCI drivers.
       - Exported ehci_shutdown symbol as it is needed by the Atmel driver.
       - Eliminated ehci_atmel_setup routine because hcd registers
         can be directly set in the ehci_atmel_drv_probe function.
      
      In V2:
        Resolved below compiler error.
        drivers/usb/host/ehci-atmel.c: In function 'ehci_atmel_drv_remove':
        drivers/usb/host/ehci-atmel.c:167: error: implicit declaration of function 'ehci_shutdown'
      Signed-off-by: NManjunath Goudar <manjunath.goudar@linaro.org>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Acked-by: NNicolas Ferre <nicolas.ferre@atmel.com>
      Cc: Andrew Victor <linux@maxim.org.za>
      Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      97736961
    • M
      USB: EHCI: make ehci-s5p a separate driver · 7edb3daf
      Manjunath Goudar 提交于
      Separate the  Samsung S5P/EXYNOS host controller driver from ehci-hcd
      host code so that it can be built as a separate driver module.
      This work is part of enabling multi-platform kernels on ARM;
      however, note that other changes are still needed before S5P/EXYNOS can
      be booted with a multi-platform kernel. We currently expect those
      to get merged for 3.10.
      
      With the infrastructure added by Alan Stern in patch 3e023203
      "USB: EHCI: prepare to make ehci-hcd a library module", we can
      avoid this problem by turning a bus glue into a separate
      module, as we do here for the s5p bus glue.
      
      In V4 (arnd)
       - revert some of the pointless changes.
       - fix allocation of s5p specific data structure.
      
      In V3:
       - Detailed commit message added here, why this patch is required.
       - MODULE_LICENSE is GPL v2.
       - Added .extra_priv_size to eliminate the separate allocation of
         the s5p_ehci_hcd structure and removed .reset function pointer
         initialization.
       - Arranged  #include's in alphabetical order.
       - After using extra_priv_size initialization, struct usb_hcd *hcd
         is redundant and can be removed from the probe function.
       - Eliminated s5p_ehci_phy_enable,contents of statements moved
         into the s5p_ehci_probe
       - Eliminated s5p_ehci_phy_disable, contents of statements moved into
         the s5p_ehci_remove.
      
      In V2:
       - Tegra patch related changes removed from this patch.
      Signed-off-by: NManjunath Goudar <manjunath.goudar@linaro.org>
      Acked-by: NJingoo Han <jg1.han@samsung.com>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Cc: Kukjin Kim <kgene.kim@samsung.com>
      Cc: Kyungmin Park <kyungmin.park@samsung.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7edb3daf
    • M
      USB: EHCI: make ehci-spear a separate driver · 7675d6ba
      Manjunath Goudar 提交于
      Separate the SPEAr host controller driver from ehci-hcd host code
      so that it can be built as a separate driver module.
      This work is part of enabling multi-platform kernels on ARM;
      however, note that other changes are still needed before SPEAr can be
      booted with a multi-platform kernel, but they are queued in the
      arm-soc tree for 3.10.
      
      With the infrastructure added by Alan Stern in patch 3e023203
      "USB: EHCI: prepare to make ehci-hcd a library module", we can
      avoid this problem by turning a bus glue into a separate
      module, as we do here for the SPEAr bus glue.
      
      In V4 (arnd):
       - renamed all 'struct spear_ehci' pointers from 'ehci' to the
         less ambiguous 'sehci'.
       - folded trivial spear_start_ehci/spear_stop_ehci functions into
         callers.
       - brought back initialization of ehci->caps.
      
      In V3:
       - Detailed commit message added here about why this patch is required.
       - Eliminated ehci_spear_setup routine because hcd registers can
         be directly set in the spear_ehci_hcd_drv_probe function.
       - spear_overrides struct initialized.
       - Converted to using .extra_priv_size for allocating spear_ehci,
         and updated all users of that structure.
       - to_spear_ehci() macro modified for spear_ehci.
      
      In V2:
       - Replaced spear as SPEAr everywhere, leaving functions/variables/config options.
      Signed-off-by: NDeepak Saxena <dsaxena@linaro.org>
      Signed-off-by: NManjunath Goudar <manjunath.goudar@linaro.org>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NViresh Kumar <viresh.linux@gmail.com>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Cc: Shiraz Hashim <shiraz.hashim@st.com>
      Cc: spear-devel@list.st.com
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7675d6ba
    • M
      USB: EHCI: make ehci-orion a separate driver · a76dd463
      Manjunath Goudar 提交于
      Separate the Orion host controller driver from ehci-hcd host
      code into its own driver module because of following reason.
      
      With the multiplatform changes in arm-soc tree, it becomes
      possible to enable the mvebu platform (which uses
      ehci-orion) at the same time as other platforms that require
      a conflicting EHCI bus glue. At the moment, this results
      in a warning like
      
      drivers/usb/host/ehci-hcd.c:1297:0: warning: "PLATFORM_DRIVER" redefined [enabled by default]
      drivers/usb/host/ehci-hcd.c:1277:0: note: this is the location of the previous definition
      drivers/usb/host/ehci-orion.c:334:31: warning: 'ehci_orion_driver' defined but not used [-Wunused-variable]
      
      and an ehci driver that only works on one of them.
      
      With the infrastructure added by Alan Stern in patch 3e023203
      "USB: EHCI: prepare to make ehci-hcd a library module", we can
      avoid this problem by turning a bus glue into a separate
      module, as we do here for the orion bus glue.
      
      An earlier version of this patch was included in 3.9 but caused
      a regression there, which has subsequently been fixed.
      
      While we are here, use the opportunity to disabiguate the two
      Marvell EHCI controller implementations in Kconfig.
      
      In V4 (arnd):
      - Improve Kconfig text
      
      In V3:
      - More detail provided in commit message regarding this patch.
      - Replaced hcd_name string "ehci-orion" into "orion-ehci".
      - MODULE_LICENSE is GPL v2.
      - In ehci_init_driver calling second argument passed  as NULL instead of
        ehci_orion_overrides because ehci_orion_overrides is removed.
      
      In V2:
      - Tegra patch related changes removed from this patch.
      Signed-off-by: NManjunath Goudar <manjunath.goudar@linaro.org>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NJason Cooper <jason@lakedaemon.net>
      Tested-by: NAndrew Lunn <andrew@lunn.ch>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a76dd463
  22. 29 3月, 2013 1 次提交
  23. 26 3月, 2013 4 次提交
    • A
      USB: EHCI: improve end_unlink_async() · 214ac7a0
      Alan Stern 提交于
      This patch (as1665) changes the way ehci-hcd's end_unlink_async()
      routine works in order to avoid recursive execution and to be more
      efficient:
      
      	Now when an IAA cycle ends, a new one gets started up right
      	away (if it is needed) instead of waiting until the
      	just-unlinked QH has been processed.
      
      	The async_iaa list is renamed to async_idle, which better
      	expresses its new purpose: It is now the list of QHs which are
      	now completely idle and are waiting to be processed by
      	end_unlink_async().
      
      	A new flag is added to track whether an IAA cycle is in
      	progress, because the list formerly known as async_iaa no
      	longer stores the QHs waiting for the IAA to finish.
      
      	The decision about how many QHs to process when an IAA cycle
      	ends is now made at the end of the cycle, when we know the
      	current state of the hardware, rather than at the beginning.
      	This means a bunch of logic got moved from start_iaa_cycle()
      	to end_unlink_async().
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      214ac7a0
    • A
      USB: EHCI: convert singly-linked lists to list_heads · 6e018751
      Alan Stern 提交于
      This patch (as1664) converts ehci-hcd's async_unlink, async_iaa, and
      intr_unlink from singly-linked lists to standard doubly-linked
      list_heads.  Originally it didn't seem necessary to use list_heads,
      because items are always added to and removed from these lists in FIFO
      order.  But now with more list processing going on, it's easier to use
      the standard routines than continue with a roll-your-own approach.
      
      I don't know if the code ends up being notably shorter, but the
      patterns will be more familiar to any kernel hacker.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6e018751
    • A
      USB: EHCI: consolidate code in ehci_urb_dequeue() · 7655e316
      Alan Stern 提交于
      This patch (as1668) consolidates two nearly identical code paths in
      ehci_urb_dequeue().  The test for !qh can be removed because it will
      never succeed; the fact that usb_hcd_check_unlink_urb() returned 0
      means that urb must be queued and therefore urb->hcpriv must point to
      a QH.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7655e316
    • A
      USB: EHCI: split needs_rescan into two flags · 7bc782d7
      Alan Stern 提交于
      This patch (as1662) does some more QH-related cleanup in ehci-hcd.
      The qh->needs_rescan flag is currently used for two different
      purposes; the patch replaces it with two separate flags for greater
      clarity: qh->dequeue_during_giveback indicates that a completion
      handler dequeued an URB (implying that a rescan is needed), and
      qh->exception indicates that the QH is in an exceptional state
      requiring an unlink (either it encountered an I/O error or an unlink
      was requested).
      
      The new flags get set where the dequeue, exception, or unlink request
      occurred, rather than where the unlink is started.  This is so that in
      the future, if we need to, we will be able to tell apart unlinks that
      truly were required from those that were carried out merely because
      the QH wasn't being used.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7bc782d7
  24. 19 3月, 2013 1 次提交
  25. 16 3月, 2013 1 次提交
    • A
      USB: EHCI: fix regression during bus resume · 2a40f324
      Alan Stern 提交于
      This patch (as1663) fixes a regression caused by commit
      6e0c3339 (USB: EHCI: unlink one async
      QH at a time).  In order to avoid keeping multiple QHs in an unusable
      intermediate state, that commit changed unlink_empty_async() so that
      it unlinks only one empty QH at a time.
      
      However, when the EHCI root hub is suspended, _all_ async QHs need to
      be unlinked.  ehci_bus_suspend() used to do this by calling
      unlink_empty_async(), but now this only unlinks one of the QHs, not
      all of them.
      
      The symptom is that when the root hub is resumed, USB communications
      don't work for some period of time.  This is because ehci-hcd doesn't
      realize it needs to restart the async schedule; it assumes that
      because some QHs are already on the schedule, the schedule must be
      running.
      
      The easiest way to fix the problem is add a new function that unlinks
      all the async QHs when the root hub is suspended.
      
      This patch should be applied to all kernels that have the 6e0c3339
      commit.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Reported-and-tested-by: NAdrian Bassett <adrian.bassett@hotmail.co.uk>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2a40f324