RE: [RFC PATCH balbi-usb] usb: renesas_usbhs: usbhs_rcar3_notifier() can be static

2017-12-13 Thread Felipe Balbi
Hi, Yoshihiro Shimoda writes: > Hi, > >> From: kbuild test robot, Sent: Thursday, December 14, 2017 2:21 AM >> >> Fixes: 3a7cce26122e ("usb: renesas_usbhs: add extcon notifier to set mode >> for non-otg channel") >> Signed-off-by: Fengguang Wu

[PATCH] usb: core: add support for USB_REQ_SET_ISOCH_DELAY

2017-12-13 Thread Felipe Balbi
USB SS and SSP hubs provide wHubDelay values on their hub descriptor which we should inform the USB Device about. The USB Specification 3.0 explains, on section 9.4.11, how to calculate the value and how to issue the request. Note that a USB_REQ_SET_ISOCH_DELAY is valid on all device states

Re: [BUG] usb/io_edgeport: a possible sleep-in-atomic bug in edge_bulk_in_callback

2017-12-13 Thread Jia-Ju Bai
Okay, I had submitted a patch yesterday. You can have a look :) Thanks, Jia-Ju Bai On 2017/12/13 19:38, Johan Hovold wrote: [ +CC: linux-usb] On Wed, Dec 13, 2017 at 06:22:26PM +0800, Jia-Ju Bai wrote: According to drivers/usb/serial/io_edgeport.c, the driver may sleep under a spinlock. The

RE: [RFC PATCH balbi-usb] usb: renesas_usbhs: usbhs_rcar3_notifier() can be static

2017-12-13 Thread Yoshihiro Shimoda
Hi, > From: kbuild test robot, Sent: Thursday, December 14, 2017 2:21 AM > > Fixes: 3a7cce26122e ("usb: renesas_usbhs: add extcon notifier to set mode for > non-otg channel") > Signed-off-by: Fengguang Wu Thank you for the patch! Acked-by: Yoshihiro Shimoda

Re: Dual-role behavior with USB-C?

2017-12-13 Thread Peter Chen
On Wed, Dec 13, 2017 at 02:37:14PM +0200, Heikki Krogerus wrote: > Hi guys, > > > > I think the USB-OTG PHY is part of i.MX6UL SoC? > > > > Yes, but it is just USB PHY, not PD PHY. You need external pure CC-logic > > chip (like PTN5150), or Type-C PD chip (like PTN5110) to support CC > > or PD

Re: Dual-role behavior with USB-C?

2017-12-13 Thread Takashi Matsuzawa
Hello. Now I am waiting for my USB-C breakout board to just re-using it for connecting to conventional micr-A/B receptacle. BTW, Looking into schematic, another board HiKey960 with USB-C receptacle seems to have USB-C controller in its circuit. >OK, from those schematics we can clearly see

Re: [PATCH] phy: rockchip-typec: Try to turn the PHY on several times

2017-12-13 Thread Doug Anderson
Hi, On Wed, Dec 13, 2017 at 4:41 AM, Enric Balletbo Serra wrote: > Hi Doug, > > 2017-12-11 22:45 GMT+01:00 Douglas Anderson : >> Bind / unbind stress testing of the USB controller on rk3399 found >> that we'd often end up with lots of failures that

Re: [PATCH net,stable] net: qmi_wwan: add Sierra EM7565 1199:9091

2017-12-13 Thread David Miller
From: ssjoh...@mac.com Date: Mon, 11 Dec 2017 21:51:14 +0100 > From: Sebastian Sjoholm > > Sierra Wireless EM7565 is an Qualcomm MDM9x50 based M.2 modem. > The USB id is added to qmi_wwan.c to allow QMI communication > with the EM7565. > > Signed-off-by: Sebastian Sjoholm

Re: [PATCH] usbip: fix usbip bind writing random string after command in match_busid

2017-12-13 Thread Shuah Khan
On 12/13/2017 04:07 AM, Juan Zea wrote: > usbip bind writes commands followed by random string when writing to > match_busid attribute in sysfs, caused by using full variable size > instead of string length. > > Signed-off-by: Juan Zea > --- > tools/usb/usbip/src/utils.c |

[balbi-usb:testing/next 25/25] drivers/usb/renesas_usbhs/rcar3.c:115:5: sparse: symbol 'usbhs_rcar3_notifier' was not declared. Should it be static?

