1. 17 3月, 2017 1 次提交
  2. 27 9月, 2016 1 次提交
    • R
      usb: core: Introduce a USB port LED trigger · 0f247626
      Rafał Miłecki 提交于
      This commit adds a new trigger responsible for turning on LED when USB
      device gets connected to the selected USB port. This can can useful for
      various home routers that have USB port(s) and a proper LED telling user
      a device is connected.
      
      The trigger gets its documentation file but basically it just requires
      enabling it and selecting USB ports (e.g. echo 1 > ports/usb1-1).
      
      There was a long discussion on design of this driver. Its current state
      is a result of picking them most adjustable solution as others couldn't
      handle all cases.
      
      1) It wasn't possible for the driver to register separated trigger for
         each USB port. Some physical USB ports are handled by more than one
         controller and so by more than one USB port. E.g. USB 2.0 physical
         port may be handled by OHCI's port and EHCI's port.
         It's also not possible to assign more than 1 trigger to a single LED
         and implementing such feature would be tricky due to syncing triggers
         and sysfs conflicts with old triggers.
      
      2) Another idea was to register trigger per USB hub. This wouldn't allow
         handling devices with multiple USB LEDs and controllers (hubs)
         controlling more than 1 physical port. It's common for hubs to have
         few ports and each may have its own LED.
      
      This final trigger is highly flexible. It allows selecting any USB ports
      for any LED. It was also modified (comparing to the initial version) to
      allow choosing ports rather than having user /guess/ proper names. It
      was successfully tested on SmartRG SR400ac which has 3 USB LEDs,
      2 physical ports and 3 controllers.
      
      It was noted USB subsystem already has usb-gadget and usb-host triggers
      but they are pretty trivial ones. They indicate activity only and can't
      have ports specified.
      
      In future it may be good idea to consider adding activity support to
      usbport as well. This should allow switching to this more generic driver
      and maybe marking old ones as obsolete.
      This can be implemented with another sysfs file for setting mode. The
      default mode wouldn't change so there won't be ABI breakage and so such
      feature can be safely implemented later.
      
      There was also an idea of supporting other devices (PCI, SDIO, etc.) but
      as this driver already contains some USB specific code (and will get
      more) these should be probably separated drivers (triggers).
      Signed-off-by: NRafał Miłecki <rafal@milecki.pl>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      0f247626
  3. 09 8月, 2016 1 次提交
  4. 06 3月, 2016 1 次提交
  5. 22 12月, 2013 1 次提交
    • G
      USB: core: remove CONFIG_USB_DEBUG usage · 3482528e
      Greg Kroah-Hartman 提交于
      CONFIG_USB_DEBUG is going away, so remove the few places in the USB core
      that relied on them.
      
      This means that we always now do the "debug" checks for every urb
      submitted, which is a good idea, as who knows how many driver bugs we
      have been ignoring when people forget to enable this option.  Also, with
      the overall speed of USB, doing these extra checks should not cause any
      additional overhead.
      
      Also, no longer announce all devices being added to the system if
      CONFIG_USB_DEBUG is enabled, as it's not going to be around much longer.
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3482528e
  6. 19 1月, 2013 1 次提交
  7. 12 5月, 2012 1 次提交
  8. 30 4月, 2012 1 次提交
  9. 23 10月, 2010 2 次提交
  10. 16 6月, 2009 1 次提交
    • G
      USB: add the usbfs devices file to debugfs · 97d7b7a4
      Greg Kroah-Hartman 提交于
      People are very used to the devices file in usbfs.  Now that we have
      moved usbfs to be an "embedded" option only, the developers miss the
      file, they had grown quite attached to it over all of these years.  This
      patch brings it back and puts it in the usb debugfs directory, so that
      the developers don't feel sad anymore.
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      97d7b7a4
  11. 24 2月, 2007 1 次提交
  12. 28 9月, 2006 1 次提交
    • A
      usbcore: move code among source files · 36e56a34
      Alan Stern 提交于
      This revised patch (as713b) moves a few routines among source files in
      usbcore.  Some driver-related code in usb.c (claiming interfaces and
      matching IDs) is moved to driver.c, where it belongs.  Also the
      usb_generic stuff in driver.c is moved to a new source file: generic.c.
      (That's the reason for revising the patch.)  Although not very big now,
      it will get bigger in a later patch.
      
      None of the code has been changed; it has only been re-arranged.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      36e56a34
  13. 22 6月, 2006 1 次提交
  14. 05 1月, 2006 1 次提交
  15. 18 11月, 2005 1 次提交
  16. 29 10月, 2005 1 次提交
  17. 09 9月, 2005 1 次提交
    • 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
  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