1. 11 9月, 2012 2 次提交
    • S
      usb/core: use bin2bcd() for bcdDevice in RH · b53d657d
      Sebastian Andrzej Siewior 提交于
      The kernel's version number is used as decimal in the bcdDevice field of
      the RH descriptor. For kernel version v3.12 we would see 3.0c in lsusb.
      I am not sure how important it is to stick with bcd values since this is
      this way since we started git history and nobody complained (however back
      then we reported only 2.6).
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b53d657d
    • H
      usbfs: Add a new disconnect-and-claim ioctl (v2) · 0837e7e5
      Hans de Goede 提交于
      Apps which deal with devices which also have a kernel driver, need to do
      the following:
      1) Check which driver is attached, so as to not detach the wrong driver
         (ie detaching usbfs while another instance of the app is using the device)
      2) Detach the kernel driver
      3) Claim the interface
      
      Where moving from one step to the next for both 1-2 and 2-3 consists of
      a (small) race window. So currently such apps are racy and people just live
      with it.
      
      This patch adds a new ioctl which makes it possible for apps to do this
      in a race free manner. For flexibility apps can choose to:
      1) Specify the driver to disconnect
      2) Specify to disconnect any driver except for the one named by the app
      3) Disconnect any driver
      
      Note that if there is no driver attached, the ioctl will just act like the
      regular claim-interface ioctl, this is by design, as returning an error for
      this condition would open a new bag of race-conditions.
      
      Changes in v2:
      -Fix indentation of if blocks where the condition spans multiple lines
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      0837e7e5
  2. 07 9月, 2012 1 次提交
  3. 06 9月, 2012 14 次提交
  4. 22 8月, 2012 19 次提交
  5. 21 8月, 2012 4 次提交