1. 13 10月, 2007 4 次提交
    • M
      USB: ohci SSB bus glue · c604e851
      Michael Buesch 提交于
      This adds SSB bus glue for the USB OHCI HCD. 
      Signed-off-by: NMichael Buesch <mb@bu3sch.de>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      c604e851
    • A
      USB: reorganize urb->status use in ohci-hcd · 55d84968
      Alan Stern 提交于
      This patch (as975) reorganizes the way ohci-hcd sets urb->status.  It
      now keeps the information in a local variable until the last moment.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      CC: David Brownell <david-b@pacbell.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      55d84968
    • A
      USB: make HCDs responsible for managing endpoint queues · e9df41c5
      Alan Stern 提交于
      This patch (as954) implements a suggestion of David Brownell's.  Now
      the host controller drivers are responsible for linking and unlinking
      URBs to/from their endpoint queues.  This eliminates the possiblity of
      strange situations where usbcore thinks an URB is linked but the HCD
      thinks it isn't.  It also means HCDs no longer have to check for URBs
      being dequeued before they were fully enqueued.
      
      In addition to the core changes, this requires changing every host
      controller driver and the root-hub URB handler.  For the most part the
      required changes are fairly small; drivers have to call
      usb_hcd_link_urb_to_ep() in their urb_enqueue method,
      usb_hcd_check_unlink_urb() in their urb_dequeue method, and
      usb_hcd_unlink_urb_from_ep() before giving URBs back.  A few HCDs make
      matters more complicated by the way they split up the flow of control.
      
      In addition some method interfaces get changed.  The endpoint argument
      for urb_enqueue is now redundant so it is removed.  The unlink status
      is required by usb_hcd_check_unlink_urb(), so it has been added to
      urb_dequeue.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      CC: David Brownell <david-b@pacbell.net>
      CC: Olav Kongas <ok@artecdesign.ee>
      CC: Tony Olech <tony.olech@elandigitalsystems.com>
      CC: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e9df41c5
    • M
      USB: OHCI handles more ZFMicro quirks · 89a0fd18
      Mike Nuss 提交于
      The ZF Micro OHCI controller exhibits unexpected behavior that seems to be
      related to high load.  Under certain conditions, the controller will
      complete a TD, remove it from the endpoint's queue, and fail to add it to
      the donelist. This causes the endpoint to appear to stop responding. Worse,
      if the device is removed while in that state, OHCI will hang while waiting
      for the orphaned TD to complete.  The situation is not recoverable without
      rebooting.
      
      This fix enhances the scope of the existing OHCI_QUIRK_ZFMICRO flag:
      
       1. A watchdog routine periodically scans the OHCI structures to check
          for orphaned TDs. In these cases the TD is taken back from the
          controller and completed normally.
      
       2. If a device is removed while the endpoint is hung but before the
          watchdog catches the situation, any outstanding TDs are taken back
          from the controller in the 'sanitize' phase.
      
      The ohci-hcd driver used to print "INTR_SF lossage" in this situation;
      this changes it to the universally accurate "ED unlink timeout".  Other
      instances of this message presumably have different root causes.
      
      Both this Compaq quirk and a NEC quirk are now properly compiled out for
      non-PCI builds of this driver.
      Signed-off-by: NMike Nuss <mike@terascala.com>
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      89a0fd18
  2. 20 7月, 2007 1 次提交
  3. 13 7月, 2007 3 次提交
    • G
      USB: PS3: USB system-bus rework · 7a4eb7fd
      Geoff Levand 提交于
      USB HCD glue updates to reflect the new PS3 unifed device support.
       - Fixed remove() routine.
       - Added shutdown() routine.
       - Added request_mem_region() call.
       - Fixed MODULE_ALIAS().
       - Made a proper fix for the hack done to support muti-platform in commit
         48fda451.
      Signed-off-by: NGeoff Levand <geoffrey.levand@am.sony.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      7a4eb7fd
    • M
      USB: Fix NEC OHCI chip silicon bug · d576bb9f
      Michael Hanselmann 提交于
      This patch fixes a silicon bug in some NEC OHCI chips. The bug appears
      at random times and is very, very difficult to reproduce. Without the
      following patch, Linux would shut the chip and its associated devices
      down. In Apple PowerBooks this leads to an unusable keyboard and mouse
      (SSH still working). The idea of restarting the chip is taken from
      public Darwin code.
      Signed-off-by: NMichael Hanselmann <linux-kernel@hansmi.ch>
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      d576bb9f
    • A
      USB: EHCI, OHCI: handover changes · 383975d7
      Alan Stern 提交于
      This patch (as887) changes the way ehci-hcd and ohci-hcd handle a loss
      of VBUS power during suspend.  In order for the USB-persist facility
      to work correctly, it is necessary for low- and full-speed devices
      attached to a high-speed port to be handed back to the companion
      controller during resume processing.
      
      This entails three changes: adding code to ehci-hcd to perform the
      handover, removing code from ohci-hcd to turn off ports during
      root-hub reinit, and adding code to ohci-hcd to turn on ports during
      PCI controller resume.  (Other bus glue resume methods for platforms
      supporting high-speed controllers would need a similar change, if any
      existed.)
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      383975d7
  4. 09 5月, 2007 1 次提交
  5. 28 4月, 2007 1 次提交
  6. 17 2月, 2007 1 次提交
  7. 16 2月, 2007 1 次提交
  8. 08 2月, 2007 4 次提交
  9. 21 12月, 2006 2 次提交
  10. 02 12月, 2006 2 次提交
  11. 17 11月, 2006 1 次提交
    • A
      USB: OHCI: fix root-hub resume bug · 583ceada
      Alan Stern 提交于
      When a suspended OHCI controller sees a port's status change, it sets
      both the Root-Hub-Status-Change and the Resume-Detect bits in the
      Interrupt Status register.  Processing both these bits, the driver
      tries to resume the root hub twice!
      
      This patch (as807) fixes the bug by ignoring RD if RHSC is set.  It
      also prints a slightly more informative log message when a
      remote-wakeup event occurs.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      583ceada
  12. 05 10月, 2006 1 次提交
    • D
      IRQ: Maintain regs pointer globally rather than passing to IRQ handlers · 7d12e780
      David Howells 提交于
      Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
      of passing regs around manually through all ~1800 interrupt handlers in the
      Linux kernel.
      
      The regs pointer is used in few places, but it potentially costs both stack
      space and code to pass it around.  On the FRV arch, removing the regs parameter
      from all the genirq function results in a 20% speed up of the IRQ exit path
      (ie: from leaving timer_interrupt() to leaving do_IRQ()).
      
      Where appropriate, an arch may override the generic storage facility and do
      something different with the variable.  On FRV, for instance, the address is
      maintained in GR28 at all times inside the kernel as part of general exception
      handling.
      
      Having looked over the code, it appears that the parameter may be handed down
      through up to twenty or so layers of functions.  Consider a USB character
      device attached to a USB hub, attached to a USB controller that posts its
      interrupts through a cascaded auxiliary interrupt controller.  A character
      device driver may want to pass regs to the sysrq handler through the input
      layer which adds another few layers of parameter passing.
      
      I've build this code with allyesconfig for x86_64 and i386.  I've runtested the
      main part of the code on FRV and i386, though I can't test most of the drivers.
      I've also done partial conversion for powerpc and MIPS - these at least compile
      with minimal configurations.
      
      This will affect all archs.  Mostly the changes should be relatively easy.
      Take do_IRQ(), store the regs pointer at the beginning, saving the old one:
      
      	struct pt_regs *old_regs = set_irq_regs(regs);
      
      And put the old one back at the end:
      
      	set_irq_regs(old_regs);
      
      Don't pass regs through to generic_handle_irq() or __do_IRQ().
      
      In timer_interrupt(), this sort of change will be necessary:
      
      	-	update_process_times(user_mode(regs));
      	-	profile_tick(CPU_PROFILING, regs);
      	+	update_process_times(user_mode(get_irq_regs()));
      	+	profile_tick(CPU_PROFILING);
      
      I'd like to move update_process_times()'s use of get_irq_regs() into itself,
      except that i386, alone of the archs, uses something other than user_mode().
      
      Some notes on the interrupt handling in the drivers:
      
       (*) input_dev() is now gone entirely.  The regs pointer is no longer stored in
           the input_dev struct.
      
       (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking.  It does
           something different depending on whether it's been supplied with a regs
           pointer or not.
      
       (*) Various IRQ handler function pointers have been moved to type
           irq_handler_t.
      Signed-Off-By: NDavid Howells <dhowells@redhat.com>
      (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
      7d12e780
  13. 29 9月, 2006 1 次提交
  14. 28 9月, 2006 5 次提交
  15. 03 8月, 2006 1 次提交
  16. 13 7月, 2006 1 次提交
  17. 01 7月, 2006 1 次提交
  18. 09 5月, 2006 1 次提交
  19. 21 3月, 2006 2 次提交
    • D
      [PATCH] USB: ohci uses driver model wakeup flags · 6a9062f3
      David Brownell 提交于
      This makes OHCI use the driver model wakeup control bits for its root hub
      (e.g. disable on amd756, because of chip erratum) and for the controller
      itself.  It no longer uses the hcd glue bits with those roles, and depends
      on the previous patch making the root hub available earlier.
      
      Note that on most platforms (boot code properly setting the RWC bit) this
      gives a partial workaround for the way PCI isn't currently flagging devices
      that support PME# signals.  (Because of odd PCI init sequencing on PPC.)
      That's because many OHCI controllers support "legacy PCI PM" ... without
      involving any PCI PM capability.
      
      USB wakeup from STR, if it works on your system, may still involve
      tweaking things by hand in /proc/acpi/wakeup.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      6a9062f3
    • A
      [PATCH] USB: add support for OCHI on AT91rm9200 · 39a269c0
      Andrew Victor 提交于
      This adds support for OHCI on AT91rm9200 based boards.
      
      Possibly of interest here is the way this uses <linux/clk.h> to
      gate clocks on/off during system pm state transitions.  That's
      typical for non-PCI systems.  Some can go further; Mini-A host
      side connectors enable ID-pin sensing.
      
      From: Andrew Victor <andrew@sanpeople.com>
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      39a269c0
  20. 05 1月, 2006 2 次提交
  21. 30 11月, 2005 1 次提交
    • B
      [PATCH] USB: Fix USB suspend/resume crasher (#2) · 8de98402
      Benjamin Herrenschmidt 提交于
      This patch closes the IRQ race and makes various other OHCI & EHCI code
      path safer vs. suspend/resume.
      I've been able to (finally !) successfully suspend and resume various
      Mac models, with or without USB mouse plugged, or plugging while asleep,
      or unplugging while asleep etc... all without a crash.
      
      Alan, please verify the UHCI bit I did, I only verified that it builds.
      It's very simple so I wouldn't expect any issue there. If you aren't
      confident, then just drop the hunks that change uhci-hcd.c
      
      I also made the patch a little bit more "safer" by making sure the store
      to the interrupt register that disables interrupts is not posted before
      I set the flag and drop the spinlock.
      
      Without this patch, you cannot reliably sleep/wakeup any recent Mac, and
      I suspect PCs have some more sneaky issues too (they don't frankly crash
      with machine checks because x86 tend to silently swallow PCI errors but
      that won't last afaik, at least PCI Express will blow up in those
      situations, but the USB code may still misbehave).
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      8de98402
  22. 29 10月, 2005 2 次提交
    • D
      [PATCH] OHCI PM updates · f197b2c5
      David Brownell 提交于
      This simplifies the OHCI root hub suspend logic:
      
       - Uses new usbcore root hub calls to make autosuspend work again:
      	* Uses a newish usbcore root hub wakeup mechanism,
      	  making requests to khubd not keventd.
      	* Uses an even newer sibling suspend hook.
      
       - Expect someone always made usbcore call ohci_hub_suspend() before bus
         glue fires; and that ohci_hub_resume() is only called after that bus
         glue ran.  Previously, only CONFIG_USB_SUSPEND promised those things.
         (Includes updates to PCI and OMAP bus glue.)
      
       - Handle a not-noticed-before special case during resume from one of
         the swsusp snapshots when using "usb-handoff":  the controller isn't
         left in RESET state.  (A bug to fix in the usb-handoff code...)
      
      Also cleans up a minor debug printk glitch, and switches an mdelay over
      to an msleep (how did that stick around for so long?).
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
       drivers/usb/host/ohci-dbg.c  |    4 ----
       drivers/usb/host/ohci-hcd.c  |    2 +-
       drivers/usb/host/ohci-hub.c  |   42 ++++++++++++------------------------------
       drivers/usb/host/ohci-mem.c  |    1 -
       drivers/usb/host/ohci-omap.c |   36 ++++++++++++------------------------
       drivers/usb/host/ohci-pci.c  |   40 ++++++++--------------------------------
       drivers/usb/host/ohci.h      |    1 -
       7 files changed, 33 insertions(+), 93 deletions(-)
      f197b2c5
    • D
      [PATCH] remove some USB_SUSPEND dependencies · 8ad7fe16
      David Brownell 提交于
      This simplifies some of the PM-related #ifdeffing by recognizing
      that USB_SUSPEND depends on PM.  Also, OHCI drivers were often
      testing for USB_SUSPEND when they should have tested just PM.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
       drivers/usb/core/hcd.c          |    2 ++
       drivers/usb/host/ohci-hcd.c     |    2 +-
       drivers/usb/host/ohci-hub.c     |    4 ++--
       drivers/usb/host/ohci-omap.c    |    2 +-
       drivers/usb/host/ohci-pci.c     |    2 +-
       drivers/usb/host/ohci-ppc-soc.c |    4 ++--
       drivers/usb/host/ohci-pxa27x.c  |    2 +-
       drivers/usb/host/ohci-s3c2410.c |    3 +--
       drivers/usb/host/ohci-sa1111.c  |    2 +-
       9 files changed, 12 insertions(+), 11 deletions(-)
      8ad7fe16
  23. 28 10月, 2005 1 次提交