1. 13 10月, 2007 2 次提交
    • A
      USB: reorganize urb->status use in ehci-hcd · 14c04c0f
      Alan Stern 提交于
      This patch (as974) reorganizes the way ehci-hcd sets urb->status.  It
      now keeps the information in a local variable until the last moment.
      
      The patch also simplifies the handling of -EREMOTEIO, since the only
      use of that code is to set the do_status flag.
      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>
      14c04c0f
    • 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
  2. 21 8月, 2007 1 次提交
    • L
      Revert "USB: EHCI cpufreq fix" · 8eb891fc
      Linus Torvalds 提交于
      This reverts commit 196705c9.  It was
      reported to cause a regression by Daniel Exner, and Arjan van de Ven
      points out that we actually already have infrastructure in place for
      setting limits on acceptable DMA latency that would be the much more
      correct fix for the problem with some Broadcom EHCI controllers.
      
      Fixed up trivial conflicts due to the changes to support big-endian host
      controller descriptors in drivers/usb/host/{ehci-sched.c,ehci.h}.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8eb891fc
  3. 13 7月, 2007 2 次提交
    • S
      USB: EHCI support for big-endian descriptors · 6dbd682b
      Stefan Roese 提交于
      This patch implements supports for EHCI controllers whose in-memory
      data structures are represented in big-endian format. This is needed
      (unfortunately) for the AMCC PPC440EPx SoC EHCI controller; the EHCI
      spec doesn't specify little-endian format, although that's what most
      other implementations use.
      
      The guts of the patch are to introduce the hc32 type and change all
      references from le32 to hc32.  All access routines are converted from
      cpu_to_le32(...) to cpu_to_hc32(ehci, ...) and similar for the other
      "direction".  (This is the same approach used with OHCI.)
      
      David fixed:
      	Whitespace fixes; refresh against ehci cpufreq patch; move glue
      	for that PPC driver to the patch adding it; fix free symbol
      	capture bugs in modified "constant" macros; and make "hc32" etc
      	be "le32" unless we really need the BE options, so "sparse" can
      	do some real good.
      Signed-off-by: NStefan Roese <sr@denx.de>
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      6dbd682b
    • S
      USB: EHCI cpufreq fix · 196705c9
      Stuart_Hayes@Dell.com 提交于
      EHCI controllers that don't cache enough microframes can get MMF errors
      when CPU frequency changes occur between the start and completion of
      split interrupt transactions, due to delays in reading main memory
      (caused by CPU cache snoop delays).
      
      This patch adds a cpufreq notifier to the EHCI driver that will
      inactivate split interrupt transactions during frequency transitions.
      It was tested on Intel ICH7 and Serverworks/Broadcom HT1000 EHCI
      controllers.
      Signed-off-by: NStuart Hayes <stuart_hayes@dell.com>
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      196705c9
  4. 08 2月, 2007 1 次提交
  5. 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
  6. 28 9月, 2006 1 次提交
  7. 22 6月, 2006 1 次提交
    • D
      [PATCH] improved TT scheduling for EHCI · ba47f66b
      Dan Streetman 提交于
      This updates the EHCI driver by adding an improved scheduler for the
      transaction translators, found in USB 2.0 hubs and used for low and
      full speed devices.
      
       - adds periodic_tt_usecs() and some helper functions, which does
         the same thing that "periodic_usecs" does, except on the other
         side of the TT, i.e.  it calculates the low/fullspeed bandwidth
         usage instead of highspeed.
      
       - adds a tt_available() function which is the new implementation
         of what tt_no_collision() does ... while tt_no_collision() ensures
         that each TT handles only 1 periodic transfer at a time (a very
         pessimistic approach) this version instead tracks bandwidth and
         allows each TT to handle as many transfers as will fit on each TT's
         downstream bus (closer to best-case).
      
      The new scheduler is selected by a config option, marked as EXPERIMENTAL
      so it can be tested (and more broadly reviewed) for a while until it
      seems safe to remove the original scheduler.
      Signed-off-by: NDan Streetman <ddstreet@ieee.org>
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      ba47f66b
  8. 21 3月, 2006 3 次提交
  9. 01 2月, 2006 2 次提交
  10. 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
  11. 28 10月, 2005 1 次提交
  12. 09 9月, 2005 1 次提交
  13. 08 9月, 2005 1 次提交
  14. 05 8月, 2005 1 次提交
    • D
      [PATCH] USB: ehci: microframe handling fix · 7dedacf4
      David Brownell 提交于
      This patch has a one line oops fix, plus related cleanups.
      
       - The bugfix uses microframe scheduling data given to the hardware to
         test "is this a periodic QH", rather than testing for nonzero period.
         (Prevents an oops by providing the correct answer.)
      
       - The cleanup going along with the patch should make it clearer what's
         going on whenever those bitfields are accessed.
      
      The bug came about when, around January, two new kinds of EHCI interrupt
      scheduling operation were added, involving both the high speed (24 KBytes
      per millisec) and low/full speed (1-64 bytes per millisec) microframe
      scheduling.  A driver for the Edirol UA-1000 Audio Capture Unit ran into
      the oops; it used one of the newly supported high speed modes.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      7dedacf4
  15. 13 7月, 2005 1 次提交
  16. 28 6月, 2005 1 次提交
    • D
      [PATCH] USB: ehci-hcd - fix page pointer allocation in itd_patch() · 77078570
      David Brownell 提交于
      The itd_patch() function is responsible for allocating entries in the
      buffer page pointer list of the iTD.  Particularly, a new page pointer
      is needed every time when buffer data crosses a page boundary.
      
      However, there is a bug in the allocation logic: the function does not
      allocate a new entry when the current transaction is the first
      transaction in the iTD (as indicated by first!=0).
      
      The consequence is that, when the data of the first transaction begins
      somewhere at the end of a page so that it actually does cross the page
      boundary, no new page pointer is allocated.  This means that the data
      at the end of the first transaction (beyond the page boundary) will be
      accessed by the HC using the second page pointer, which is zero.
      Furthermore, the first page pointer will be later overwritten by the
      page pointers of the other transactions, which will garble it because
      the value is or-ed into the iTD field.
      
      All this particular check (for !first) does is cause incorrect
      behaviour, so it should be entirely removed (and with it the variable
      first that is not used for anything else).
      Signed-off-by: NClemens Ladisch <clemens@ladisch.de>
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      77078570
  17. 19 4月, 2005 1 次提交
  18. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4