RE: [V2] usb: gadget: storage: Remove warning message

2019-05-09 Thread EJ Hsu
> > You forgot to change fsg_unbind() to use FSG_STATE_DISCONNECT. And when > that's done, it will no longer need to set common->new_fsg to NULL either. > Yes, we should change fsg_unbind() as well. > This is sort of a band-aid approach. The real problem is that the original > design > of th

[PATCH v2] usb: dwc2: Use generic PHY width in params setup

2019-05-09 Thread Jules Maselbas
Setting params.phy_utmi_width in dwc2_lowlevel_hw_init() is pointless since it's value will be overwritten by dwc2_init_params(). This change make sure to take in account the generic PHY width information during paraminitialisation, done in dwc2_set_param_phy_utmi_width(). By doing so, the phy_ut

[PATCH 3/4] rio500: simplify locking

2019-05-09 Thread Oliver Neukum
Admitting that there can be only one device allows us to drop any pretense about locking one device or a table of devices. Signed-off-by: Oliver Neukum --- drivers/usb/misc/rio500.c | 43 --- 1 file changed, 16 insertions(+), 27 deletions(-) diff --git a/

[PATCH 1/4] rio500: refuse more than one device at a time

2019-05-09 Thread Oliver Neukum
This driver is using a global variable. It cannot handle more than one device at a time. The issue has been existing since the dawn of the driver. V2: Fixed locking in probe() Fixed Documentation Signed-off-by: Oliver Neukum Reported-by: syzbot+35f04d136fc975a70...@syzkaller.appspotmail.com

[PATCH 2/4] rio500: fix memeory leak in close after disconnect

2019-05-09 Thread Oliver Neukum
If a disconnected device is closed, rio_close() must free the buffers. Signed-off-by: Oliver Neukum --- drivers/usb/misc/rio500.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/drivers/usb/misc/rio500.c b/drivers/usb/misc/rio500.c index fa921ae60ffa..a1832

[PATCHv3 2/4] rio500: fix memeory leak in close after disconnect

2019-05-09 Thread Oliver Neukum
If a disconnected device is closed, rio_close() must free the buffers. Signed-off-by: Oliver Neukum --- drivers/usb/misc/rio500.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/drivers/usb/misc/rio500.c b/drivers/usb/misc/rio500.c index fa921ae60ffa..a1832

[PATCHv3 4/4] USB: rio500: update Documentation

2019-05-09 Thread Oliver Neukum
Added the newly added limit and updated the text a bit Signed-off-by: Oliver Neukum --- Documentation/usb/rio.txt | 66 ++- 1 file changed, 13 insertions(+), 53 deletions(-) diff --git a/Documentation/usb/rio.txt b/Documentation/usb/rio.txt index ca9a

[PATCHv3 1/4] rio500: refuse more than one device at a time

2019-05-09 Thread Oliver Neukum
This driver is using a global variable. It cannot handle more than one device at a time. The issue has been existing since the dawn of the driver. V2: Fixed locking in probe() Fixed Documentation V3: Fixed formatting of Documentation Signed-off-by: Oliver Neukum Reported-by: syzbot+35f04d136

[PATCHv3 3/4] rio500: simplify locking

2019-05-09 Thread Oliver Neukum
Admitting that there can be only one device allows us to drop any pretense about locking one device or a table of devices. Signed-off-by: Oliver Neukum --- drivers/usb/misc/rio500.c | 43 --- 1 file changed, 16 insertions(+), 27 deletions(-) diff --git a/

[PATCH 4/4] USB: rio500: update Documentation

2019-05-09 Thread Oliver Neukum
Added the newly added limit and updated the text a bit Signed-off-by: Oliver Neukum --- Documentation/usb/rio.txt | 66 ++- 1 file changed, 13 insertions(+), 53 deletions(-) diff --git a/Documentation/usb/rio.txt b/Documentation/usb/rio.txt index ca9a

Re: [PATCH 1/4] usb: xhci: add Immediate Data Transfer support

2019-05-09 Thread Marek Szyprowski
Dear All, On 2019-04-26 15:23, Mathias Nyman wrote: > From: Nicolas Saenz Julienne > > Immediate data transfers (IDT) allow the HCD to copy small chunks of > data (up to 8bytes) directly into its output transfer TRBs. This avoids > the somewhat expensive DMA mappings that are performed by default

Re: [PATCH 1/4] usb: xhci: add Immediate Data Transfer support

2019-05-09 Thread Mathias Nyman
On 9.5.2019 13.32, Marek Szyprowski wrote: Dear All, On 2019-04-26 15:23, Mathias Nyman wrote: From: Nicolas Saenz Julienne Immediate data transfers (IDT) allow the HCD to copy small chunks of data (up to 8bytes) directly into its output transfer TRBs. This avoids the somewhat expensive DMA m

