1. 29 10月, 2005 15 次提交
    • A
      [PATCH] usbcore: Use kzalloc instead of kmalloc/memset · 0a1ef3b5
      Alan Stern 提交于
      This patch (as590) fixes up all the remaining places where usbcore can
      use kzalloc rather than kmalloc/memset.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      0a1ef3b5
    • G
      54a5c4cd
    • G
      a7b986b3
    • G
      [PATCH] USB: add notifier functions to the USB core for devices and busses · 3099e75a
      Greg Kroah-Hartman 提交于
      This should let us get rid of all of the different hooks in the USB core for
      when something has changed.
      
      Also, some other parts of the kernel have wanted to know this kind of
      information at times.
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      3099e75a
    • A
      [PATCH] USB: Rename hcd->hub_suspend to hcd->bus_suspend · 0c0382e3
      Alan Stern 提交于
      This patch (as580) is perhaps the only result from the long discussion I
      had with David about his changes to the root-hub suspend/resume code.  It
      renames the hub_suspend and hub_resume methods in struct usb_hcd to
      bus_suspend and bus_resume.  These are more descriptive names, since the
      methods really do suspend or resume an entire USB bus, and less likely to
      be confused with the hub_suspend and hub_resume routines in hub.c.
      
      It also takes David's advice about removing the layer of bus glue, where
      those methods are called.  And it implements a related change that David
      made to the other HCDs but forgot to put into dummy_hcd.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      0c0382e3
    • G
      [PATCH] USB: make wHubCharacteristics __le16 to match other usb descriptor fields · 74ad9bd2
      Greg Kroah-Hartman 提交于
      Also has the nice benefit of making sparc alignment issues go away.
      
      Thanks to David Miller for pointing out the problems here.
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
       drivers/usb/core/hub.c |   22 ++++++++++++----------
       drivers/usb/core/hub.h |    2 +-
       2 files changed, 13 insertions(+), 11 deletions(-)
      74ad9bd2
    • D
      [PATCH] stop exporting two functions · 5edbfb7c
      David Brownell 提交于
      The way we're looking at USB suspend lately doesn't expect drivers to
      call usb_suspend_device() or usb_resume_device() directly; that'll
      be implicit when no interfaces are in use.
      
      This patch removes those APIs from visibility outside usbcore.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      
       drivers/usb/core/hub.c |   12 ++++--------
       drivers/usb/core/usb.h |    4 ++++
       include/linux/usb.h    |    5 -----
       3 files changed, 8 insertions(+), 13 deletions(-)
      5edbfb7c
    • D
      [PATCH] root hub updates (greater half) · f3f3253d
      David Brownell 提交于
      This patch associates hub suspend and resume logic (including for root hubs)
      with CONFIG_PM -- instead of CONFIG_USB_SUSPEND as before -- thereby unifying
      two troublesome versions of suspend logic into just one.  It'll be easier to
      keep things right from now on.
      
        - Now usbcore _always_ calls hcd->hub_suspend as needed, instead of
          only when USB_SUSPEND is enabled:
           * Those root hub methods are now called from hub suspend/resume;
             no more skipping between layers during device suspend/resume;
           * It now handles cases allowed by sysfs or autosuspended root hubs,
             by forcing the hub interface to resume too.
      
        - All devices, including virtual root hubs, now get the same treatment
          on their resume paths ... including re-activating all their interfaces.
      
      Plus it gets rid of those stub copies of usb_{suspend,resume}_device(), and
      updates the Kconfig to match the new definition of USB_SUSPEND:  it provides
      (a) selective suspend, downstream from hubs; and (b) remote wakeup, upstream
      from any device configuration which supports it.
      
      This calls for minor followup patches for most HCDs (and their PCI glue).
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
       drivers/usb/core/Kconfig |   11 ++-
       drivers/usb/core/hub.c   |  163 +++++++++++++++++++++++++----------------------
       2 files changed, 97 insertions(+), 77 deletions(-)
      f3f3253d
    • D
      [PATCH] root hub changes (lesser half) · 979d5199
      David Brownell 提交于
      This patch collects various small updates related to root hubs, to shrink
      later patches which build on them.
      
        - For root hub suspend/resume support:
           * Make the existing usb_hcd_resume_root_hub() routine respect pmcore
             locking, exporting and using the dpm_runtime_resume() method.
           * Add a new usb_hcd_suspend_root_hub() to pair with that routine.
             (Essential to make OHCI autosuspend behave again...)
           * HC_SUSPENDED by itself only refers to the root hub's downstream ports.
             So let HCDs see root hub URBs unless the parent device is suspended.
      
        - Remove an assertion we no longer need (and now, also don't want).
      
        - Generic suspend/resume updates to work better with swsusp.
           * Ignore the FREEZE vs SUSPEND distinction for hardware; trying to
             use it breaks the swsusp snapshots it's supposed to help (sigh).
           * On resume, mark devices as resumed right away, but then
             do nothing else if the device is marked NOTATTACHED.
      
      These changes shouldn't be very noticable by themselves.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
       drivers/base/power/runtime.c |    1
       drivers/usb/core/hcd.c       |   64 ++++++++++++++++++++++++++++++++++++++-----
       drivers/usb/core/hcd.h       |    1
       drivers/usb/core/hub.c       |   45 ++++++++++++++++++++++++------
       drivers/usb/core/usb.c       |   20 +++++++++----
       drivers/usb/core/usb.h       |    1
       6 files changed, 111 insertions(+), 21 deletions(-)
      979d5199
    • M
      [PATCH] USB: Fix usb hub build · e08fb39b
      Matt Porter 提交于
      Signed-off-by: NMatt Porter <mporter@kernel.crashing.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
       drivers/usb/core/hub.c |    2 +-
       1 file changed, 1 insertion(+), 1 deletion(-)
      e08fb39b
    • D
      [PATCH] remove duplicated resume path code · dbc3887e
      David Brownell 提交于
      This gets rid of some inconsistently duplicated logic to resume interfaces.
      Similar code was in both finish_port_resume() and in usb_generic_resume().
      Now there is just one copy of that code, accessed regardless of whether
      CONFIG_USB_SUSPEND is enabled.  Fault handling is also more consistent.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      dbc3887e
    • D
      [PATCH] remove usb_suspend_device() parameter · 390a8c34
      David Brownell 提交于
      This patch removes the extra usb_suspend_device() parameter.  The original
      reason to pass that parameter was so that this routine could suspend any
      active children.  A previous patch removed that functionality ... leaving
      no reason to pass the parameter.  A close analogy is pci_set_power_state,
      which doesn't need a pm_message_t either.
      
      On the internal code path that comes through the driver model, the parameter
      is now used to distinguish cases where USB devices need to "freeze" but not
      suspend.   It also checks for an error case that's accessible through sysfs:
      attempting to suspend a device before its interfaces (or for hubs, ports).
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
       drivers/usb/core/hub.c         |   34 +++++++++++++++++++++-------------
       drivers/usb/core/usb.c         |   23 +++++++++++++++++++++--
       drivers/usb/host/ehci-hcd.c    |    2 +-
       drivers/usb/host/isp116x-hcd.c |    2 +-
       drivers/usb/host/ohci-pci.c    |    2 +-
       include/linux/usb.h            |    2 +-
       6 files changed, 46 insertions(+), 19 deletions(-)
      390a8c34
    • D
      [PATCH] remove suspend-path recursion · c9f89fa4
      David Brownell 提交于
      This patch removes some recursion in the CONFIG_USB_SUSPEND logic, which
      suspended children (of devices or hubs) that weren't already suspended.
      When it sees such cases, suspend now just fails cleanly.
      
      That logic was not needed during system-wide sleep state transitions; and
      given the current notions of how to manage selective suspend transitions,
      we don't want it there either.  Where it was particularly handy was coping
      with various limitations of the sysfs "echo -n N > power/state" support.
      (These include assuming that "N" is always meaningful to the driver; and
      that drivers can only transition to state N from state zero.)
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      c9f89fa4
    • D
      [PATCH] usb_interface power state · db690874
      David Brownell 提交于
      This updates the handling of power state for USB interfaces.
      
        - Formalizes an existing invariant:  interface "power state" is a boolean:
          ON when I/O is allowed, and FREEZE otherwise.  It does so by defining
          some inlined helpers, then using them.
      
        - Adds a useful invariant:  the only interfaces marked active are those
          bound to non-suspended drivers.  Later patches build on this invariant.
      
        - Simplifies the interface driver API (and removes some error paths) by
          removing the requirement that they record power state changes during
          suspend and resume callbacks.  Now usbcore does that.
      
      A few drivers were simplified to address that last change.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
       drivers/usb/core/hub.c       |   33 +++++++++------------
       drivers/usb/core/message.c   |    1
       drivers/usb/core/usb.c       |   65 +++++++++++++++++++++++++++++++++----------
       drivers/usb/core/usb.h       |   18 +++++++++++
       drivers/usb/input/hid-core.c |    2 -
       drivers/usb/misc/usbtest.c   |   10 ------
       drivers/usb/net/pegasus.c    |    2 -
       drivers/usb/net/usbnet.c     |    2 -
       8 files changed, 85 insertions(+), 48 deletions(-)
      db690874
    • D
      [PATCH] usb device wakeup flags · b94dc6b5
      David Brownell 提交于
      This patch teaches "usb_device" about the new driver model wakeup support:
      
       - It updates device wakeup capabilities when entering a configuration
         with the WAKEUP attribute;
      
       - During suspend processing it consults the policy bit to see
         whether it should enable wakeup for that device.  (This resolves
         a FIXME to not assume the answer is always "yes"; some devices
         lie about supporting remote wakeup.)
      
      Support for root hubs and the HCDs is separate (and more complex).
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b94dc6b5
  2. 13 9月, 2005 2 次提交
  3. 09 9月, 2005 4 次提交
    • D
      [PATCH] ehci: add think_time · e09711ae
      david-b@pacbell.net 提交于
      This adds think_time to the usb_tt struct and sets it appropriately
      (measured in ns); this can help us implement better split transaction
      scheduling.
      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>
      e09711ae
    • A
      [PATCH] USB: Disconnect children when unbinding the hub driver · bf193d3c
      Alan Stern 提交于
      This patch (as554) makes the hub driver disconnect any child USB devices
      when it is unbound from a hub.  Normally this will never happen, but
      there are a few oddball ways to unbind the hub driver while leaving the
      children intact.  For example, the new "unbind" sysfs attribute can be
      used for this purpose.
      
      Given that unbinding hubs with children is now safe, the patch also
      removes the code that prevented people from doing so using usbfs.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      bf193d3c
    • A
      [PATCH] USB: Code motion in the hub driver · 8b28c752
      Alan Stern 提交于
      This patch (as553) merely moves some code and deletes an unneeded test in
      the hub driver.  This is in preparation for the patch that follows.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      8b28c752
    • K
      [PATCH] USB: real nodes instead of usbfs · fbf82fd2
      Kay Sievers 提交于
      This patch introduces a /sys/class/usb_device/ class
      where every connected usb-device will show up:
      
        tree /sys/class/usb_device/
        /sys/class/usb_device/
        |-- usb1.1
        |   |-- dev
        |   `-- device -> ../../../devices/pci0000:00/0000:00:1d.0/usb1
        |-- usb2.1
        |   |-- dev
        |   `-- device -> ../../../devices/pci0000:00/0000:00:1d.1/usb2
        ...
      
      The presence of the "dev" file lets udev create real device nodes.
        kay@pim:~/src/linux-2.6> tree /dev/bus/usb/
        /dev/bus/usb/
        |-- 1
        |   `-- 1
        |-- 2
        |   `-- 1
        ...
      
      udev rule:
        SUBSYSTEM="usb_device", PROGRAM="/sbin/usb_device %k", NAME="%c"
        (echo $1 | /bin/sed 's/usb\([0-9]*\)\.\([0-9]*\)/bus\/usb\/\1\/\2/')
      
      This makes libusb pick up the real nodes instead of the mounted usbfs:
        export USB_DEVFS_PATH=/dev/bus/usb
      
      Background:
        All this makes it possible to manage usb devices with udev instead of
        the devfs solution. We are currently working on a pam_console/resmgr
        replacement driven by udev and a pam-helper. It applies ACL's to device
        nodes, which is required for modern desktop functionalty like
        "Fast User Switching" or multiple local login support.
      
      New patch with its own major. I've succesfully disabled usbfs and use real
      nodes only on my box. With: "export USB_DEVFS_PATH=/dev/bus/usb" libusb picks
      up the udev managed nodes instead of reading usbfs files.
      
      This makes udev to provide symlinks for libusb to pick up:
        SUBSYSTEM="usb_device", PROGRAM="/sbin/usbdevice %k", SYMLINK="%c"
      
      /sbin/usbdevice:
        #!/bin/sh
        echo $1 | /bin/sed 's/usbdev\([0-9]*\)\.\([0-9]*\)/bus\/usb\/\1\/\2/'
      Signed-off-by: NKay Sievers <kay.sievers@suse.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      fbf82fd2
  4. 05 9月, 2005 1 次提交
  5. 13 7月, 2005 1 次提交
  6. 28 6月, 2005 3 次提交
    • A
      [PATCH] USB: usbcore: inverted test for resuming interfaces · 0ed0c0c4
      Alan Stern 提交于
      This one-liner fixes a test for interfaces that are already resumed.
      
      It would be nice if this could get into 2.6.12, but it's not critical
      since it only affects people doing selective (runtime) suspend/resume.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      0ed0c0c4
    • A
      [PATCH] usbcore: Remove hub_set_power_budget · 7d35b929
      Alan Stern 提交于
      This patch removes the hub_set_power_budget routine, which was used by a
      couple of HCDs to indicate that the root hub was running on battery power.
      In its place is a new field added to struct usb_hcd, which HCDs can set
      before the root hub is registered.  Special-case code in the hub driver
      knows to look at this field when configuring a root hub.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Acked-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      7d35b929
    • 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
  7. 26 6月, 2005 1 次提交
    • C
      [PATCH] Cleanup patch for process freezing · 3e1d1d28
      Christoph Lameter 提交于
      1. Establish a simple API for process freezing defined in linux/include/sched.h:
      
         frozen(process)		Check for frozen process
         freezing(process)		Check if a process is being frozen
         freeze(process)		Tell a process to freeze (go to refrigerator)
         thaw_process(process)	Restart process
         frozen_process(process)	Process is frozen now
      
      2. Remove all references to PF_FREEZE and PF_FROZEN from all
         kernel sources except sched.h
      
      3. Fix numerous locations where try_to_freeze is manually done by a driver
      
      4. Remove the argument that is no longer necessary from two function calls.
      
      5. Some whitespace cleanup
      
      6. Clear potential race in refrigerator (provides an open window of PF_FREEZE
         cleared before setting PF_FROZEN, recalc_sigpending does not check
         PF_FROZEN).
      
      This patch does not address the problem of freeze_processes() violating the rule
      that a task may only modify its own flags by setting PF_FREEZE. This is not clean
      in an SMP environment. freeze(process) is therefore not SMP safe!
      Signed-off-by: NChristoph Lameter <christoph@lameter.com>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      3e1d1d28
  8. 19 4月, 2005 3 次提交
  9. 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