2017-12-13 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git testing/next head: 3a7cce26122e3925993ee2ac0b45ac6b9bf6f65f commit: 3a7cce26122e3925993ee2ac0b45ac6b9bf6f65f [25/25] usb: renesas_usbhs: add extcon notifier to set mode for non-otg channel reproduce: # apt-get

[RFC PATCH balbi-usb] usb: renesas_usbhs: usbhs_rcar3_notifier() can be static

2017-12-13 Thread kbuild test robot
Fixes: 3a7cce26122e ("usb: renesas_usbhs: add extcon notifier to set mode for non-otg channel") Signed-off-by: Fengguang Wu --- rcar3.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/renesas_usbhs/rcar3.c

Re: [PATCH] USB: serial: ark3116.c: Remove unused TIOCSSERIAL case from ioctl

2017-12-13 Thread Mikhail Zaytsev
On Wed, 13 Dec 2017 15:39:21 +0100 Oliver Neukum wrote: > But: > > device->maxbaudrate = 38400 > > is better than > > device->maxbaudrate = MAX_BAUD > > You see the point? Yes, I see. This is better, because it's more important to know =, but not =. thank you Oliver.

Re: [PATCH] USB: core: prevent malicious bNumInterfaces overflow

2017-12-13 Thread Alan Stern
On Wed, 13 Dec 2017, Greg KH wrote: > > > --- usb-4.x.orig/drivers/usb/core/config.c > > > +++ usb-4.x/drivers/usb/core/config.c > > > @@ -555,6 +555,9 @@ static int usb_parse_configuration(struc > > > unsigned iad_num = 0; > > > > > > memcpy(>desc, buffer, USB_DT_CONFIG_SIZE); > > > +

Re: [PATCH] USB: serial: ark3116.c: Remove unused TIOCSSERIAL case from ioctl

2017-12-13 Thread Oliver Neukum
Am Mittwoch, den 13.12.2017, 15:30 +0300 schrieb Mikhail Zaytsev: > On Wed, 13 Dec 2017 12:40:48 +0100 Oliver Neukum wrote: > > > > > They give you nothing. If you are looking at a vendor ID nothing but the > > bare number makes sense. You are just making peoples' life harder

[PATCH 1/2] USB: serial: ark3116.c: Remove unused TIOCSSERIAL ioctl case.

2017-12-13 Thread Mikhail Zaytsev
The patch removes unused TIOCSSERIAL ioctl case and adds the default block to the switch. Signed-off-by: Mikhail Zaytsev --- drivers/usb/serial/ark3116.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/usb/serial/ark3116.c

[PATCH 0/2] USB: serial: ark3116.c: ioctl changes

2017-12-13 Thread Mikhail Zaytsev
The patch removes unused TIOCSSERIAL case from ioctl. TIOCGSERIAL case moves to the get_serial_info() function. Some magic numbers moves to #define directives. Mikhail Zaytsev (2): USB: serial: ark3116.c: Remove unused TIOCSSERIAL ioctl case. USB: serial: ark3116.c: Move TIOCGSERIAL ioctl

[PATCH 2/2] USB: serial: ark3116.c: Move TIOCGSERIAL ioctl case to function.

2017-12-13 Thread Mikhail Zaytsev
The patch moves TIOCGSERIAL ioctl case to get_serial_info function. Signed-off-by: Mikhail Zaytsev --- drivers/usb/serial/ark3116.c | 35 +-- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/drivers/usb/serial/ark3116.c

Re: [PATCH] phy: rockchip-typec: Try to turn the PHY on several times

2017-12-13 Thread Enric Balletbo Serra
Hi Doug, 2017-12-11 22:45 GMT+01:00 Douglas Anderson : > Bind / unbind stress testing of the USB controller on rk3399 found > that we'd often end up with lots of failures that looked like this: > > phy phy-ff80.phy.9: phy poweron failed --> -110 > dwc3

Re: Dual-role behavior with USB-C?

2017-12-13 Thread Heikki Krogerus
Hi guys, On Wed, Dec 13, 2017 at 10:43:50AM +0800, Peter Chen wrote: > On Wed, Dec 13, 2017 at 01:17:23AM +, Takashi Matsuzawa wrote: > > Hello. > > > > >If you have a Type-C connector on your board, then you also should > > >have a USB Type-C PHY that takes care of CC logic. The

[PATCH] usb/io_edgeport: Fix a possible sleep-in-atomic bug in edge_bulk_in_callback

2017-12-13 Thread Jia-Ju Bai
According to drivers/usb/serial/io_edgeport.c, the driver may sleep under a spinlock. The function call path is: edge_bulk_in_callback (acquire the spinlock) process_rcvd_data process_rcvd_status change_port_settings send_iosp_ext_cmd write_cmd_usb

Re: [PATCH] USB: serial: ark3116.c: Remove unused TIOCSSERIAL case from ioctl

2017-12-13 Thread Mikhail Zaytsev
On Wed, 13 Dec 2017 12:40:48 +0100 Oliver Neukum wrote: > They give you nothing. If you are looking at a vendor ID nothing but the > bare number makes sense. You are just making peoples' life harder when > they have to look up that definition. A symbolic name is fine if it

Re: [PATCH 1/4] Staging: rtl8723bs: Replace true with x and false with !x

2017-12-13 Thread Greg KH
On Wed, Dec 13, 2017 at 05:25:42PM +0530, Shreeya Patel wrote: > Replace true and false keywords with "x" and "!x" > respectively to follow the kernel coding style. > > Signed-off-by: Shreeya Patel > --- > drivers/staging/rtl8723bs/hal/sdio_ops.c | 30

[PATCH 2/4] Staging: rtl8723bs: Change names to conform to the kernel code

2017-12-13 Thread Shreeya Patel
Change names of some variables and functions to conform to the kernel coding style. Signed-off-by: Shreeya Patel --- drivers/staging/rtl8723bs/hal/sdio_ops.c | 186 +++ 1 file changed, 93 insertions(+), 93 deletions(-) diff --git

[PATCH 4/4] Staging: rtl8723bs: Use !x instead of NULL comparison

2017-12-13 Thread Shreeya Patel
If "x" is compared to NULL, use "!x" instead of it, so as to follow the kernel coding style. Signed-off-by: Shreeya Patel --- drivers/staging/rtl8723bs/hal/sdio_ops.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git

[PATCH 3/4] Staging: rtl8723bs: Change condition to assignment

2017-12-13 Thread Shreeya Patel
Change the conditional operator to assignment as it is not a conditional statement. Signed-off-by: Shreeya Patel --- drivers/staging/rtl8723bs/hal/sdio_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 1/4] Staging: rtl8723bs: Replace true with x and false with !x

