1. 06 12月, 2006 1 次提交
  2. 02 12月, 2006 7 次提交
    • A
      usbcore: remove unused argument in autosuspend · 94fcda1f
      Alan Stern 提交于
      Thanks to several earlier patches, usb_autosuspend_device() and
      usb_autoresume_device() are never called with a second argument other
      than 1.  This patch (as819) removes the now-redundant argument.
      
      It also consolidates some common code between those two routines,
      putting it into a new subroutine called usb_autopm_do_device().  And
      it includes a sizable kerneldoc update for the affected functions.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      94fcda1f
    • A
      USB: keep count of unsuspended children · ee49fb5d
      Alan Stern 提交于
      This patch (as818b) simplifies autosuspend processing by keeping track
      of the number of unsuspended children of each USB hub.  This will
      permit us to avoid a good deal of unnecessary work all the time; we
      will no longer have to create a bunch of workqueue entries to carry
      out autosuspend requests, only to have them fail because one of the
      hub's children isn't suspended.
      
      The basic idea is simple.  There already is a usage counter in the
      usb_device structure for preventing autosuspends.  The patch just
      increments that counter for every unsuspended child.  There's only one
      tricky part: When a device disconnects we need to remember whether it
      was suspended at the time (leave the counter alone) or not (decrement
      the counter).
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      ee49fb5d
    • A
      USB hub: simplify remote-wakeup handling · d25450c6
      Alan Stern 提交于
      This patch (as817) simplifies the remote-wakeup processing in the hub
      driver.  Now instead of using a specialized code path, it relies on
      the standard USB resume routines.  The hub_port_resume() function does
      an initial get_port_status() to see whether the port has already
      resumed itself (as it does when a remote-wakeup request is sent).
      This will slow down handling of other resume events slightly, but not
      enough to matter.
      
      The patch also changes the hub_port_status() routine, making it return
      an error if a short reply is received.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      d25450c6
    • A
      USB: Add autosuspend support to the hub driver · 40f122f3
      Alan Stern 提交于
      This patch (as742b) adds autosuspend/autoresume support to the USB hub
      driver.  The largest aspect of the change is that we no longer need a
      special flag for root hubs that want to be resumed.  Now every hub is
      autoresumed whenever khubd needs to access it.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      40f122f3
    • G
      USB: create a new thread for every USB device found during the probe sequence · c066475e
      Greg Kroah-Hartman 提交于
      Might speed up some systems.  If nothing else, a bad driver should not
      take the whole USB subsystem down with it.
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      c066475e
    • A
      USB: Move private hub declarations out of public header file · 1bb5f66b
      Alan Stern 提交于
      This patch (as809b) moves the declaration of the hub driver's private
      data structure from hub.h into the hub.c source file.  Lots of other
      files import hub.h; they have no need to know about the details of the
      hub driver's private data.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      1bb5f66b
    • I
      usb hub: fix root hub code so it takes more than 15 devices per root hub · 88fafff9
      inaky@linux.intel.com 提交于
      Wireless USB Host Controllers accept a large number of devices per
      host, which shows up as a large number of ports in its root hub.
      
      When the number of ports in a hub device goes over 16, the activation
      of the hub fails with the cryptic message in klogd.
      
      hub 2-0:1.0: activate --> -22
      
      Following this further, it was seen that:
      
      hub_probe()
        hub_configure()
          generates pipe number
      
          pseudo allocates buffer 'maxp' bytes in size using usb_maxpacket()
      
            The endpoint descriptor for a root hub interrupt endpoint is
            declared in
            drivers/usb/core/hcd.c:hs_rh_config_descriptor and declares it
            to be size two (supporting 15 devices max).
      
          hub_activate()
            usb_hcd_submit_urb()
              rh_urb_enqueue()
                urb->pipe is neither int nor ctl, so it errors out
                  rh_queue_status()
                    Returns -EINVAL because the buffer length is smaller
                    than the minimum needed to report all the hub port
                    bits as in accordance with USB2.0[11.12.3]. There has
                    to be trunc((PORTS + 1 + 7) / 8) bytes of space at
                    least.
      
      Alan Stern confirmed that the reason for reading maxpktsize and not
      the right amount is because some hubs are known to return more data
      and thus cause overflow. 
      
      So this patch simply changes the code to make the interrupt endpoint's
      max packet size be at least the minimum required by USB_MAXCHILDREN
      (instead of a fixed magic number) and add documentation for that. This
      way we are always ahead of the limit.
      Signed-off-by: NInaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      88fafff9
  3. 22 11月, 2006 1 次提交
  4. 04 11月, 2006 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. 29 9月, 2006 1 次提交
  7. 28 9月, 2006 18 次提交
  8. 13 7月, 2006 2 次提交
  9. 01 7月, 2006 1 次提交
  10. 22 6月, 2006 5 次提交
  11. 09 5月, 2006 1 次提交
    • A
      [PATCH] USB: usbcore: don't check the device's power source · 436f5762
      Alan Stern 提交于
      The choose_configuration() routine contains code the determine the
      device's power source, so that configurations requiring external power
      can be ruled out if the device is running on bus power.  Unfortunately
      it turns out that some devices have errors in their config descriptors
      and other devices don't like the GET_DEVICE_STATUS request.
      
      Since that information wasn't used for anything else, this patch (as673)
      removes the code, leaving only a comment.  It fixes bugzilla entry
      #6448.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      436f5762
  12. 15 4月, 2006 1 次提交