23 Feb, 2017

2 commits


23 Jun, 2016

1 commit


05 May, 2016

1 commit


04 May, 2016

1 commit


14 Apr, 2016

1 commit


06 Mar, 2016

1 commit

  • The new USBDEVFS_DROP_PRIVILEGES ioctl allows a process to voluntarily
    relinquish the ability to issue other ioctls that may interfere with
    other processes and drivers that have claimed an interface on the
    device.

    This commit also includes a simple utility to be able to test the
    ioctl, located at Documentation/usb/usbdevfs-drop-permissions.c

    Example (with qemu-kvm's input device):

    $ lsusb
    ...
    Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd

    $ usb-devices
    ...
    C: #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=100mA
    I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=02 Driver=usbhid

    $ sudo ./usbdevfs-drop-permissions /dev/bus/usb/001/002
    OK: privileges dropped!
    Available options:
    [0] Exit now
    [1] Reset device. Should fail if device is in use
    [2] Claim 4 interfaces. Should succeed where not in use
    [3] Narrow interface permission mask
    Which option shall I run?: 1
    ERROR: USBDEVFS_RESET failed! (1 - Operation not permitted)
    Which test shall I run next?: 2
    ERROR claiming if 0 (1 - Operation not permitted)
    ERROR claiming if 1 (1 - Operation not permitted)
    ERROR claiming if 2 (1 - Operation not permitted)
    ERROR claiming if 3 (1 - Operation not permitted)
    Which test shall I run next?: 0

    After unbinding usbhid:

    $ usb-devices
    ...
    I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=02 Driver=(none)

    $ sudo ./usbdevfs-drop-permissions /dev/bus/usb/001/002
    ...
    Which option shall I run?: 2
    OK: claimed if 0
    ERROR claiming if 1 (1 - Operation not permitted)
    ERROR claiming if 2 (1 - Operation not permitted)
    ERROR claiming if 3 (1 - Operation not permitted)
    Which test shall I run next?: 1
    OK: USBDEVFS_RESET succeeded
    Which test shall I run next?: 0

    After unbinding usbhid and restricting the mask:

    $ sudo ./usbdevfs-drop-permissions /dev/bus/usb/001/002
    ...
    Which option shall I run?: 3
    Insert new mask: 0
    OK: privileges dropped!
    Which test shall I run next?: 2
    ERROR claiming if 0 (1 - Operation not permitted)
    ERROR claiming if 1 (1 - Operation not permitted)
    ERROR claiming if 2 (1 - Operation not permitted)
    ERROR claiming if 3 (1 - Operation not permitted)

    Signed-off-by: Reilly Grant
    Acked-by: Alan Stern
    Signed-off-by: Emilio López
    Signed-off-by: Greg Kroah-Hartman

    Reilly Grant
     

05 Mar, 2016

1 commit


04 Mar, 2016

2 commits

  • Update HNP test procedure as HNP polling is supported.

    Acked-by: Peter Chen
    Signed-off-by: Li Jun
    Signed-off-by: Felipe Balbi

    Li Jun
     
  • The usbip_protocol.txt, a document which describes usbip's
    inner workings is currently located in the projects source
    directory (drivers/usb/usbip/...). This patch moves it to
    Documentation/usb.

    This discussion was brought up by Guy Harris [0] during the
    review of the USBIP dissector I wrote. For anyone interested:
    support is available with the latest wireshark master/dev tree.
    Simply select a packet from the usbip's tcp-stream you are
    intrested on and select the USBIP as the protocol in the
    "Decode As" dialog box [1].

    Signed-off-by: Christian Lamparter

    [0]
    [1]
    Signed-off-by: Greg Kroah-Hartman

    Christian Lamparter
     

27 Dec, 2015

2 commits


24 Dec, 2015

1 commit


17 Dec, 2015

1 commit


15 Dec, 2015

1 commit


02 Dec, 2015

1 commit

  • Commit 655fe4effe0f ("usbcore: add sysfs support to xHCI usb3
    hardware LPM") introduced usb3_hardware_lpm sysfs node. This
    doesn't show the correct status of USB3 U1 and U2 LPM status.

    This patch fixes this by replacing usb3_hardware_lpm with two
    nodes, usb3_hardware_lpm_u1 (for U1) and usb3_hardware_lpm_u2
    (for U2), and recording the U1/U2 LPM status in right places.

    This patch should be back-ported to kernels as old as 4.3,
    that contains Commit 655fe4effe0f ("usbcore: add sysfs support
    to xHCI usb3 hardware LPM").

    Cc: stable@vger.kernel.org
    Signed-off-by: Lu Baolu
    Signed-off-by: Greg Kroah-Hartman

    Lu Baolu
     

23 Sep, 2015

1 commit


19 Aug, 2015

1 commit


15 Aug, 2015

2 commits

  • This part adds the documentation for the interface authorization.

    Signed-off-by: Stefan Koch
    Signed-off-by: Greg Kroah-Hartman

    Stefan Koch
     
  • Felipe writes:

    usb: patches for v4.3 merge window

    New support for Allwinne SoC on the MUSB driver has been added to the list of
    glue layers. MUSB also got support for building all DMA engines in one binary;
    this will be great for distros.

    DWC3 now has no trace of dev_dbg()/dev_vdbg() usage. We will rely solely on
    tracing to debug DWC3. There was also a fix for memory corruption with EP0 when
    maxpacket size transfers are > 512 bytes.

    Robert's EP capabilities flags is making EP selection a lot simpler. UDCs are
    now required to set these flags up when adding endpoints to the framework.

    Other than these, we have the usual set of miscelaneous cleanups and minor
    fixes.

    Signed-off-by: Felipe Balbi

    Greg Kroah-Hartman
     

31 Jul, 2015

1 commit


23 Jul, 2015

1 commit


27 Jun, 2015

1 commit

  • Pull USB updates from Greg KH:
    "Here's the big USB patchset for 4.2-rc1. As is normal these days, the
    majority of changes are in the gadget drivers, with a bunch of other
    small driver changes.

    All of these have been in linux-next with no reported issues"

    * tag 'usb-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (175 commits)
    usb: dwc3: Use ASCII space in Kconfig
    usb: chipidea: add work-around for Marvell HSIC PHY startup
    usb: chipidea: allow multiple instances to use default ci_default_pdata
    dt-bindings: Consolidate ChipIdea USB ci13xxx bindings
    phy: add Marvell HSIC 28nm PHY
    phy: Add Marvell USB 2.0 OTG 28nm PHY
    dt-bindings: Add Marvell PXA1928 USB and HSIC PHY bindings
    USB: ssb: use devm_kzalloc
    USB: ssb: fix error handling in ssb_hcd_create_pdev()
    usb: isp1760: check for null return from kzalloc
    cdc-acm: Add support of ATOL FPrint fiscal printers
    usb: chipidea: usbmisc_imx: Remove unneeded semicolon
    USB: usbtmc: add device quirk for Rigol DS6104
    USB: serial: mos7840: Use setup_timer
    phy: twl4030-usb: add ABI documentation
    phy: twl4030-usb: remove incorrect pm_runtime_get_sync() in probe function.
    phy: twl4030-usb: remove pointless 'suspended' test in 'suspend' callback.
    phy: twl4030-usb: make runtime pm more reliable.
    drivers:usb:fsl: Fix compilation error for fsl ehci drv
    usb: renesas_usbhs: Don't disable the pipe if Control write status stage
    ...

    Linus Torvalds
     

08 May, 2015

1 commit

  • RNDIS function has a limitation on the number of allowed instances.
    So far it has been RNDIS_MAX_CONFIGS, which happens to be one.
    In order to eliminate this kind of arbitrary limitation we should not
    preallocate a predefined (RNDIS_MAX_CONFIGS) array of struct rndis_params
    instances but instead allow allocating them on demand.

    This patch allocates struct rndis_params on demand in rndis_register().
    Coversly, the structure is free()'d in rndis_deregister().
    If CONFIG_USB_GADGET_DEBUG_FILES is set, the proc files are created which
    is the same behaviour as before, but the moment of creation is delayed
    until struct rndis_params is actually allocated.

    rnids_init() and rndis_exit() have nothing to do, so they are eliminated.

    Signed-off-by: Andrzej Pietrasiewicz
    Signed-off-by: Felipe Balbi

    Andrzej Pietrasiewicz
     

07 May, 2015

1 commit

  • While trying to test a Cinterion GSM/GPS/3G module I had reconfigured
    the USB interface by mistake and therefore needed to run a different
    USB driver than CDC-ACM. It turned out that I need the "usbserial" driver.

    This file is an official description how to use it:
    Documentation/usb/usb-serial.txt

    But it is outdated. The parameters vendor= and product= have been
    superseded by a /sys interface.

    Here was the solution:

    https://bbs.archlinux.org/viewtopic.php?id=175499

    insmod usbserial vendor=0x#### product=0x####

    becomes (first #### is vendor, second is product)

    modprobe usbserial
    echo #### #### >/sys/bus/usb-serial/drivers/generic/new_id

    This patch changes the documentation file to describe the modern variant.
    Please note that the old one still works (if compiled as module).

    Signed-off-by: H. Nikolaus Schaller
    Signed-off-by: Marek Belisko
    Signed-off-by: Jonathan Corbet

    H. Nikolaus Schaller
     

28 Apr, 2015

1 commit


25 Mar, 2015

1 commit


18 Mar, 2015

1 commit


11 Mar, 2015

1 commit


05 Feb, 2015

1 commit

  • Felipe writes:

    usb: patches for v3.20 merge window

    Here's the big pull request for Gadgets and PHYs. It's
    a total of 217 non-merge commits with pretty much everything
    being touched.

    The most important bits are a ton of new documentation for
    almost all usb gadget functions, a new isp1760 UDC driver,
    several improvements to the old net2280 UDC driver, and
    some minor tracepoint improvements to dwc3.

    Other than that, a big list of minor cleanups, smaller bugfixes
    and new features all over the place.

    Signed-off-by: Felipe Balbi

    Greg Kroah-Hartman
     

13 Jan, 2015

10 commits