2017-12-13 Thread Shreeya Patel
Replace true and false keywords with "x" and "!x" respectively to follow the kernel coding style. Signed-off-by: Shreeya Patel --- drivers/staging/rtl8723bs/hal/sdio_ops.c | 30 ++ 1 file changed, 14 insertions(+), 16 deletions(-) diff

[PATCH 0/4] Remove checkpatch warnings

2017-12-13 Thread Shreeya Patel
This patchset removes some warnings generated by checkpatch for cleanup of the rtl8723bs driver. Also some additional cleanups are introduced in the *[1/4] and *[3/4] patches to make the code according to the kernel coding style. Shreeya Patel (4): Staging: rtl8723bs: Replace true with x and

Re: [PATCH] USB: serial: ti_usb_3410_5052: Avoid goto in bulk in callback

2017-12-13 Thread Johan Hovold
On Wed, Dec 13, 2017 at 12:32:47PM +0100, Ladislav Michl wrote: > On Wed, Dec 13, 2017 at 12:16:05PM +0100, Johan Hovold wrote: > > On Mon, Dec 11, 2017 at 01:44:57PM +0100, Ladislav Michl wrote: > > > On Mon, Dec 11, 2017 at 12:52:46PM +0100, Johan Hovold wrote: > > > > On Mon, Dec 11, 2017 at

Re: [PATCH] USB: serial: ark3116.c: Remove unused TIOCSSERIAL case from ioctl

2017-12-13 Thread Oliver Neukum
Am Mittwoch, den 13.12.2017, 14:31 +0300 schrieb Mikhail Zaytsev: > On Wed, 13 Dec 2017 11:17:28 +0100 Oliver Neukum wrote: > > > > > Am Mittwoch, den 13.12.2017, 12:30 +0300 schrieb Mikhail Zaytsev: > > > > > > +#define RS232_VENDOR 0x6547 > > > +#define RS232_PRODUCT 0x0232

