1. 13 10月, 2007 5 次提交
    • A
      USB: Eliminate urb->status usage! · 4a00027d
      Alan Stern 提交于
      This patch (as979) removes the last vestiges of urb->status from the
      host controller drivers and the root-hub emulator.  Now the field
      doesn't get set until just before the URB's completion routine is
      called.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      CC: David Brownell <david-b@pacbell.net>
      CC: Olav Kongas <ok@artecdesign.ee>
      CC: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
      CC: Tony Olech <tony.olech@elandigitalsystems.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      4a00027d
    • A
      USB: add urb->unlinked field · eb231054
      Alan Stern 提交于
      This patch (as970) adds a new urb->unlinked field, which is used to
      store the status of unlinked URBs since we can't use urb->status for
      that purpose any more.  To help simplify the HCDs, usbcore will check
      urb->unlinked before calling the completion handler; if the value is
      set it will automatically override the status reported by the HCD.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      CC: David Brownell <david-b@pacbell.net>
      CC: Olav Kongas <ok@artecdesign.ee>
      CC: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
      CC: Tony Olech <tony.olech@elandigitalsystems.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      eb231054
    • A
      USB: centralize -EREMOTEIO handling · b0d9efba
      Alan Stern 提交于
      This patch (as969) continues the ongoing changes to the way HCDs
      report URB statuses.  The programming interface has been simplified by
      making usbcore responsible for clearing urb->hcpriv and for setting
      -EREMOTEIO status when an URB with the URB_SHORT_NOT_OK flag ends up
      as a short transfer.
      
      By moving the work out of the HCDs, this removes a fair amount of
      repeated code.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      CC: David Brownell <david-b@pacbell.net>
      CC: Olav Kongas <ok@artecdesign.ee>
      CC: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
      CC: Tony Olech <tony.olech@elandigitalsystems.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b0d9efba
    • 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
    • J
      USB: Clean up duplicate includes in drivers/usb/ · ca337db6
      Jesper Juhl 提交于
      This patch cleans up duplicate includes in
      	drivers/usb/
      Signed-off-by: NJesper Juhl <jesper.juhl@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      ca337db6
  2. 23 8月, 2007 1 次提交
  3. 20 7月, 2007 1 次提交
  4. 23 5月, 2007 1 次提交
  5. 09 5月, 2007 1 次提交
  6. 21 12月, 2006 1 次提交
    • T
      USB: u132-hcd/ftdi-elan: add support for Option GT 3G Quad card · 4b87361d
      Tony Olech 提交于
      ELAN's U132 is a USB to CardBus OHCI controller adapter,
          designed specifically for CardBus 3G data cards to
          function in machines without a CardBus slot.
      The "ftdi-elan" module is a USB client driver, that detects
          a supported CardBus OHCI controller plugged into the
          U132 adapter and thereafter provides the conduit for
          for access by the "u132-hcd" module.
      The "u132-hcd" module is a (cut-down OHCI) host controller
          that supports a single OHCI function of the CardBus 
          card inserted into the U132 adapter.
      
      The problem with the initial implementation is that when
      the CardBus card inserted into the U132 adapter has multiple
      functions (and a CardBus card can support up to 4 functions),
      it was the first function that was arbitrarily choosen.
      
      The first batch of 3G cards tested, like the Merlin Qualcomm
      V620, have two functions each supporting a seperate USB OHCI
      host controller, of which it was that first function that is
      wired up to the 3G modem.
      
      Then along comes the Vodafone Mobile Connect 3G/GPRS data card,
      aka "Option GT 3G Quad" as printed on it's rear or "Option N.V.
      GlobeTrotter Fusion Quad Lite" as read with "lspci -v". And it
      has the meaningful functionality in the second CardBus function.
      
      That presents a problem because it was the "ftdi-elan" module
      alone that knows how to communicate to the embedded CardBus slot
      and the "u132-hcd" module alone that knows how to access the
      pcmcia configuration and CardBus accessible memory space. And
      of course, the information about attached (internally hardwired)
      devices is contained within USB configuration embedded somewhere
      within the CardBus card.
      
      If only the "u132-hcd" module probe() interface could return a
      result code that propagated back to the instigating function
      platform_device_register() then the "ftdi-elan" module could
      try an alternative CardBus function.     However in spite of
      the recent changes to the drivers/base/ routines that moved 
      device_attach() from bus_add_device() to bus_attach_device()
      both of those routines lose the "failed to attach" 0 result
      code and thus the calling routine, namely device_add() is
      incapable of propaging the "failed to attach" condition back
      to platform_device_add() and consequently back to the caller
      of platform_device_register()
      
      Experiments show that patching bus_attach_device() to return
      ENODEV fails with the kernel locking up very early during
      boot. But, however, if the patch is restricted to calls from
      platform_device_add() then it does seem to work.
      
      Unfortunately, until the kernel's drivers/base is properly
      modified to propagate -ENODEV back to the caller of
      platform_device_register(), it is necessary to "fix" the
      "ftdi-elan" module by importing knowledge from the 
      "u132-hcd" module. This is the reason for the duplicated
      functionality introduced in this patch.
      Signed-off-by: NTony Olech <tony.olech@elandigitalsystems.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      4b87361d
  7. 02 12月, 2006 2 次提交
  8. 30 11月, 2006 1 次提交
  9. 22 11月, 2006 1 次提交
  10. 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
  11. 04 10月, 2006 1 次提交
  12. 28 9月, 2006 1 次提交
    • T
      USB: u132-hcd: host controller driver for ELAN U132 adapter · d774efea
      Tony Olech 提交于
      This "u132-hcd" module is one half of the "driver" for
      ELAN's U132 which is a USB to CardBus OHCI controller
      adapter. This module needs the "ftdi-elan" module in
      order to communicate to CardBus OHCI controller inserted
      into the U132 adapter.
      
      When the "ftdi-elan" module detects a supported CardBus
      OHCI controller in the U132 adapter it loads this "u132-hcd"
      module.
      
      Upon a successful device probe() the single workqueue
      is started up which does all the processing of commands
      from the USB core that implement the host controller.
      
      The workqueue maintains the urb queues and issues commands
      via the functions exported by the "ftdi-elan" module. Each
      such command will result in a callback.
      
      Note that the "ftdi-elan" module is a USB client driver.
      
      Note that this "u132-hcd" module is a (cut-down OHCI)
      host controller.
      
      Thus we have a topology with the parent of a host controller
      being a USB client! This really stresses the USB subsystem
      semaphore/mutex handling in the module removal.
      Signed-off-by: NTony Olech <tony.olech@elandigitalsystems.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      d774efea