Re: [PATCH 1/4] usb: xhci: add Immediate Data Transfer support

2019-05-09 Thread Nicolas Saenz Julienne
On Thu, 2019-05-09 at 14:40 +0300, Mathias Nyman wrote: > On 9.5.2019 13.32, Marek Szyprowski wrote: > > Dear All, > > > > On 2019-04-26 15:23, Mathias Nyman wrote: > > > From: Nicolas Saenz Julienne > > > > > > Immediate data transfers (IDT) allow the HCD to copy small chunks of > > > data (up

[PATCH] USB: sisusbvga: fix oops in error path of sisusb_probe

2019-05-09 Thread Oliver Neukum
The pointer used to log a failure of usb_register_dev() must be set before the error is logged. Signed-off-by: oliver Neukum Reported-by: syzbot+a0cbdbd6d169020c8...@syzkaller.appspotmail.com Fixes: 7b5cd5fefbe02 ("USB: SisUSB2VGA: Convert printk to dev_* macros") --- drivers/usb/misc/sisusbvga/

[PATCHv2] USB: sisusbvga: fix oops in error path of sisusb_probe

2019-05-09 Thread Oliver Neukum
The pointer used to log a failure of usb_register_dev() must be set before the error is logged. v2: fix that minor is not available before registration Signed-off-by: oliver Neukum Reported-by: syzbot+a0cbdbd6d169020c8...@syzkaller.appspotmail.com Fixes: 7b5cd5fefbe02 ("USB: SisUSB2VGA: Convert

RE: [V2] usb: gadget: storage: Remove warning message

2019-05-09 Thread Alan Stern
On Thu, 9 May 2019, EJ Hsu wrote: > > You forgot to change fsg_unbind() to use FSG_STATE_DISCONNECT. And when > > that's done, it will no longer need to set common->new_fsg to NULL either. > > > > Yes, we should change fsg_unbind() as well. > > > This is sort of a band-aid approach. The real

Re: [PATCH -next] usb: gadget: udc: lpc32xx: fix return value check in lpc32xx_udc_probe()

2019-05-09 Thread Sylvain Lemieux
Thanks Acked-by: Sylvain Lemieux On Sat, May 4, 2019 at 8:17 AM Vladimir Zapolskiy wrote: > > Hi Wei Yongjun, > > On 05/04/2019 10:04 AM, Wei Yongjun wrote: > > In case of error, the function devm_ioremap_resource() returns ERR_PTR() > > and never returns NULL. The NULL test in the return value

Re: [PATCH 1/4] usb: xhci: add Immediate Data Transfer support

2019-05-09 Thread Mathias Nyman
On 9.5.2019 14.51, Nicolas Saenz Julienne wrote: On Thu, 2019-05-09 at 14:40 +0300, Mathias Nyman wrote: On 9.5.2019 13.32, Marek Szyprowski wrote: Dear All, On 2019-04-26 15:23, Mathias Nyman wrote: From: Nicolas Saenz Julienne Immediate data transfers (IDT) allow the HCD to copy small chu

Re: [PATCH 1/4] usb: xhci: add Immediate Data Transfer support

2019-05-09 Thread Nicolas Saenz Julienne
Hi Matthias, thanks for spending the time debugging this :) On Thu, 2019-05-09 at 18:10 +0300, Mathias Nyman wrote: > Got the logs off list, thanks > > The "Buffer" data in Control transfer Data stage look suspicious. > > grep "flags I:" trace_fail | grep Data > kworker/0:2-124 [000] d..1

Re: [PATCH 1/4] usb: xhci: add Immediate Data Transfer support

2019-05-09 Thread Mathias Nyman
On 9.5.2019 18.38, Nicolas Saenz Julienne wrote: Hi Mathias, thanks for spending the time debugging this :) On Thu, 2019-05-09 at 18:10 +0300, Mathias Nyman wrote: Got the logs off list, thanks The "Buffer" data in Control transfer Data stage look suspicious. First guess would be that in case

Re: [PATCH 1/4] usb: xhci: add Immediate Data Transfer support

2019-05-09 Thread Marek Szyprowski
Hi Mathias, On 2019-05-09 17:10, Mathias Nyman wrote: > On 9.5.2019 14.51, Nicolas Saenz Julienne wrote: >> On Thu, 2019-05-09 at 14:40 +0300, Mathias Nyman wrote: >>> On 9.5.2019 13.32, Marek Szyprowski wrote: Dear All, On 2019-04-26 15:23, Mathias Nyman wrote: > From: Nicolas