Re: [BUG] usb/io_edgeport: a possible sleep-in-atomic bug in edge_bulk_in_callback

2017-12-13 Thread Johan Hovold
[ +CC: linux-usb] On Wed, Dec 13, 2017 at 06:22:26PM +0800, Jia-Ju Bai wrote: > According to drivers/usb/serial/io_edgeport.c, the driver may sleep > under a spinlock. > The function call path is: > edge_bulk_in_callback (acquire the spinlock) >process_rcvd_data > process_rcvd_status >

Re: [PATCH] USB: serial: ti_usb_3410_5052: Avoid goto in bulk in callback

2017-12-13 Thread Ladislav Michl
On Wed, Dec 13, 2017 at 12:16:05PM +0100, Johan Hovold wrote: > On Mon, Dec 11, 2017 at 01:44:57PM +0100, Ladislav Michl wrote: > > On Mon, Dec 11, 2017 at 12:52:46PM +0100, Johan Hovold wrote: > > > On Mon, Dec 11, 2017 at 12:32:49PM +0100, Ladislav Michl wrote: > > > > On Mon, Dec 11, 2017 at

Re: [PATCH] USB: serial: ark3116.c: Remove unused TIOCSSERIAL case from ioctl

2017-12-13 Thread Mikhail Zaytsev
On Wed, 13 Dec 2017 11:17:28 +0100 Oliver Neukum wrote: > Am Mittwoch, den 13.12.2017, 12:30 +0300 schrieb Mikhail Zaytsev: > > +#define RS232_VENDOR 0x6547 > > +#define RS232_PRODUCT 0x0232 > > +#define IRDA_VENDOR 0x18ec > > +#define IRDA_PRODUCT 0x3118 > >   > >  /* usb

Re: [PATCH] USB: core: prevent malicious bNumInterfaces overflow

2017-12-13 Thread Greg KH
On Tue, Dec 12, 2017 at 02:25:13PM -0500, Alan Stern wrote: > A malicious USB device with crafted descriptors can cause the kernel > to access unallocated memory by setting the bNumInterfaces value too > high in a configuration descriptor. Although the value is adjusted > during parsing, this

Re: [PATCH] USB: serial: ark3116.c: Remove unused TIOCSSERIAL case from ioctl

2017-12-13 Thread Johan Hovold
On Wed, Dec 13, 2017 at 12:30:04PM +0300, Mikhail Zaytsev wrote: > The patch removes unused TIOCSSERIAL case from ioctl. TIOCGSERIAL case > moves to the get_serial_info() function. Some magic numbers moves to > #define directives. You need to split logical changes up in separate patches, and

Re: [PATCH] USB: serial: ti_usb_3410_5052: Avoid goto in bulk in callback

2017-12-13 Thread Johan Hovold
On Mon, Dec 11, 2017 at 01:44:57PM +0100, Ladislav Michl wrote: > On Mon, Dec 11, 2017 at 12:52:46PM +0100, Johan Hovold wrote: > > On Mon, Dec 11, 2017 at 12:32:49PM +0100, Ladislav Michl wrote: > > > On Mon, Dec 11, 2017 at 11:10:35AM +0100, Johan Hovold wrote: > [snip] > > > > I'm afraid I

[PATCH] usbip: fix usbip bind writing random string after command in match_busid

2017-12-13 Thread Juan Zea
usbip bind writes commands followed by random string when writing to match_busid attribute in sysfs, caused by using full variable size instead of string length. Signed-off-by: Juan Zea --- tools/usb/usbip/src/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH] usb: xhci: Add XHCI_TRUST_TX_LENGTH for Renesas uPD720201

2017-12-13 Thread Mathias Nyman
On 12.12.2017 18:54, Ard Biesheuvel wrote: On 12 December 2017 at 16:47, Daniel Thompson wrote: When plugging in a USB webcam I see the following message: xhci_hcd :04:00.0: WARN Successful completion on short TX: needs XHCI_TRUST_TX_LENGTH quirk?

Re: [PATCH] xhci: Fix use-after-free in xhci debugfs

2017-12-13 Thread Mathias Nyman
On 11.12.2017 00:14, Alexander Kappner wrote: Trying to read from debugfs after the system has resumed from hibernate causes a use-after-free and thus a protection fault. Steps to reproduce: Hibernate system, resume from hibernate, then run $ cat

