1. 29 9月, 2006 2 次提交
  2. 28 9月, 2006 6 次提交
    • A
      usbcore: remove usb_suspend_root_hub · 02c399ee
      Alan Stern 提交于
      This patch (as740) removes the existing support for autosuspend of
      root hubs.  That support fit in rather awkwardly with the rest of
      usbcore and it was used only by ohci-hcd.  It won't be needed any more
      since the hub driver will take care of autosuspending all hubs, root
      or external.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      02c399ee
    • A
      usbcore: trim down usb_bus structure · 17200583
      Alan Stern 提交于
      As part of the ongoing program to flatten out the HCD bus-glue layer,
      this patch (as771b) eliminates the hcpriv, release, and kref fields
      from struct usb_bus.  hcpriv and release were not being used for
      anything worthwhile, and kref has been moved into the enclosing
      usb_hcd structure.
      
      Along with those changes, the patch gets rid of usb_bus_get and
      usb_bus_put, replacing them with usb_get_hcd and usb_put_hcd.
      
      The one interesting aspect is that the dev_set_drvdata call was
      removed from usb_put_hcd, where it clearly doesn't belong.  This means
      the driver private data won't get reset to NULL.  It shouldn't cause
      any problems, since the private data is undefined when no driver is
      bound.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      17200583
    • A
      usbcore: Add flag for whether a host controller uses DMA · dd990f16
      Alan Stern 提交于
      This patch (as770b) introduces a new field to usb_bus: a flag
      indicating whether or not the host controller uses DMA.  This serves
      to encapsulate the computation.  It also means we will have only one
      spot to update if the DMA API changes.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      dd990f16
    • A
      USB: remove struct usb_operations · a6d2bb9f
      Alan Stern 提交于
      All of the currently-supported USB host controller drivers use the HCD
      bus-glue framework.  As part of the program for flattening out the glue
      layer, this patch (as769) removes the usb_operations structure.  All
      function calls now go directly to the HCD routines (slightly renamed
      to remain within the "usb_" namespace).
      
      The patch also removes usb_alloc_bus(), because it's not useful in the
      HCD framework and it wasn't referenced anywhere.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      a6d2bb9f
    • A
      usbcore: make hcd_endpoint_disable wait for queue to drain · 455b25fb
      Alan Stern 提交于
      The inconsistent lock state problem in usbcore (the one that shows up
      when an HCD is unloaded) comes down to two inter-related problems:
      
      	usb_rh_urb_dequeue() isn't set up to be called with interrupts
      	disabled.
      
      	hcd_endpoint_disable() doesn't wait for all URBs on the
      	endpoint's queue to complete.
      
      The two problems are related because the one type of URB that isn't
      likely to be complete when hcd_endpoint_disable() returns is a root-hub
      URB.  Right now usb_rh_urb_dequeue() waits for them to complete, and it
      assumes interrupts are enabled so it can wait.  But
      hcd_endpoint_disable() calls it with interrupts disabled.
      
      Now, it should be legal to unlink root-hub URBs with interrupts
      disabled.  The solution is to move the waiting into
      hcd_endpoint_disable(), where it belongs.  This patch (as754) does that.
      
      It turns out to be completely safe to replace the del_timer_sync() with
      a simple del_timer().  It doesn't matter if the timer routine is
      running; hcd_root_hub_lock will synchronize the two threads and the
      status URB will complete with an unlink error, as it should.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      455b25fb
    • A
      USB: Properly unregister reboot notifier in case of failure in ehci hcd · 64a21d02
      Aleksey Gorelov 提交于
      If some problem occurs during ehci startup, for instance, request_irq fails,
      echi hcd driver tries it best to cleanup, but fails to unregister reboot
      notifier, which in turn leads to crash on reboot/poweroff.
      
      The following patch resolves this problem by not using reboot notifiers
      anymore, but instead making ehci/ohci driver get its own shutdown method.  For
      PCI, it is done through pci glue, for everything else through platform driver
      glue.
      
      One downside: sa1111 does not use platform driver stuff, and does not have its
      own shutdown hook, so no 'shutdown' is called for it now.  I'm not sure if it
      is really necessary on that platform, though.
      Signed-off-by: NAleks Gorelov <dared1st@yahoo.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: David Brownell <david-b@pacbell.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      64a21d02
  3. 01 7月, 2006 1 次提交
  4. 20 6月, 2006 1 次提交
    • D
      [SPARC]: Kill __irq_itoa(). · c6387a48
      David S. Miller 提交于
      This ugly hack was long overdue to die.
      
      It was a way to print out Sparc interrupts in a more freindly format,
      since IRQ numbers were arbitrary opaque 32-bit integers which vectored
      into PIL levels.  These 32-bit integers were not necessarily in the
      0-->NR_IRQS range, but the PILs they vectored to were.
      
      The idea now is that we will increase NR_IRQS a little bit and use a
      virtual<-->real IRQ number mapping scheme similar to PowerPC.
      
      That makes this IRQ printing hack irrelevant, and furthermore only a
      handful of drivers actually used __irq_itoa() making it even less
      useful.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c6387a48
  5. 09 5月, 2006 1 次提交
  6. 21 3月, 2006 4 次提交
  7. 05 1月, 2006 2 次提交
    • A
      [PATCH] USB: Consider power budget when choosing configuration · 55c52718
      Alan Stern 提交于
      This patch (as609) changes the way we keep track of power budgeting for
      USB hubs and devices, and it updates the choose_configuration routine to
      take this information into account.  (This is something we should have
      been doing all along.)  A new field in struct usb_device holds the amount
      of bus current available from the upstream port, and the usb_hub structure
      keeps track of the current available for each downstream port.
      
      Two new rules for configuration selection are added:
      
      	Don't select a self-powered configuration when only bus power
      	is available.
      
      	Don't select a configuration requiring more bus power than is
      	available.
      
      However the first rule is #if-ed out, because I found that the internal
      hub in my HP USB keyboard claims that its only configuration is
      self-powered.  The rule would prevent the configuration from being chosen,
      leaving the hub & keyboard unconfigured.  Since similar descriptor errors
      may turn out to be fairly common, it seemed wise not to include a rule
      that would break automatic configuration unnecessarily for such devices.
      
      The second rule may also trigger unnecessarily, although this should be
      less common.  More likely it will annoy people by sometimes failing to
      accept configurations that should never have been chosen in the first
      place.
      
      The patch also changes usbcore's reaction when no configuration is
      suitable.  Instead of raising an error and rejecting the device, now
      the core will simply leave the device unconfigured.  People can always
      work around such problems by installing configurations manually through
      sysfs.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      55c52718
    • A
      [PATCH] USB: Remove USB private semaphore · 9ad3d6cc
      Alan Stern 提交于
      This patch (as605) removes the private udev->serialize semaphore,
      relying instead on the locking provided by the embedded struct device's
      semaphore.  The changes are confined to the core, except that the
      usb_trylock_device routine now uses the return convention of
      down_trylock rather than down_read_trylock (they return opposite values
      for no good reason).
      
      A couple of other associated changes are included as well:
      
      	Now that we aren't concerned about HCDs that avoid using the
      	hcd glue layer, usb_disconnect no longer needs to acquire the
      	usb_bus_lock -- that can be done by usb_remove_hcd where it
      	belongs.
      
      	Devices aren't locked over the same scope of code in
      	usb_new_device and hub_port_connect_change as they used to be.
      	This shouldn't cause any trouble.
      
      Along with the preceding driver core patch, this needs a lot of testing.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      9ad3d6cc
  8. 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
  9. 18 11月, 2005 1 次提交
  10. 29 10月, 2005 11 次提交
  11. 28 10月, 2005 1 次提交
  12. 13 9月, 2005 1 次提交
  13. 08 9月, 2005 1 次提交
  14. 06 9月, 2005 1 次提交
  15. 30 7月, 2005 1 次提交
  16. 13 7月, 2005 1 次提交
  17. 28 6月, 2005 2 次提交
    • A
      [PATCH] usbcore: register root hub in usb_add_hcd · 8ec8d20b
      Alan Stern 提交于
      This patch makes usbcore automatically allocate and register the root hub
      device for a new host controller when the controller is registered.  This
      way the HCDs don't all have to include the same boilerplate code.  As a
      pleasant side benefit, the register_root_hub routine can now be made
      static and not EXPORTed.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      8ec8d20b
    • A
      [PATCH] usbcore support for root-hub IRQ instead of polling · d5926ae7
      Alan Stern 提交于
      This is a revised version of an earlier patch to add support to usbcore
      for driving root hubs by interrupts rather than polling.
      
      There's a temporary flag added to struct usb_hcd, marking devices whose
      drivers are aware of the new mechanism.  By default that flag doesn't get
      set so drivers will continue to see the same polling behavior as before.
      This way we can convert the HCDs one by one to use interrupt-based event
      reporting, and the temporary flag can be removed when they're all done.
      
      Also included is a small change to the hcd_disable_endpoint routine.
      Although endpoints normally shouldn't be disabled while a controller is
      suspended, it's legal to do so when the controller's driver is being
      rmmod'ed.
      
      Lastly the patch adds a new callback, .hub_irq_enable, for use by HCDs
      where the root hub's port-change interrupts are level-triggered rather
      than edge-triggered.  The callback is invoked each time khubd has finished
      processing a root hub, to let the HCD know that the interrupt can safely
      be re-enabled.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      d5926ae7
  18. 24 6月, 2005 1 次提交
  19. 21 6月, 2005 1 次提交