1. 16 6月, 2009 21 次提交
    • S
      USB: xhci: No-op command queueing and irq handler. · 7f84eef0
      Sarah Sharp 提交于
      xHCI host controllers can optionally implement a no-op test.  This
      simple test ensures the OS has correctly setup all basic data structures
      and can correctly respond to interrupts from the host controller
      hardware.
      
      There are two rings exercised by the no-op test:  the command ring, and
      the event ring.
      
      The host controller driver writes a no-op command TRB to the command
      ring, and rings the doorbell for the command ring (the first entry in
      the doorbell array).  The hardware receives this event, places a command
      completion event on the event ring, and fires an interrupt.
      
      The host controller driver sees the interrupt, and checks the event ring
      for TRBs it can process, and sees the command completion event.  (See
      the rules in xhci-ring.c for who "owns" a TRB.  This is a simplified set
      of rules, and may not contain all the details that are in the xHCI 0.95
      spec.)
      
      A timer fires every 60 seconds to debug the state of the hardware and
      command and event rings.  This timer only runs if
      CONFIG_USB_XHCI_HCD_DEBUGGING is 'y'.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      7f84eef0
    • S
      USB: xhci: Device context array allocation. · a74588f9
      Sarah Sharp 提交于
      Instead of keeping a "frame list" like older host controllers, the xHCI
      host controller keeps internal representations of the USB devices, with a
      transfer ring per endpoint.  The host controller queues Transfer Request
      Blocks (TRBs) to the endpoint ring, and then "rings the doorbell" for that
      device.  The host controller processes the transfer, places a transfer
      completion event on the event ring, and interrupts the system.
      
      The device context base address array must be allocated by the xHCI host
      controller driver, along with the device contexts it points to.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      a74588f9
    • S
      USB: xhci: Ring allocation and initialization. · 0ebbab37
      Sarah Sharp 提交于
      Allocate basic xHCI host controller data structures.  For every xHC, there
      is a command ring, an event ring, and a doorbell array.
      
      The doorbell array is used to notify the host controller that work has
      been enqueued onto one of the rings.  The host controller driver enqueues
      commands on the command ring.  The HW enqueues command completion events
      on the event ring and interrupts the system (currently using PCI
      interrupts, although the xHCI HW will use MSI interrupts eventually).
      
      All rings and the doorbell array must be allocated by the xHCI host
      controller driver.
      
      Each ring is comprised of one or more segments, which consists of 16-byte
      Transfer Request Blocks (TRBs) that can be chained to form a Transfer
      Descriptor (TD) that represents a multiple-buffer request.  Segments are
      linked into a ring using Link TRBs, which means they are dynamically
      growable.
      
      The producer of the ring enqueues a TD by writing one or more TRBs in the
      ring and toggling the TRB cycle bit for each TRB.  The consumer knows it
      can process the TRB when the cycle bit matches its internal consumer cycle
      state for the ring.  The consumer cycle state is toggled an odd amount of
      times in the ring.
      
      An example ring (a ring must have a minimum of 16 TRBs on it, but that's
      too big to draw in ASCII art):
      
                    chain  cycle
                     bit    bit
       ------------------------
      | TD A TRB 1 |  1  |  1  |<-------------  <-- consumer dequeue ptr
       ------------------------               |     consumer cycle state = 1
      | TD A TRB 2 |  1  |  1  |              |
       ------------------------               |
      | TD A TRB 3 |  0  |  1  |  segment 1   |
       ------------------------               |
      | TD B TRB 1 |  1  |  1  |              |
       ------------------------               |
      | TD B TRB 2 |  0  |  1  |              |
       ------------------------               |
      | Link TRB   |  0  |  1  |-----         |
       ------------------------     |         |
                                    |         |
                    chain  cycle    |         |
                     bit    bit     |         |
       ------------------------     |         |
      | TD C TRB 1 |  0  |  1  |<----         |
       ------------------------               |
      | TD D TRB 1 |  1  |  1  |              |
       ------------------------               |
      | TD D TRB 2 |  1  |  1  |   segment 2  |
       ------------------------               |
      | TD D TRB 3 |  1  |  1  |              |
       ------------------------               |
      | TD D TRB 4 |  1  |  1  |              |
       ------------------------               |
      | Link TRB   |  1  |  1  |-----         |
       ------------------------     |         |
                                    |         |
                    chain  cycle    |         |
                     bit    bit     |         |
       ------------------------     |         |
      | TD D TRB 5 |  1  |  1  |<----         |
       ------------------------               |
      | TD D TRB 6 |  0  |  1  |              |
       ------------------------               |
      | TD E TRB 1 |  0  |  1  |   segment 3  |
       ------------------------               |
      |            |  0  |  0  |              | <-- producer enqueue ptr
       ------------------------               |
      |            |  0  |  0  |              |
       ------------------------               |
      | Link TRB   |  0  |  0  |---------------
       ------------------------
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      0ebbab37
    • S
      USB: xhci: BIOS handoff and HW initialization. · 66d4eadd
      Sarah Sharp 提交于
      Add PCI initialization code to take control of the xHCI host controller
      away from the BIOS, halt, and reset the host controller.  The xHCI spec
      says that BIOSes must give up the host controller within 5 seconds.
      
      Add some host controller glue functions to handle hardware initialization
      and memory allocation for the host controller.  The current xHCI
      prototypes use PCI interrupts, but the xHCI spec requires MSI-X
      interrupts.  Add code to support MSI-X interrupts, but use the PCI
      interrupts for now.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      66d4eadd
    • S
      USB: xhci: Support xHCI host controllers and USB 3.0 devices. · 74c68741
      Sarah Sharp 提交于
      This is the first of many patches to add support for USB 3.0 devices and
      the hardware that implements the eXtensible Host Controller Interface
      (xHCI) 0.95 specification.  This specification is not yet publicly
      available, but companies can receive a copy by becoming an xHCI
      Contributor (see http://www.intel.com/technology/usb/xhcispec.htm).
      
      No xHCI hardware has made it onto the market yet, but these patches have
      been tested under the Fresco Logic host controller prototype.
      
      This patch adds the xHCI register sets, which are grouped into five sets:
       - Generic PCI registers
       - Host controller "capabilities" registers (cap_regs) short
       - Host controller "operational" registers (op_regs)
       - Host controller "runtime" registers (run_regs)
       - Host controller "doorbell" registers
      
      These some of these registers may be virtualized if the Linux driver is
      running under a VM.  Virtualization has not been tested for this patch.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      74c68741
    • A
      USB: EHCI: update toggle state for linked QHs · b18ffd49
      Alan Stern 提交于
      This patch (as1245) fixes a bug in ehci-hcd.  When an URB is queued
      for an endpoint whose QH is already in the LINKED state, the QH
      doesn't get refreshed.  As a result, if usb_clear_halt() was called
      during the time that the QH was linked but idle, the data toggle value
      in the QH doesn't get reset.
      
      The symptom is that after a clear_halt, data gets lost and transfers
      time out.  This problem is starting to show up now because the
      "ehci-hcd unlink speedups" patch causes QHs with no queued URBs to
      remain linked for a suitable time.
      
      The patch utilizes the new endpoint_reset mechanism to fix the
      problem.  When an endpoint is reset, the new method forcibly unlinks
      the QH (if necessary) and safely updates the toggle value.  This
      allows qh_update() to be simplified and avoids using usb_device's
      toggle bits in a rather unintuitive way.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      CC: David Brownell <david-b@pacbell.net>
      Tested-by: NDavid <david@unsolicited.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b18ffd49
    • Y
      USB: r8a66597-hcd: use platform_data instead of module_param · 5effabbe
      Yoshihiro Shimoda 提交于
      CPU/board specific parameters (PLL clock, vif etc...) can be set
      by platform_data instead of module_param.
      
      v2: remove irq_sense member in platform_data because it can OR in
          IRQF_TRIGGER_LOW or IRQF_TRIGGER_FALLING against IORESOURCE_IRQ in
          the struct resource.
      Signed-off-by: NYoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
      Reviewed-by: NPaul Mundt <lethal@linux-sh.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      5effabbe
    • A
      USB: EHCI: stagger frames for interrupt transfers · 68335e81
      Alan Stern 提交于
      This patch (as1243) tries to improve ehci-hcd's scheduling of
      interrupt transfers.  Instead of trying to cram all transfers with the
      same period into the same frame, the new code will spread the
      transfers out among lots of different frames.  This should reduce the
      periodic schedule load in any one frame -- some host controllers have
      trouble when there's too much work to do.
      
      A more thorough approach would stagger the uframe values as well.  But
      this is enough to make a big improvement.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Tested-by: NDwayne Fontenot <dwayne.fontenot@att.net>
      Cc: David Brownell <david-b@pacbell.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      68335e81
    • P
      wusb: hwa-hc: Drop unused pci_suspend/resume hooks. · 5700f4c5
      Paul Mundt 提交于
      CC      drivers/usb/host/hwa-hc.o
      drivers/usb/host/hwa-hc.c:601: warning: initialization from incompatible pointer type
      drivers/usb/host/hwa-hc.c:602: warning: initialization from incompatible pointer type
      
      The prototype for these changed, so the message itself was dropped. As the only
      thing these hooks were doing was printing out the message for debugging, there
      is not much point in keeping them around. So, just kill them off.
      
      Cc: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      Acked-by: NDavid Vrabel <david.vrabel@csr.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      5700f4c5
    • A
      USB: new flag for resume-from-hibernation · 6ec4beb5
      Alan Stern 提交于
      This patch (as1237) changes the way the PCI host controller drivers
      avoid retaining bogus hardware states during resume-from-hibernation.
      Previously we had reset the hardware as part of preparing to reinstate
      the memory image.  But we can do better now with the new PM framework,
      since we know exactly which resume operations are from hibernation.
      
      The pci_resume method is changed to accept a flag indicating whether
      the system is resuming from hibernation.  When this flag is set, the
      drivers will reset the hardware to get rid of any existing state.
      
      Similarly, the pci_suspend method is changed to remove the
      pm_message_t argument.  It's no longer needed, since no special action
      has to be taken when preparing to reinstate the memory image.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Acked-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      6ec4beb5
    • A
      USB: move PCI host controllers to new PM framework · abb30641
      Alan Stern 提交于
      This patch (as1236) converts the USB PCI power management routines
      over to the new PM framework.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Acked-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      abb30641
    • G
      USB: EHCI: create sysfs companion files directly in the controller device · ed14f034
      Greg Kroah-Hartman 提交于
      The controller device is where we want this sysfs file, especially as
      the dev pointer is about to go away...
      
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      ed14f034
    • G
      USB: OHCI: use the ohci structure directly in debugfs files. · 10983341
      Greg Kroah-Hartman 提交于
      Right now we jump through some hoops to get to the struct ohci_hcd
      struct in the ohci debugfs files.  Remove all of the fun casting around
      and just use the pointer directly.
      
      This is needed as the dev pointer in the hcd structure is going away,
      and it makes the code simpler and smaller
      
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      10983341
    • G
      USB: UHCI: use the new usb debugfs directory · ec20df2e
      Greg Kroah-Hartman 提交于
      All usb debugfs files should be behind the usb directory, not at the
      root of debugfs.
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      ec20df2e
    • G
      USB: OHCI: use the new usb debugfs directory · 485f4f39
      Greg Kroah-Hartman 提交于
      All usb debugfs files should be behind the usb directory, not at the
      root of debugfs.
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      485f4f39
    • G
      USB: FHCI: use the new usb debugfs directory · 66536ab3
      Greg Kroah-Hartman 提交于
      All usb debugfs files should be behind the usb directory, not at the
      root of debugfs.
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      66536ab3
    • G
      USB: EHCI: use the new usb debugfs directory · 08f4e586
      Greg Kroah-Hartman 提交于
      All usb debugfs files should be behind the usb directory, not at the
      root of debugfs.
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      08f4e586
    • H
      USB: host/ohci-hcd.c: fix sparse warnings · 96f90a8b
      H Hartley Sweeten 提交于
      Fix sparse warnings in drivers/usb/host/ohci-hcd.c.
      
      Four of the following sparse warning are seen when building on
      ARM due do the macro raw_local_irq_save():
      
      	warning: symbol 'temp' shadows an earlier one
      Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      96f90a8b
    • M
      USB: UHCI queue: use usb_endpoint_type() · 1eba67a6
      Matthias Kaehlcke 提交于
      use usb_endpoint_type() instead of fiddling manually with bmAttributes
      Signed-off-by: NMatthias Kaehlcke <matthias@kaehlcke.net>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      1eba67a6
    • U
      USB: move orion-ehci's probe function to .devinit.text · dc2f2b75
      Uwe Kleine-König 提交于
      A pointer to ehci_orion_drv_probe is passed to the core via
      platform_driver_register and so the function must not disappear when the
      .init sections are discarded.  Otherwise (if also having HOTPLUG=y)
      unbinding and binding a device to the driver via sysfs will result in an
      oops as does a device being registered late.
      
      An alternative to this patch is using platform_driver_probe instead of
      platform_driver_register plus removing the pointer to the probe function
      from the struct platform_driver.
      Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Cc: Ronen Shitrit <rshitrit@marvell.com>
      Cc: Lennert Buytenhek <buytenh@marvell.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: David Brownell <david-b@pacbell.net>
      Cc: Nicolas Pitre <nico@marvell.com>
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      Cc: Tzachi Perelstein <tzachi@marvell.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      dc2f2b75
    • U
      USB: move r8a66597_hcd's probe function to .devinit.text · 8864bd86
      Uwe Kleine-König 提交于
      A pointer to r8a66597_probe is passed to the core via
      platform_driver_register and so the function must not disappear when the
      .init sections are discarded.  Otherwise (if also having HOTPLUG=y)
      unbinding and binding a device to the driver via sysfs will result in an
      oops as does a device being registered late.
      
      An alternative to this patch is using platform_driver_probe instead of
      platform_driver_register plus removing the pointer to the probe function
      from the struct platform_driver.
      Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Acked-by: NYoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
      Cc: Magnus Damm <damm@igel.co.jp>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      8864bd86
  2. 30 5月, 2009 1 次提交
  3. 29 5月, 2009 1 次提交
    • W
      USB: isp1760: urb_dequeue doesn't always find the urbs · 0afb20e0
      Warren Free 提交于
      The option driver (and presumably others) allocates several URBs when it
      opens and tries to free them when it closes. The isp1760_urb_dequeue
      function gets called, but the packet being dequeued is not necessarily at
      the
      front of one of the 32 queues. If not, the isp1760_urb_done function doesn't
      get called for the URB and the process trying to free it hangs forever on a
      wait_queue. This patch does two things. If the URB being dequeued has others
      queued behind it, it re-queues them. And it searches the queues looking for
      the URB being dequeued rather than just looking at the one at the front of
      the queue.
      
      [bigeasy@linutronix] whitespace fixes, reformating
      
      Cc: stable <stable@kernel.org>
      Signed-off-by: NWarren Free <wfree@ipmn.com>
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      0afb20e0
  4. 24 4月, 2009 1 次提交
    • D
      USB: ehci-sched.c: EHCI SITD scheduling bugfix · c065c60e
      Dan Streetman 提交于
      Without this patch, the driver won't check that the last fully-occupied
      uframe for a new split transaction was vacant beforehand.  This can
      lead to a situation in which the first 188 bytes of a 192-byte
      isochronous transfer are scheduled in the same uframe as an existing
      interrupt transfer.  The resulting schedule looks like this:
      
             uframe 0: 188-byte isoc-OUT SSPLIT, 8-byte int-IN SSPLIT
             uframe 1: 4-byte isoc-OUT SSPLIT
      
      The SSPLITs are intermingled, causing an error in the downstream hub's
      TT.
      
      If you are having problems with devices or hub ports resetting, or failed
      interrupt transfers, when you start using a USB audio or video (Isochronous)
      device, this patch may help.
      Signed-off-by: NDan Streetman <ddstreet@ieee.org>
      Reported-by: NKung James <kong1191@gmail.com>
      Acked-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      
      c065c60e
  5. 18 4月, 2009 2 次提交
  6. 09 4月, 2009 1 次提交
  7. 07 4月, 2009 3 次提交
  8. 25 3月, 2009 10 次提交