Re: [PATCH 1/1] usb: hub: check return value

2017-04-23 Thread Viresh Kumar
On Sun, Apr 23, 2017 at 4:52 PM, Pan Bian wrote: > From: Pan Bian > > Function usb_autopm_get_interface() will return a negative errno on > failure, and function usb_autopm_put_interface() should not be called if > it fails. However, in function

Re: [PATCH] usb: chipidea: Fix missing resume call after suspend

2017-04-23 Thread Peter Chen
On Fri, Apr 21, 2017 at 12:10:53PM +0200, Bernhard Walle wrote: > We have a i.MX53-based hardware (quite similar to the i.MX53 QSB from > Freescale/NXP). I'm reading the /ci_hdrc.0/gadget/suspended sysfs > file to find out whether a PC is connected to the USB gadget. With old > kernel

Re: Regression: asix: BISECTED suspend crash - Dell XPS13-9360

2017-04-23 Thread Chen Yu
Hi Freddy, Robert, David, Any clue here? Seems to broken here: static int asix_suspend(struct usb_interface *intf, pm_message_t message) { struct usbnet *dev = usb_get_intfdata(intf); struct asix_common_private *priv = dev->driver_priv; if (priv->suspend) //priv is NULL

[PATCH v2] usb: core: Warn if an URB's transfer_buffer is on stack

2017-04-23 Thread Florian Fainelli
We see a large number of fixes to several drivers to remove the usage of on-stack buffers feeding into USB transfer functions. Make it easier to spot the offenders by adding a warning in usb_hcd_map_urb_for_dma() checking that urb->transfer_buffer is not a stack object. Signed-off-by: Florian

Re: [PATCH] usb: core: Warn if an URB's transfer_buffer is on stack

2017-04-23 Thread Alan Stern
On Sun, 23 Apr 2017, Florian Fainelli wrote: > > In that case, it would be better to move the warning to a central place > > where it will always get triggered, such as map_urb_for_dma(). As it > > is, the patch will only issue a warning for callers of usb_bulk_msg(), > > usb_interrupt_msg(), or

Re: [PATCH] usb: core: Warn if an URB's transfer_buffer is on stack

2017-04-23 Thread Florian Fainelli
On 04/23/2017 09:01 AM, Alan Stern wrote: > On Sun, 23 Apr 2017, Greg Kroah-Hartman wrote: > >> On Sat, Apr 22, 2017 at 05:31:27PM -0400, Alan Stern wrote: >>> On Sat, 22 Apr 2017, Florian Fainelli wrote: >>> We see a large number of fixes to several drivers to remove the usage of

Re: Regression - Linux 4.9: ums_eneub6250 broken: transfer buffer not dma capable - Trace

2017-04-23 Thread Alan Stern
On Sat, 22 Apr 2017, Andreas Hartmann wrote: > > In the meanwhile, I see another problem. The SCSI residue value is > > getting overwritten when new firmware is sent to the device. Like I said > > before, it's amazing this driver has ever worked. > > It depends on how you define "worked" ...

Re: [PATCH] usb: core: Warn if an URB's transfer_buffer is on stack

2017-04-23 Thread Alan Stern
On Sun, 23 Apr 2017, Greg Kroah-Hartman wrote: > On Sat, Apr 22, 2017 at 05:31:27PM -0400, Alan Stern wrote: > > On Sat, 22 Apr 2017, Florian Fainelli wrote: > > > > > We see a large number of fixes to several drivers to remove the usage of > > > on-stack buffers feeding into USB transfer

[PATCH 1/1] usb: hub: check return value

2017-04-23 Thread Pan Bian
From: Pan Bian Function usb_autopm_get_interface() will return a negative errno on failure, and function usb_autopm_put_interface() should not be called if it fails. However, in function usb_remove_device(), the return value of function usb_autopm_get_interface() is not

Re: [PATCH] usb: core: Warn if an URB's transfer_buffer is on stack

2017-04-23 Thread Greg Kroah-Hartman
On Sat, Apr 22, 2017 at 05:31:27PM -0400, Alan Stern wrote: > On Sat, 22 Apr 2017, Florian Fainelli wrote: > > > We see a large number of fixes to several drivers to remove the usage of > > on-stack buffers feeding into USB transfer functions. Make it easier to spot > > the offenders by adding a