Re: [PATCH 01/14] phy: phy-pxa-usb: add a new driver

2018-09-24 Thread Kishon Vijay Abraham I
On Thursday 23 August 2018 02:12 AM, Lubomir Rintel wrote: > Turned from arch/arm/mach-mmp/devices.c into a proper PHY driver, so > that in can be instantiated from a DT. > > Signed-off-by: Lubomir Rintel Acked-by: Kishon Vijay Abraham I If this has to be merged via linux-phy tree, please l

[PATCH 3/4] usb: usbtmc: uninitialized symbol 'actual' in usbtmc_ioctl_clear

2018-09-24 Thread Guido Kiener
From: Guido Kiener Fix uninitialized symbol 'actual' in function usbtmc_ioctl_clear. When symbol 'actual' is not initialized and usb_bulk_msg() fails, the subsequent kernel debug message shows a random value. Signed-off-by: Guido Kiener Fixes: dfee02ac4bce ("usb: usbtmc: Fix ioctl USBTMC_IOCTL

[PATCH 1/4] usb: usbtmc: Fix memory leak in usbtmc_ioctl_request

2018-09-24 Thread Guido Kiener
From: Guido Kiener Kernel memory is allocated twice in new function usbtmc_ioctl_request and creates a memory leak. This fix removes the superfluous kmalloc(). Signed-off-by: Guido Kiener Fixes: 658f24f4523e ("usb: usbtmc: Add ioctl for generic requests on control") --- drivers/usb/class/usbtm

[PATCH 0/4] usb: usbtmc: Fix changes for compatible IVI/VISA library

2018-09-24 Thread Guido Kiener
Fix memory leak and uninitialized symbol 'actual' in usbtmc driver of patch series: [v6,00/22] usb: usbtmc: Changes needed for compatible IVI/VISA library https://patchwork.kernel.org/cover/10596935/ Two errors are reported by 0-day service (smatch tool) when testing branch usb-testing: 1. usbtmc

[PATCH 2/4] usb: usbtmc: uninitialized symbol 'actual' in usbtmc_read

2018-09-24 Thread Guido Kiener
From: Guido Kiener Fix uninitialized symbol 'actual' in function usbtmc_read. When symbol 'actual' is not initialized and usb_bulk_msg() fails, the subsequent kernel debug message shows a random value. Signed-off-by: Guido Kiener Fixes: d7604ff0dc01 ("usb: usbtmc: Optimize usbtmc_read") --- d

[PATCH 4/4] usb: usbtmc: uninitialized symbol 'actual' in usbtmc_ioctl_abort_bulk_in_tag

2018-09-24 Thread Guido Kiener
From: Guido Kiener Fix uninitialized symbol 'actual' in function usbtmc_ioctl_abort_bulk_in_tag(). When symbol 'actual' is not initialized and usb_bulk_msg() fails, the subsequent kernel debug message shows invalid data. Signed-off-by: Guido Kiener Fixes: cbe743f1333b ("usb: usbtmc: Fix ioctl

Re: [PATCH 0/4] usb: gadget: uvc: Fix endianness and sign issues

2018-09-24 Thread Paul Elder
On Tue, Sep 18, 2018 at 03:32:43PM +0300, Laurent Pinchart wrote: > Hello, > > This series addresses endianness and sign issues in the configfs support > of the UVC gadget function driver. > > The first patch starts by fixing the endianness of various UVC > descriptors to match the USB little end

Re: [PATCH v2 05/17] compat_ioctl: move more drivers to generic_compat_ioctl_ptrarg

2018-09-24 Thread Arnd Bergmann
On Mon, Sep 24, 2018 at 10:35 PM Jason Gunthorpe wrote: > On Mon, Sep 24, 2018 at 10:18:52PM +0200, Arnd Bergmann wrote: > > On Tue, Sep 18, 2018 at 7:59 PM Jason Gunthorpe wrote: > > > On Tue, Sep 18, 2018 at 10:51:08AM -0700, Darren Hart wrote: > > > > On Fri, Sep 14, 2018 at 09:57:48PM +0100,

[PATCH net 3/7] lan78xx: Check for supported Wake-on-LAN modes

2018-09-24 Thread Florian Fainelli
The driver supports a fair amount of Wake-on-LAN modes, but is not checking that the user specified one that is supported. Fixes: 55d7de9de6c3 ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet device driver") Signed-off-by: Florian Fainelli --- drivers/net/usb/lan78xx.c | 3 +++ 1 fi

[PATCH net 5/7] r8152: Check for supported Wake-on-LAN Modes

2018-09-24 Thread Florian Fainelli
The driver does not check for Wake-on-LAN modes specified by an user, but will conditionally set the device as wake-up enabled or not based on that, which could be a very confusing user experience. Fixes: 21ff2e8976b1 ("r8152: support WOL") Signed-off-by: Florian Fainelli --- drivers/net/usb/r81

[PATCH net 4/7] sr9800: Check for supported Wake-on-LAN modes

2018-09-24 Thread Florian Fainelli
The driver currently silently accepts unsupported Wake-on-LAN modes (other than WAKE_PHY or WAKE_MAGIC) without reporting that to the user, which is confusing. Fixes: 19a38d8e0aa3 ("USB2NET : SR9800 : One chip USB2.0 USB2NET SR9800 Device Driver Support") Signed-off-by: Florian Fainelli --- dri

[PATCH net 2/7] ax88179_178a: Check for supported Wake-on-LAN modes

2018-09-24 Thread Florian Fainelli
The driver currently silently accepts unsupported Wake-on-LAN modes (other than WAKE_PHY or WAKE_MAGIC) without reporting that to the user, which is confusing. Fixes: e2ca90c276e1 ("ax88179_178a: ASIX AX88179_178A USB 3.0/2.0 to gigabit ethernet adapter driver") Signed-off-by: Florian Fainelli -

[PATCH net 6/7] smsc75xx: Check for Wake-on-LAN modes

2018-09-24 Thread Florian Fainelli
The driver does not check for Wake-on-LAN modes specified by an user, but will conditionally set the device as wake-up enabled or not based on that, which could be a very confusing user experience. Fixes: 6c636503260d ("smsc75xx: add wol magic packet support") Signed-off-by: Florian Fainelli ---

[PATCH net 7/7] smsc95xx: Check for Wake-on-LAN modes

2018-09-24 Thread Florian Fainelli
The driver does not check for Wake-on-LAN modes specified by an user, but will conditionally set the device as wake-up enabled or not based on that, which could be a very confusing user experience. Fixes: e0e474a83c18 ("smsc95xx: add wol magic packet support") Signed-off-by: Florian Fainelli ---

[PATCH net 0/7] net: usb: Check for Wake-on-LAN modes

2018-09-24 Thread Florian Fainelli
Hi all, Most of our USB Ethernet drivers don't seem to be checking properly whether the user is supplying a correct Wake-on-LAN mode to enter, so the experience as an user could be confusing, since it would generally lead to either no wake-up, or the device not being marked for wake-up. Please re

[PATCH net 1/7] asix: Check for supported Wake-on-LAN modes

2018-09-24 Thread Florian Fainelli
The driver currently silently accepts unsupported Wake-on-LAN modes (other than WAKE_PHY or WAKE_MAGIC) without reporting that to the user, which is confusing. Fixes: 2e55cc7210fe ("[PATCH] USB: usbnet (3/9) module for ASIX Ethernet adapters") Signed-off-by: Florian Fainelli --- drivers/net/usb

Re: [PATCH 1/3] usb: gadget: uvc: Factor out video USB request queueing

2018-09-24 Thread Paul Elder
On Tue, Sep 18, 2018 at 01:35:30PM +0300, Laurent Pinchart wrote: > USB requests for video data are queued from two different locations in > the driver, with the same code block occurring twice. Factor it out to a > function. > > Signed-off-by: Laurent Pinchart For the whole series: Looks good

Re: [PATCH v2 05/17] compat_ioctl: move more drivers to generic_compat_ioctl_ptrarg

2018-09-24 Thread Jason Gunthorpe
On Mon, Sep 24, 2018 at 10:18:52PM +0200, Arnd Bergmann wrote: > On Tue, Sep 18, 2018 at 7:59 PM Jason Gunthorpe wrote: > > > > On Tue, Sep 18, 2018 at 10:51:08AM -0700, Darren Hart wrote: > > > On Fri, Sep 14, 2018 at 09:57:48PM +0100, Al Viro wrote: > > > > On Fri, Sep 14, 2018 at 01:35:06PM -07

Re: [PATCH v2 05/17] compat_ioctl: move more drivers to generic_compat_ioctl_ptrarg

2018-09-24 Thread Arnd Bergmann
On Tue, Sep 18, 2018 at 7:59 PM Jason Gunthorpe wrote: > > On Tue, Sep 18, 2018 at 10:51:08AM -0700, Darren Hart wrote: > > On Fri, Sep 14, 2018 at 09:57:48PM +0100, Al Viro wrote: > > > On Fri, Sep 14, 2018 at 01:35:06PM -0700, Darren Hart wrote: > > > > > > > Acked-by: Darren Hart (VMware) > >

Re: [PATCH] usb: dwc2: Fix HiKey regression caused by power_down feature

2018-09-24 Thread John Stultz
On Sun, Sep 23, 2018 at 10:57 PM, Artur Petrosyan wrote: > Hi John, > > On 9/21/2018 05:05, John Stultz wrote: >> On Thu, Sep 20, 2018 at 7:17 AM, Artur Petrosyan >> wrote: >>> On 5/23/2018 01:57, John Stultz wrote: Its done automatically, when the OTG cable is detected it the host port

Re: [PATCH 1/3] usb: host: xhci: fix oops when removing hcd

2018-09-24 Thread Jack Pham
Hi Peter, On Fri, Sep 21, 2018 at 09:48:43AM +0800, Peter Chen wrote: > Type-C-to-A cable, and the USB3 HCD has already been NULL at that time. > The oops log like below: > > [681.782288] xhci-hcd xhci-hcd.1.auto: remove, state 1 > [681.787490] usb usb4: USB disconnect, device number 1 > [681.792

Re: [PATCH] usb: gadget: uvc: Remove uvc_set_trace_param() function

2018-09-24 Thread Kieran Bingham
Hi Laurent, On 18/09/18 13:25, Laurent Pinchart wrote: > The function is never called, remove it. It does seem that way :) > Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham > --- > drivers/usb/gadget/function/f_uvc.c | 6 -- > 1 file changed, 6 deletions(-) > > diff --git a/

Re: [PATCH v2 8/8] usb: gadget: uvc: configfs: Prevent format changes after linking header

2018-09-24 Thread Laurent Pinchart
Hi Kieran, On Monday, 24 September 2018 15:50:45 EEST Kieran Bingham wrote: > On 01/08/18 22:55, Laurent Pinchart wrote: > > From: Joel Pepper > > > > While checks are in place to avoid attributes and children of a format > > being manipulated after the format is linked into the streaming header

Re: [PATCH v2 7/8] usb: gadget: uvc: configfs: Add bFrameIndex attributes

2018-09-24 Thread Kieran Bingham
Hi Laurent, On 24/09/18 17:00, Laurent Pinchart wrote: > Hi Kieran, > > On Monday, 24 September 2018 15:22:57 EEST Kieran Bingham wrote: >> On 01/08/18 22:55, Laurent Pinchart wrote: >>> From: Joel Pepper >>> >>> - Add bFrameIndex as a UVCG_FRAME_ATTR_RO for each frame size. >>> - Automatically

Re: [PATCH v2 7/8] usb: gadget: uvc: configfs: Add bFrameIndex attributes

2018-09-24 Thread Laurent Pinchart
Hi Kieran, On Monday, 24 September 2018 15:22:57 EEST Kieran Bingham wrote: > On 01/08/18 22:55, Laurent Pinchart wrote: > > From: Joel Pepper > > > > - Add bFrameIndex as a UVCG_FRAME_ATTR_RO for each frame size. > > - Automatically assign ascending bFrameIndex to each frame in a format. > > >

Re: some question about ehci-sched.c

2018-09-24 Thread yoma sophian
hi Alan: > We don't _have_ to do it. It is a small optimization; an attempt to > avoid schedule collisions between interrupt transactions and > isochronous transactions. The effect of the "-" is that the code tries > frames in backward order when it is scheduling isochronous URBs -- as > opposed

[PATCH v6] USB: serial: ftdi_sio: implement GPIO support for FT-X devices

2018-09-24 Thread Karoly Pados
This patch allows using the CBUS pins of FT-X devices as GPIO in CBUS bitbanging mode. There is no conflict between the GPIO and VCP functionality in this mode. Tested on FT230X and FT231X. As there is no way to request the current CBUS register configuration from the device, all CBUS pins are set

Re: [PATCH -next] USB: core: remove set but not used variable 'udev'

2018-09-24 Thread Alan Stern
On Sat, 22 Sep 2018, YueHaibing wrote: > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/usb/core/driver.c: In function 'usb_driver_claim_interface': > drivers/usb/core/driver.c:513:21: warning: > variable 'udev' set but not used [-Wunused-but-set-variable] > > Signed-off-by: YueHaib

Re: [PATCH 0/3] add dwc2 support for px30

2018-09-24 Thread Heiko Stuebner
Am Donnerstag, 2. August 2018, 15:01:30 CEST schrieb Heiko Stuebner: > This is split out from the series adding the px30 support, due to > the dwc2 binding change not having landed yet in a maintainer tree. > > The Acked binding change should go through some usb tree, while > I'll pick up the dts

[PATCH] USB: serial: simple: add Motorola Tetra MTP6550 id

2018-09-24 Thread Johan Hovold
Add device-id for the Motorola Tetra radio MTP6550. Bus 001 Device 004: ID 0cad:9012 Motorola CGISS Device Descriptor: bLength18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass0 (Defined at Interface level) bDeviceSubClass 0 bDeviceP

Re: general protection fault in usb_find_alt_setting

2018-09-24 Thread Dmitry Vyukov
On Sun, Sep 23, 2018 at 11:15 PM, Vladis Dronov wrote: > Hello, Dmitry, > > Thank you for the reply. I probably do not properly understand how > syzcaller works then. Can you please, have a look at my reasoning. > > The bug: > > https://syzkaller.appspot.com/bug?id=4b88ff5aa6aa88f9283a45cc62f16e55

Re: [PATCH] xhci: Add check for invalid byte size error when UAS devices are connected.

2018-09-24 Thread Mathias Nyman
On 21.09.2018 16:22, Sandeep Singh wrote: From: Sandeep Singh Observed "TRB completion code (27)" error which corresponds to Stopped - Length Invalid error(xhci spec section 4.17.4) while connecting USB to SATA bridge. Looks like this case was not considered when the following patch[1] was com

Re: fixes for ioctl() of usbtmc in testing tree

2018-09-24 Thread Greg Kroah-Hartman
On Mon, Sep 24, 2018 at 12:20:42PM +, gu...@kiener-muenchen.de wrote: > > Zitat von Oliver Neukum : > > > On Mo, 2018-09-24 at 10:56 +, gu...@kiener-muenchen.de wrote: > > > Zitat von Greg Kroah-Hartman : > > > > > > > On Mon, Sep 24, 2018 at 11:24:10AM +0200, Oliver Neukum wrote: > > >

Re: [PATCH v2 7/8] usb: gadget: uvc: configfs: Add bFrameIndex attributes

2018-09-24 Thread Kieran Bingham
Hi Laurent, Joel On 01/08/18 22:55, Laurent Pinchart wrote: > From: Joel Pepper > > - Add bFrameIndex as a UVCG_FRAME_ATTR_RO for each frame size. > - Automatically assign ascending bFrameIndex to each frame in a format. > > Before all "bFrameindex" attributes were set to "1" with no way to > c

Re: [PATCH v2 8/8] usb: gadget: uvc: configfs: Prevent format changes after linking header

2018-09-24 Thread Kieran Bingham
Hi Laurent, Joel, On 01/08/18 22:55, Laurent Pinchart wrote: > From: Joel Pepper > > While checks are in place to avoid attributes and children of a format > being manipulated after the format is linked into the streaming header, > the linked flag was never actually set, invalidating the protect

Re: [PATCH v5] USB: serial: ftdi_sio: implement GPIO support for FT-X devices

2018-09-24 Thread Johan Hovold
On Mon, Sep 24, 2018 at 11:52:38AM +, Karoly Pados wrote: > Oops, I sent v4 again, so it had no changes at all. Can't I just > resend v5 instead of calling it v6? No, you should label it v6 so that it can be told apart from the incorrect v5. Thanks, Johan

Re: fixes for ioctl() of usbtmc in testing tree

2018-09-24 Thread guido
Zitat von Oliver Neukum : On Mo, 2018-09-24 at 10:56 +, gu...@kiener-muenchen.de wrote: Zitat von Greg Kroah-Hartman : > On Mon, Sep 24, 2018 at 11:24:10AM +0200, Oliver Neukum wrote: > > Hi, > > > > how should I mark fixes intended for the testing branch? > > I got one for the usbtmc dr

Re: [PATCH v2 6/8] usb: gadget: uvc: configfs: Add bFormatIndex attributes

2018-09-24 Thread Kieran Bingham
Hi Laurent, On 01/08/18 22:55, Laurent Pinchart wrote: > The UVC format description are numbered using the descriptor's > bFormatIndex field. The index is used in UVC requests, and is thus > needed to handle requests in userspace. Make it dynamically discoverable > by exposing it in a bFormatIndex

Re: [PATCH v2 5/8] usb: gadget: uvc: configfs: Add interface number attributes

2018-09-24 Thread Kieran Bingham
Hi Laurent, On 01/08/18 22:55, Laurent Pinchart wrote: > The video control and video streaming interface numbers are needed in > the UVC gadget userspace stack to reply to UVC requests. They are > hardcoded to fixed values at the moment, preventing configurations with > multiple functions. > > To

Re: [PATCH v5] USB: serial: ftdi_sio: implement GPIO support for FT-X devices

2018-09-24 Thread Karoly Pados
Oops, I sent v4 again, so it had no changes at all. Can't I just resend v5 instead of calling it v6? September 24, 2018 10:48 AM, "Johan Hovold" wrote: > On Sun, Sep 23, 2018 at 06:03:30PM +0200, Karoly Pados wrote: > >> This patch allows using the CBUS pins of FT-X devices as GPIO in CBUS >>

Re: [PATCH v2 4/8] usb: gadget: uvc: configfs: Allocate groups dynamically

2018-09-24 Thread Kieran Bingham
Hi Laurent, On 01/08/18 22:55, Laurent Pinchart wrote: > The UVC configfs implementation creates all groups as global static > variables. This prevents creation of multiple UVC function instances, > as they would all require their own configfs group instances. > > Fix this by allocating all group

Re: [PATCH] usb: cdc_acm: Do not leak URB buffers

2018-09-24 Thread Oliver Neukum
On Mo, 2018-09-24 at 10:20 +0200, Romain Izard wrote: > 2018-09-21 15:27 +0200, Oliver Neukum : > > > > On Do, 2018-09-20 at 16:49 +0200, Romain Izard wrote: > > > When the ACM TTY port is disconnected, the URBs it uses must be killed, > > > and then the buffers must be freed. Unfortunately a prev

Re: [PATCH v2 3/8] usb: gadget: uvc: configfs: Drop leaked references to config items

2018-09-24 Thread Kieran Bingham
Hi Laurent, On 01/08/18 22:55, Laurent Pinchart wrote: > Some of the .allow_link() and .drop_link() operations implementations > call config_group_find_item() and then leak the reference to the > returned item. Fix this by dropping those references where needed. > > Signed-off-by: Laurent Pinchar

Re: [PATCH] usb: cdc_acm: Do not leak URB buffers

2018-09-24 Thread Oliver Neukum
On Do, 2018-09-20 at 16:49 +0200, Romain Izard wrote: > When the ACM TTY port is disconnected, the URBs it uses must be killed, and > then the buffers must be freed. Unfortunately a previous refactor removed > the code freeing the buffers because it looked extremely similar to the > code killing th

Re: fixes for ioctl() of usbtmc in testing tree

2018-09-24 Thread Greg Kroah-Hartman
On Mon, Sep 24, 2018 at 10:56:37AM +, gu...@kiener-muenchen.de wrote: > > Zitat von Greg Kroah-Hartman : > > > On Mon, Sep 24, 2018 at 11:24:10AM +0200, Oliver Neukum wrote: > > > Hi, > > > > > > how should I mark fixes intended for the testing branch? > > > I got one for the usbtmc driver.

Re: fixes for ioctl() of usbtmc in testing tree

2018-09-24 Thread Oliver Neukum
On Mo, 2018-09-24 at 10:56 +, gu...@kiener-muenchen.de wrote: > Zitat von Greg Kroah-Hartman : > > > On Mon, Sep 24, 2018 at 11:24:10AM +0200, Oliver Neukum wrote: > > > Hi, > > > > > > how should I mark fixes intended for the testing branch? > > > I got one for the usbtmc driver. > > > > Ju

Re: fixes for ioctl() of usbtmc in testing tree

2018-09-24 Thread guido
Zitat von Greg Kroah-Hartman : On Mon, Sep 24, 2018 at 11:24:10AM +0200, Oliver Neukum wrote: Hi, how should I mark fixes intended for the testing branch? I got one for the usbtmc driver. Just send it like normal. You can do a "Fixes:" tag with the sha1, that should be fine. I need to pu

Re: fixes for ioctl() of usbtmc in testing tree

2018-09-24 Thread Greg Kroah-Hartman
On Mon, Sep 24, 2018 at 11:24:10AM +0200, Oliver Neukum wrote: > Hi, > > how should I mark fixes intended for the testing branch? > I got one for the usbtmc driver. Just send it like normal. You can do a "Fixes:" tag with the sha1, that should be fine. I need to push out my testing branch now,

fixes for ioctl() of usbtmc in testing tree

2018-09-24 Thread Oliver Neukum
Hi, how should I mark fixes intended for the testing branch? I got one for the usbtmc driver. Regards Oliver

Re: [PATCH] USB: serial: cypress_m8: fix spelling mistake "retreiving" -> "retrieving"

2018-09-24 Thread Johan Hovold
On Mon, Sep 24, 2018 at 12:04:08AM +0100, Colin King wrote: > From: Colin Ian King > > Trivial fix to spelling mistake in dev_dbg message > > Signed-off-by: Colin Ian King Applied, thanks. Johan

Re: [PATCH v5] USB: serial: ftdi_sio: implement GPIO support for FT-X devices

2018-09-24 Thread Johan Hovold
On Sun, Sep 23, 2018 at 06:03:30PM +0200, Karoly Pados wrote: > This patch allows using the CBUS pins of FT-X devices as GPIO in CBUS > bitbanging mode. There is no conflict between the GPIO and VCP > functionality in this mode. Tested on FT230X and FT231X. > > As there is no way to request the cu

Re: [PATCH] usb: cdc_acm: Do not leak URB buffers

2018-09-24 Thread Romain Izard
2018-09-21 15:27 +0200, Oliver Neukum : > > On Do, 2018-09-20 at 16:49 +0200, Romain Izard wrote: > > When the ACM TTY port is disconnected, the URBs it uses must be killed, > > and then the buffers must be freed. Unfortunately a previous refactor > > removed the code freeing the buffers because it

Re: [PATCH] usb: typec: tcpm: Fix APDO PPS order checking to be based on voltage

2018-09-24 Thread Heikki Krogerus
On Fri, Sep 21, 2018 at 04:04:11PM +0100, Adam Thomson wrote: > Current code mistakenly checks against max current to determine > order but this should be max voltage. This commit fixes the issue > so order is correctly determined, thus avoiding failure based on > a higher voltage PPS APDO having a

Re: [PATH 0/4] usbip: make vhci_hcd.* objects independent of vhci_hcd.0

2018-09-24 Thread Salvador Fandino
Ping! In March, I submitted a patch-set to get USBIP to play nicely inside containers, but the discussion died after a couple of mails, I got abducted into some unrelated project and mostly forgot about it... But now, I have some time available to put into this and would like to push it furt