20 Jun, 2017

1 commit


13 Jun, 2017

6 commits

  • This patch adds a USB3 HCD to an existing USB2 HCD and provides
    the support of SuperSpeed, in case the device can only be enumerated
    with SuperSpeed.

    The bulk of the added code in usb3_bos_desc and hub_control to support
    SuperSpeed is borrowed from the commit 1cd8fd2887e162ad ("usb: gadget:
    dummy_hcd: add SuperSpeed support").

    With this patch, each vhci will have VHCI_HC_PORTS HighSpeed ports
    and VHCI_HC_PORTS SuperSpeed ports.

    Suggested-by: Krzysztof Opasiak
    Signed-off-by: Yuyang Du
    Acked-by: Shuah Khan
    Signed-off-by: Greg Kroah-Hartman

    Yuyang Du
     
  • A vhci struct is added as the platform-specific data to the vhci
    platform device, in order to get the vhci by its platform device.
    This is done in vhci_hcd_init().

    Signed-off-by: Yuyang Du
    Acked-by: Shuah Khan
    Signed-off-by: Greg Kroah-Hartman

    Yuyang Du
     
  • In parse_status(), all nports number of idev's are initiated to
    0 by memset(), it is simply wrong, because parse_status() reads
    the status sys file one by one, therefore, it can only update the
    according vhci_driver->idev's for it to parse.

    Reviewed-by: Krzysztof Opasiak
    Signed-off-by: Yuyang Du
    Acked-by: Shuah Khan
    Signed-off-by: Greg Kroah-Hartman

    Yuyang Du
     
  • The commit 0775a9cbc694e8c7 ("usbip: vhci extension: modifications
    to vhci driver") introduced multiple controllers, but the status
    of the ports are only extracted from the first status file, fix it.

    Reviewed-by: Krzysztof Opasiak
    Signed-off-by: Yuyang Du
    Acked-by: Shuah Khan
    Signed-off-by: Greg Kroah-Hartman

    Yuyang Du
     
  • A new field ncontrollers is added to the vhci_driver structure.
    And this field is stored by scanning the vhci_hcd* dirs in the
    platform udev.

    Suggested-and-reviewed-by: Krzysztof Opasiak
    Signed-off-by: Yuyang Du
    Acked-by: Shuah Khan
    Signed-off-by: Greg Kroah-Hartman

    Yuyang Du
     
  • If we get nonpositive number of ports, there is no sense to
    continue, then fail gracefully.

    In addition, the commit 0775a9cbc694e8c72 ("usbip: vhci extension:
    modifications to vhci driver") introduced configurable numbers of
    controllers and ports, but we have a static port number maximum,
    MAXNPORT. If exceeded, the idev array will be overflown. We fix
    it by validating the nports to make sure the port number max is
    not exceeded.

    Reviewed-by: Krzysztof Opasiak
    Signed-off-by: Yuyang Du
    Acked-by: Shuah Khan
    Signed-off-by: Greg Kroah-Hartman

    Yuyang Du
     

02 Jun, 2017

1 commit


18 Apr, 2017

1 commit


08 Apr, 2017

1 commit

  • The commit 0775a9cbc694e8c72 ("usbip: vhci extension: modifications
    to vhci driver") introduced multiple controllers, and nports as a sys
    file, and claimed to read the nports from it, but it didn't.

    In addition, the get_nports() has been so wrong that even with 8 port
    lines for instance, it gets 7 (I am guessing it is due to a '\n' mess).
    Nevertheless, we fix it by reading the nports attribute.

    Reviewed-by: Krzysztof Opasiak
    Signed-off-by: Yuyang Du
    Acked-by: Shuah Khan
    Signed-off-by: Greg Kroah-Hartman

    Yuyang Du
     

17 Mar, 2017

2 commits

  • GCC 7 now warns when switch statements fall through implicitly, and with
    -Werror enabled in configure.ac, that makes these tools unbuildable.

    We fix this by notifying the compiler that this particular case statement
    is meant to fall through.

    Reviewed-by: Peter Senna Tschudin
    Signed-off-by: Jonathan Dieter
    Signed-off-by: Greg Kroah-Hartman

    Jonathan Dieter
     
  • The usbip userspace tools call sprintf()/snprintf() and don't check for
    the return value which can lead the paths to overflow, truncating the
    final file in the path.

    More urgently, GCC 7 now warns that these aren't checked with
    -Wformat-overflow, and with -Werror enabled in configure.ac, that makes
    these tools unbuildable.

    This patch fixes these problems by replacing sprintf() with snprintf() in
    one place and adding checks for the return value of snprintf().

    Reviewed-by: Peter Senna Tschudin
    Signed-off-by: Jonathan Dieter
    Acked-by: Shuah Khan
    Signed-off-by: Greg Kroah-Hartman

    Jonathan Dieter
     

16 Mar, 2017

1 commit


26 Jan, 2017

1 commit

  • Felipe writes:

    USB: changes for v4.11

    Here's the big pull request for the Gadget
    API. Again the majority of changes sit in dwc2
    driver. Most important changes contain a workaround
    for GOTGCTL being wrong, a sleep-inside-spinlock fix
    and the big series of cleanups on dwc2.

    One important thing on dwc3 is that we don't anymore
    need gadget drivers to cope with unaligned OUT
    transfers for us. We have support for appending one
    extra chained TRB to align transfer ourselves.

    Apart from these, the usual set of typos,
    non-critical fixes, etc.

    Greg Kroah-Hartman
     

24 Jan, 2017

2 commits


11 Jan, 2017

2 commits


06 Dec, 2016

1 commit


07 Nov, 2016

1 commit

  • This patch removes checking of socket descriptor value in daemons.

    It was checked to be less than FD_SETSIZE(1024 usually) but it's not
    correct.

    To be exact, the maximum value of descriptor comes from
    rlimit(RLIMIT_NOFILE).

    Following kernel code determines the value :
    get_unused_fd_flags() : fs/files.c
    __alloc_fd() : fs/files.c
    expand_files() : fs/files.c

    The defalut (soft limit) is defines as INR_OPEN_CUR(1024) in
    include/linux/fs.h which is referenced form INIT_RLIMS in
    include/asm-generic/resource.h. The value may be modified with ulimt,
    sysctl, security configuration and etc.

    With the kernel code above, when socket() system call returns positive
    value, the value must be within rlimit(RLIMIT_NOFILE). No extra
    checking is needed when socket() returns positive.

    Without 'usbip: vhci number of ports extension' patch set, there's no
    practical problem because of number of USB port restriction. With the
    patch set, the value of socket descriptor can exceed FD_SETSIZE(1024
    usually) if the rlimit is changed.

    Signed-off-by: Nobuo Iwata
    Signed-off-by: Greg Kroah-Hartman

    Nobuo Iwata
     

04 May, 2016

1 commit

  • Adding names database to port command.

    BEFORE) 'unknown' for vendor and product string.

    Imported USB devices
    ====================
    Port 00: at Low Speed(1.5Mbps)
    unknown vendor : unknown product (03f0:0224)
    3-1 -> usbip://10.0.2.15:3240/5-1
    -> remote bus/dev 005/002

    AFTER) Most vendor string will be converted.

    Imported USB devices
    ====================
    Port 00: at Low Speed(1.5Mbps)
    Hewlett-Packard : unknown product (03f0:0224)
    3-1 -> usbip://10.0.2.15:3240/5-1
    -> remote bus/dev 005/002

    Signed-off-by: Nobuo Iwata
    Signed-off-by: Greg Kroah-Hartman

    Nobuo Iwata
     

27 Apr, 2016

3 commits

  • Modify userspace tools to allow exporting and connecting to vudc.

    This commit is a result of cooperation between Samsung R&D Institute
    Poland and Open Operating Systems Student Society at University
    of Warsaw (O2S3@UW) consisting of:

    Igor Kotrasinski
    Karol Kosik
    Ewelina Kosmider
    Dawid Lazarczyk
    Piotr Szulc

    Tutor and project owner:
    Krzysztof Opasiak

    Signed-off-by: Igor Kotrasinski
    Signed-off-by: Ewelina Kosmider
    [Various bug fixes and improvements]
    Signed-off-by: Krzysztof Opasiak
    Signed-off-by: Greg Kroah-Hartman

    Igor Kotrasinski
     
  • Adds an equivalent of usbip_host_driver for the vudc. Most
    of the code is already shared, but this adds some vudc specific
    code for getting information about devices.

    Based on code created in cooperation with Open Operating Systems
    Student Society at University of Warsaw (O2S3@UW) consisting of:

    Igor Kotrasinski
    Karol Kosik
    Ewelina Kosmider
    Dawid Lazarczyk
    Piotr Szulc

    Tutor and project owner:
    Krzysztof Opasiak

    Signed-off-by: Krzysztof Opasiak
    Signed-off-by: Greg Kroah-Hartman

    Krzysztof Opasiak
     
  • Extract the code from current stub driver backend and a common
    interface for both stub driver and vudc. This allows to share most
    of the usbipd code for both of them.

    Based on code created in cooperation with Open Operating Systems
    Student Society at University of Warsaw (O2S3@UW) consisting of:

    Igor Kotrasinski
    Karol Kosik
    Ewelina Kosmider
    Dawid Lazarczyk
    Piotr Szulc

    Tutor and project owner:
    Krzysztof Opasiak

    Signed-off-by: Krzysztof Opasiak
    Signed-off-by: Greg Kroah-Hartman

    Krzysztof Opasiak
     

23 Oct, 2015

1 commit

  • Felipe writes:

    usb: patches for v4.4 merge window

    This pull request is large with a total of 136 non-merge
    commits. Because of its size, we will only describe the big things in
    broad terms.

    Many will be happy to know that dwc3 is now almost twice as fast after
    some profiling and speed improvements. Also in dwc3, John Youn from
    Synopsys added support for their new DWC USB3.1 IP Core and the HAPS
    platform which can be used to validate it.

    A series of patches from Robert Baldyga cleaned up uses of
    ep->driver_data as a flag for "claimed endpoint" in favor of the new
    ep->claimed flag.

    Sudip Mukherjee fixed a ton of really old problems on the amd5536udc
    driver. That should make a few people happy.

    Heikki Krogerus worked on converting dwc3 to the unified device property
    interface.

    Together with these, there's a ton of non-critical fixes, typos and
    stuff like that.

    Signed-off-by: Felipe Balbi

    Greg Kroah-Hartman
     

27 Sep, 2015

2 commits


23 Sep, 2015

1 commit


15 Jan, 2015

1 commit


13 Jan, 2015

1 commit


15 Dec, 2014

1 commit

  • Pull USB updates from Greg KH:
    "Here's the big set of USB and PHY patches for 3.19-rc1.

    The normal churn in the USB gadget area is in here, as well as xhci
    and other individual USB driver updates. The PHY tree is also in
    here, as there were dependancies on the USB tree.

    All of these have been in linux-next"

    * tag 'usb-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (351 commits)
    arm: omap3: twl: remove usb phy init data
    usbip: fix error handling in stub_probe()
    usb: gadget: udc: missing curly braces
    USB: mos7720: delete some unneeded code
    wusb: replace memset by memzero_explicit
    usbip: remove unneeded structure
    usb: xhci: fix comment for PORT_DEV_REMOVE
    xhci: don't use the same variable for stopped and halted rings current TD
    xhci: clear extra bits from slot context when setting max exit latency
    xhci: cleanup finish_td function
    USB: adutux: NULL dereferences on disconnect
    usb: chipidea: fix platform_no_drv_owner.cocci warnings
    usb: chipidea: Fixed a few typos in comments
    Documentation: bindings: add doc for the USB2 ChipIdea USB driver
    usb: chipidea: add a usb2 driver for ci13xxx
    usb: chipidea: fix phy handling
    usb: chipidea: remove duplicate dev_set_drvdata for host_start
    usb: chipidea: parameter 'mode' isn't needed for hw_device_reset
    usb: chipidea: add controller reset API
    usb: chipidea: remove flag CI_HDRC_REQUIRE_TRANSCEIVER
    ...

    Linus Torvalds
     

03 Dec, 2014

1 commit

  • Delete a local structure that is only used to be initialized by memset.

    A semantic patch that makes this change is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @@
    identifier x,i;
    @@

    {
    ... when any
    -struct i x;

    }
    //

    Signed-off-by: Julia Lawall
    Acked-by: Valentina Manea
    Signed-off-by: Greg Kroah-Hartman

    Julia Lawall
     

20 Nov, 2014

2 commits


16 Sep, 2014

1 commit


09 Sep, 2014

1 commit

  • Merge Linux 3.17-rc4 here so we have all the latest
    fixes on next too. This also cleans up a few conflicts
    when applying patches.

    Signed-off-by: Felipe Balbi

    Conflicts:
    drivers/usb/gadget/Makefile
    drivers/usb/gadget/function/Makefile
    drivers/usb/gadget/legacy/Makefile
    drivers/usb/phy/phy-samsung-usb.h

    Felipe Balbi
     

05 Sep, 2014

1 commit


02 Sep, 2014

2 commits

  • If ffs-test is used with a kernel prior to 3.14, which do not
    support the new descriptors format, it will fail when trying to
    write the descriptors. Add a function that converts the new
    descriptors to the legacy ones and use it to retry writing the
    descriptors using the legacy format.

    Also add “-l” flag to ffs-test which will cause the tool to
    never try the new format and instead immediatelly try the
    legacy one. This should be useful to test whether parsing
    of the old format still works on given 3.14+ kernel.

    Signed-off-by: Michal Nazarewicz
    Signed-off-by: Felipe Balbi

    Michal Nazarewicz
     
  • Since commit [ac8dde11: “Add flags to descriptors block”] functionfs
    supports a new, more powerful and extensible, descriptor format.
    Since ffs-test is probably the first thing users of the functionfs
    interface see when they start writing functionfs user space daemons,
    convert it to use the new format thus promoting it.

    Signed-off-by: Michal Nazarewicz
    Signed-off-by: Felipe Balbi

    Michal Nazarewicz
     

26 Aug, 2014

1 commit