Re: [PATCH] usbip: fix usbip bind writing random string after command in match_busid

2017-12-13 Thread Greg KH
On Wed, Dec 13, 2017 at 11:16:03AM +0100, Juan Zea wrote: > usbip bind writes commands followed by random string when writing to > match_busid attribute in sysfs, caused by using full variable size > instead of string length. > > Signed-off-by: Juan Zea > --- >

Re: [PATCH] USB: serial: ark3116.c: Remove unused TIOCSSERIAL case from ioctl

2017-12-13 Thread Oliver Neukum
Am Mittwoch, den 13.12.2017, 12:30 +0300 schrieb Mikhail Zaytsev: > +#define RS232_VENDOR 0x6547 > +#define RS232_PRODUCT 0x0232 > +#define IRDA_VENDOR 0x18ec > +#define IRDA_PRODUCT 0x3118 >   >  /* usb timeout of 1 second */ >  #define ARK_TIMEOUT 1000 >   >  static const struct usb_device_id

[PATCH] usbip: fix usbip bind writing random string after command in match_busid

2017-12-13 Thread Juan Zea
usbip bind writes commands followed by random string when writing to match_busid attribute in sysfs, caused by using full variable size instead of string length. Signed-off-by: Juan Zea --- tools/usb/usbip/src/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH] usb: gadget: configfs: Disallow empty function instance name

2017-12-13 Thread Krzysztof Opasiak
On 12/13/2017 10:29 AM, Felipe Balbi wrote: Hi, Alan Stern writes: Krzysztof Opasiak writes: On 12/12/2017 01:31 PM, Felipe Balbi wrote: Hi, Krzysztof Opasiak writes: Every function should have a type and

Re: [PATCH] usb: gadget: configfs: Disallow empty function instance name

2017-12-13 Thread Felipe Balbi
Hi, Alan Stern writes: >> Krzysztof Opasiak writes: >> > On 12/12/2017 01:31 PM, Felipe Balbi wrote: >> >> >> >> Hi, >> >> >> >> Krzysztof Opasiak writes: >> >>> Every function should have a type and instance name. >>

[PATCH] USB: serial: ark3116.c: Remove unused TIOCSSERIAL case from ioctl

2017-12-13 Thread Mikhail Zaytsev
The patch removes unused TIOCSSERIAL case from ioctl. TIOCGSERIAL case moves to the get_serial_info() function. Some magic numbers moves to #define directives. Signed-off-by: Mikhail Zaytsev --- drivers/usb/serial/ark3116.c | 54 ++-- 1

Re: [BUG] kaweth: a possible sleep-in-atomic bug in kaweth_start_xmit

2017-12-13 Thread Oliver Neukum
Am Mittwoch, den 13.12.2017, 16:57 +0800 schrieb Jia-Ju Bai: > According to drivers/net/usb/kaweth.c, the driver may sleep under a > spinlock. > The function call path is: > kaweth_start_xmit (acquire the spinlock) >kaweth_async_set_rx_mode > kaweth_control >

[BUG] kaweth: a possible sleep-in-atomic bug in kaweth_start_xmit

2017-12-13 Thread Jia-Ju Bai
According to drivers/net/usb/kaweth.c, the driver may sleep under a spinlock. The function call path is: kaweth_start_xmit (acquire the spinlock) kaweth_async_set_rx_mode kaweth_control kaweth_internal_control_msg usb_start_wait_urb wait_event_timeout --> may sleep

[PATCH] USB: serial: ark3116.c: Remove unused TIOCSSERIAL case from ioctl

2017-12-13 Thread Mikhail Zaytsev
The patch removes unused TIOCSSERIAL case from ioctl. TIOCGSERIAL case moves to the get_serial_info() function. Any magic numbers moves to #define directives. Signed-off-by: Mikhail Zaytsev --- drivers/usb/serial/ark3116.c | 54 ++-- 1

Re: Add your device DWM-222 to a proper driver

2017-12-13 Thread Lars Melin
On 12/13/2017 14:18, martin.er...@centrum.cz wrote: Dear linux development, please to add device to a proper driver. I wrote this requirement according log list message. My USB modem is D-link DWM-222 Vendor    3G Standard    Default     Id        Modem Id    User     Modem Storage    Diag