Re: [PATCH] net/usb: cancel pending work when unbinding smsc75xx

2018-10-04 Thread David Miller
From: Yu Zhao Date: Fri, 28 Sep 2018 17:04:30 -0600 > Cancel pending work before freeing smsc75xx private data structure > during binding. This fixes the following crash in the driver: > > BUG: unable to handle kernel NULL pointer dereference at 0050 > IP: mutex_lock+0x2b/0x3f > > W

Re: [Linux-kernel] [PATCH 3/4] usbnet: smsc95xx: check for csum being in last four bytes

2018-10-04 Thread Ben Hutchings
On Tue, 2018-10-02 at 10:26 +0100, Ben Dooks wrote: [...] > @@ -2031,7 +2045,8 @@ static struct sk_buff *smsc95xx_tx_fixup(struct usbnet > *dev, > >   } >   >   if (csum) { > - if (skb->len <= 45) { > + /* note, csum does not work if csum in last DWORD of packet */ >

Re: [Linux-kernel] [PATCH 2/4] usbnet: smsc95xx: align tx-buffer to word

2018-10-04 Thread Ben Hutchings
On Tue, 2018-10-02 at 10:26 +0100, Ben Dooks wrote: > The tegra driver requires alignment of the buffer, so try and > make this better by pushing the buffer start back to an word > aligned address. At the worst this makes memcpy() easier as > it is word aligned, at best it makes sure the usb can di

[PATCH] cdc-acm: fix race between reset and control messaging

2018-10-04 Thread Oliver Neukum
If a device splits up a control message and a reset() happens between the parts, the message is lost and already recieved parts must be dropped. Signed-off-by: Oliver Neukum Fixes: 1aba579f3cf51 ("cdc-acm: handle read pipe errors") --- drivers/usb/class/cdc-acm.c | 1 + 1 file changed, 1 inserti

Re: [PATCH 2/2] cdc-acm: correct counting of UART states in serial state notification

2018-10-04 Thread Oliver Neukum
On Sa, 2018-09-22 at 22:11 +0200, Tobias Herzog wrote: > The usb standard ("Universal Serial Bus Class Definitions for Communication > Devices") distiguishes between "consistent signals" (DSR, DCD), and > "irregular signals" (break, ring, parity error, framing error, overrun). > The bits of "irregu

Re: [PATCH 1/2] cdc-acm: do not reset notification buffer index upon urb unlinking

2018-10-04 Thread Oliver Neukum
On Sa, 2018-09-22 at 22:11 +0200, Tobias Herzog wrote: > Resetting the write index of the notification buffer on urb unlink (e.g. > closing a cdc-acm device from userspace) may lead to wrong interpretation > of further received notifications, in case the index is not 0 when urb > unlink happens (i.

Re: [PATCH 1/2] cdc-acm: do not reset notification buffer index upon urb unlinking

2018-10-04 Thread Oliver Neukum
On Sa, 2018-09-22 at 22:11 +0200, Tobias Herzog wrote: > Resetting the write index of the notification buffer on urb unlink (e.g. > closing a cdc-acm device from userspace) may lead to wrong interpretation > of further received notifications, in case the index is not 0 when urb > unlink happens (i.

Re: [PATCH] usb: gadget: udc: renesas_usb3: Fix b-device mode for "workaround"

2018-10-04 Thread Simon Horman
On Tue, Oct 02, 2018 at 08:57:44PM +0900, Yoshihiro Shimoda wrote: > If the "workaround_for_vbus" is true, the driver will not call > usb_disconnect(). So, since the controller keeps some registers' > value, the driver doesn't re-enumarate suitable speed after > the b-device mode is disabled. To fi