1. 09 4月, 2013 4 次提交
    • 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
  2. 29 3月, 2013 1 次提交
  3. 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
  4. 19 3月, 2013 1 次提交
  5. 16 3月, 2013 2 次提交
    • 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
    • A
      USB: EHCI: split ehci-omap out to a separate driver · 54a41966
      Alan Stern 提交于
      This patch (as1645) converts ehci-omap over to the new "ehci-hcd is a
      library" approach, so that it can coexist peacefully with other EHCI
      platform drivers and can make use of the private area allocated at
      the end of struct ehci_hcd.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      54a41966
  6. 05 3月, 2013 1 次提交
  7. 21 2月, 2013 2 次提交
  8. 16 2月, 2013 2 次提交
    • M
      USB: EHCI: make ehci-orion a separate driver · 6ed3c43d
      Manjunath Goudar 提交于
      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.
      Signed-off-by: NManjunath Goudar <manjunath.goudar@linaro.org>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: Andrew Lunn <andrew@lunn.ch>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6ed3c43d
    • M
      USB: EHCI: make ehci-vt8500 a separate driver · d57ada0c
      Manjunath Goudar 提交于
      With the multiplatform changes in arm-soc tree, it becomes
      possible to enable the vt8500 platform 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:1277:0: warning: "PLATFORM_DRIVER" redefined [enabled by default]
      drivers/usb/host/ehci-hcd.c:1257:0: note: this is the location of the previous definition
      drivers/usb/host/ehci-omap.c:319:31: warning: 'ehci_hcd_omap_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 vt8500 bus glue.
      Signed-off-by: NManjunath Goudar <manjunath.goudar@linaro.org>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NTony Prisk <linux@prisktech.co.nz>
      Cc: Alexey Charkov <alchark@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d57ada0c
  9. 26 1月, 2013 1 次提交
  10. 24 1月, 2013 1 次提交
    • A
      USB: EHCI: fix build error in ehci-mxc · dba63b2f
      Alan Stern 提交于
      This patch (as1643b) fixes a build error in ehci-hcd when compiling for
      ARM with allmodconfig:
      
      drivers/usb/host/ehci-hcd.c:1285:0: warning: "PLATFORM_DRIVER" redefined [enabled by default]
      drivers/usb/host/ehci-hcd.c:1255:0: note: this is the location of the previous definition
      drivers/usb/host/ehci-mxc.c:280:31: warning: 'ehci_mxc_driver' defined but not used [-Wunused-variable]
      drivers/usb/host/ehci-hcd.c:1285:0: warning: "PLATFORM_DRIVER" redefined [enabled by default]
      drivers/usb/host/ehci-hcd.c:1255:0: note: this is the location of the previous definition
      
      The fix is to convert ehci-mxc over to the new "ehci-hcd is a library"
      scheme so that it can coexist peacefully with the ehci-platform
      driver.  As part of the conversion the ehci_mxc_priv data structure,
      which was allocated dynamically, is now placed where it belongs: in
      the private area at the end of struct ehci_hcd.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Tested-by: NShawn Guo <shawn.guo@linaro.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      dba63b2f
  11. 23 1月, 2013 2 次提交
  12. 12 11月, 2012 1 次提交
  13. 03 11月, 2012 1 次提交
  14. 01 11月, 2012 5 次提交
  15. 25 10月, 2012 1 次提交
  16. 23 10月, 2012 5 次提交
  17. 22 10月, 2012 1 次提交
    • A
      EHCI: use the isochronous scheduling threshold · 98cae42d
      Alan Stern 提交于
      This patch (as1609) changes the way ehci-hcd uses the "Isochronous
      Scheduling Threshold" in its calculations.  Until now the code has
      ignored the threshold except for certain Intel PCI-based controllers.
      This violates the EHCI spec.
      
      The new code takes the threshold into account always, removing the
      need for the fs_i_thresh quirk flag.  In addition it implements the
      "full frame cache" setting more efficiently, moving forward only as
      far as the next frame boundary instead of always moving forward 8
      microframes.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      98cae42d
  18. 19 9月, 2012 1 次提交
  19. 19 7月, 2012 1 次提交
  20. 17 7月, 2012 3 次提交
    • A
      USB: EHCI: resolve some unlikely races · 43fe3a99
      Alan Stern 提交于
      This patch (as1589) resolves some unlikely races involving system
      shutdown or controller death in ehci-hcd:
      
      	Shutdown races with both root-hub resume and controller
      	resume.
      
      	Controller death races with root-hub suspend.
      
      A new bitflag is added to indicate that the controller has been shut
      down (whether for system shutdown or because it died).  Tests are
      added in the suspend and resume pathways to avoid reactivating the
      controller after any sort of shutdown.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      43fe3a99
    • A
      USB: EHCI: fix up locking · c4f34764
      Alan Stern 提交于
      This patch (as1588) adjusts the locking in ehci-hcd's various halt,
      shutdown, and suspend/resume pathways.  We want to hold the spinlock
      while writing device registers and accessing shared variables, but not
      while polling in a loop.
      
      In addition, there's no need to call ehci_work() at times when no URBs
      can be active, i.e., in ehci_stop() and ehci_bus_suspend().
      
      Finally, ehci_adjust_port_wakeup_flags() is called only in situations
      where interrupts are enabled; therefore it can use spin_lock_irq
      rather than spin_lock_irqsave.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c4f34764
    • A
      USB: EHCI: simplify isochronous scanning · f4289078
      Alan Stern 提交于
      This patch (as1587) simplifies ehci-hcd's scan_isoc() routine by
      eliminating some local variables, declaring boolean-valued values as
      bool rather than unsigned, changing variable names to make more sense,
      and so on.
      
      The logic at the end of the routine is cut down significantly.  The
      scanning doesn't have to catch up all the way to where the hardware
      is; it merely has to catch up to where the hardware was when the last
      interrupt occurred.  If the hardware has made more progress since then
      and issued another interrupt, a rescan will catch up to it.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f4289078