Re: [PATCH v3 1/2] dt-bindings: usb: add documentation for typec switch via GPIO

2019-03-19 Thread Heikki Krogerus
On Mon, Mar 18, 2019 at 10:59:31AM +, Jun Li wrote: > > > > -Original Message- > > From: Heikki Krogerus > > Sent: 2019年3月13日 17:36 > > To: Rob Herring > > Cc: Jun Li ; gre...@linuxfoundation.org; > > hdego...@redhat.com; > > andy.shevche...@gmail.com; linux-usb@vger.kernel.org; >

Re: [PATCH] [PATCH] usb: gadget: composite: Fix double free memory bug

2019-03-19 Thread mgautam
Hi, On 2019-03-15 16:37, Chandana Kishori Chiluveru wrote: configfs_dev_cleanup function can double free os_desc and buffer when called from different context. For example, this can be called from composite_unbind() and when composite_bind() fails. Shouldn't we instead fix the error path handl

Re: [PATCH] USB: serial: option: Add support for Quectel EM12

2019-03-19 Thread Johan Hovold
On Sat, Mar 02, 2019 at 01:35:53PM +0100, Kristian Evensen wrote: > The Quectel EM12 is a Cat. 12 LTE modem. It behaves in the exactly the > same way as the EP06 (including the dynamic configuration behavior), so > the same checkes on reserved interfaces, etc. are needed. > > Signed-off-by: Kristi

Re: [PATCH 4/4] usb/serial: Convert serial_minors to XArray

2019-03-19 Thread Matthew Wilcox
On Tue, Mar 19, 2019 at 07:14:09AM +0100, Greg KH wrote: > On Mon, Mar 18, 2019 at 02:17:13PM -0700, Matthew Wilcox wrote: > > Signed-off-by: Matthew Wilcox > > --- > > drivers/usb/serial/usb-serial.c | 21 ++--- > > 1 file changed, 10 insertions(+), 11 deletions(-) > > I really

Re: [PATCH 4/4] usb/serial: Convert serial_minors to XArray

2019-03-19 Thread Oliver Neukum
On Di, 2019-03-19 at 04:35 -0700, Matthew Wilcox wrote: > On Tue, Mar 19, 2019 at 07:14:09AM +0100, Greg KH wrote: > > On Mon, Mar 18, 2019 at 02:17:13PM -0700, Matthew Wilcox wrote: > > > Signed-off-by: Matthew Wilcox > > > --- > > > drivers/usb/serial/usb-serial.c | 21 ++--- > >

Re: [PATCH 4/4] usb/serial: Convert serial_minors to XArray

2019-03-19 Thread Greg KH
On Tue, Mar 19, 2019 at 12:36:21PM +0100, Oliver Neukum wrote: > On Di, 2019-03-19 at 04:35 -0700, Matthew Wilcox wrote: > > On Tue, Mar 19, 2019 at 07:14:09AM +0100, Greg KH wrote: > > > On Mon, Mar 18, 2019 at 02:17:13PM -0700, Matthew Wilcox wrote: > > > > Signed-off-by: Matthew Wilcox > > > >

Re: [PATCH 2/4] cdc-acm: Convert acm_minors to XArray

2019-03-19 Thread Greg KH
On Mon, Mar 18, 2019 at 02:17:11PM -0700, Matthew Wilcox wrote: > Signed-off-by: Matthew Wilcox Also something here saying acm_minors was an idr structure that is being converted to xarray. > --- > drivers/usb/class/cdc-acm.c | 33 ++--- > 1 file changed, 14 insertio

Re: [PATCH 1/4] usb: Convert xhci-mem to XArray

2019-03-19 Thread Greg KH
On Mon, Mar 18, 2019 at 02:17:10PM -0700, Matthew Wilcox wrote: > The XArray API is a better fit for xhci than the radix tree API was, > to the point where we can remove the wrappers around the radix tree > and just call the XArray APIs directly. > > Signed-off-by: Matthew Wilcox > --- > drivers

Re: [PATCH 2/4] cdc-acm: Convert acm_minors to XArray

2019-03-19 Thread Oliver Neukum
On Mo, 2019-03-18 at 14:17 -0700, Matthew Wilcox wrote: > Signed-off-by: Matthew Wilcox Straight replacement. Looks fine to me. But without a commit message Greg would dismember both of us. Regards Oliver

Re: [PATCH 2/4] cdc-acm: Convert acm_minors to XArray

2019-03-19 Thread Oliver Neukum
On Di, 2019-03-19 at 13:14 +0100, Greg KH wrote: > On Mon, Mar 18, 2019 at 02:17:11PM -0700, Matthew Wilcox wrote: > > Signed-off-by: Matthew Wilcox [..] > > static int acm_alloc_minor(struct acm *acm) > > { > > - int minor; > > - > > - mutex_lock(&acm_minors_lock); > > - minor = idr_allo

[PATCH] usb: typec: wcove: Provide fwnode for the port

2019-03-19 Thread Heikki Krogerus
By registering a software fwnode for the port, we can supply the connector capabilities to the tcpm using the common USB connector device properties instead of relying on platform data (struct tcpc_config). Signed-off-by: Heikki Krogerus --- drivers/usb/typec/tcpm/wcove.c | 29 --

Re: [PATCH 2/4] cdc-acm: Convert acm_minors to XArray

2019-03-19 Thread Matthew Wilcox
On Tue, Mar 19, 2019 at 01:14:20PM +0100, Greg KH wrote: > On Mon, Mar 18, 2019 at 02:17:11PM -0700, Matthew Wilcox wrote: > > Signed-off-by: Matthew Wilcox > > Also something here saying acm_minors was an idr structure that is being > converted to xarray. ACK. > > @@ -86,20 +86,15 @@ static st

Re: [PATCH v2] usb: typec: tcpm: Try PD-2.0 if sink does not respond to 3.0 source-caps

2019-03-19 Thread Heikki Krogerus
On Sat, Mar 16, 2019 at 04:57:12PM +0100, Hans de Goede wrote: > PD 2.0 sinks are supposed to accept src-capabilities with a 3.0 header and > simply ignore any src PDOs which the sink does not understand such as PPS > but some 2.0 sinks instead ignore the entire PD_DATA_SOURCE_CAP message, > causin

Re: [PATCH] usb: typec: pi3usb30532: Keep orientation when setting mux to safe mode

2019-03-19 Thread Heikki Krogerus
On Fri, Mar 15, 2019 at 04:36:13PM +0200, Heikki Krogerus wrote: > On Fri, Feb 22, 2019 at 08:22:39PM +0100, Hans de Goede wrote: > > Keep the orientation value when setting the mux to safe mode, this > > fixes the orientation getting reset when switching alt-modes. > > > > Signed-off-by: Hans de

Re: [PATCH v3 0/8] usb: typec: fusb302: Various fixes

2019-03-19 Thread Heikki Krogerus
On Fri, Mar 15, 2019 at 04:34:59PM +0200, Heikki Krogerus wrote: > On Mon, Mar 11, 2019 at 11:48:10AM +0100, Hans de Goede wrote: > > Hi All, > > > > Here is v3 of my fusb302 bug-fix series, the main fix in this series > > makes active adapters like Type-C to HDMI (often HDMI + USB-3-A) adapters >

Re: [PATCH v5 1/2] usb: typec: ucsi: add get_fw_info function

2019-03-19 Thread Heikki Krogerus
On Thu, Feb 07, 2019 at 11:18:12AM -0800, Ajay Gupta wrote: > From: Ajay Gupta > > Function is to get the details of ccg firmware and device version. > It will be useful in debugging and also during firmware update. > > Signed-off-by: Ajay Gupta Applied: https://github.com/krohei/linux/commit/

Re: [PATCH v5 2/2] usb: typec: ucsi: add firmware flashing support

2019-03-19 Thread Heikki Krogerus
On Thu, Feb 07, 2019 at 11:18:13AM -0800, Ajay Gupta wrote: > From: Ajay Gupta > > CCGx has two copies of the firmware in addition to the bootloader. > If the device is running FW1, FW2 can be updated with the new version. > Dual firmware mode allows the CCG device to stay in a PD contract and >

Re: [PATCH v2 1/3] usb: gadget: net2280: Fix overrun of OUT messages

2019-03-19 Thread Alan Stern
On Mon, 18 Mar 2019 gu...@kiener-muenchen.de wrote: > Zitat von Alan Stern : > > > On Mon, 18 Mar 2019, Guido Kiener wrote: > > > >> The OUT endpoint normally blocks (NAK) subsequent packets when a > >> short packet was received and returns an incomplete queue entry to > >> the gadget driver. The

Re: [PATCH 3/4] usb: Convert usb_bus_idr to XArray

2019-03-19 Thread Alan Stern
On Mon, 18 Mar 2019, Matthew Wilcox wrote: > Remove the usb_bus_idr_lock as it doesn't appear to be protecting > anything more than the built-in XArray lock does. > > Signed-off-by: Matthew Wilcox > --- > drivers/usb/core/devices.c | 10 +++-- > drivers/usb/core/hcd.c | 40 +++

Re: [PATCH v2 1/3] usb: gadget: net2280: Fix overrun of OUT messages

2019-03-19 Thread guido
Zitat von Alan Stern : Here are a few more slight changes to the text. Submit the patch again with this description and it will be okay: The OUT endpoint normally blocks (NAK) subsequent packets when a short packet was received and returns an incomplete queue entry to the gadget driver. The

Re: [PATCH] usb: typec: wcove: Provide fwnode for the port

2019-03-19 Thread Guenter Roeck
On Tue, Mar 19, 2019 at 03:53:24PM +0300, Heikki Krogerus wrote: > By registering a software fwnode for the port, we can supply > the connector capabilities to the tcpm using the common USB > connector device properties instead of relying on platform > data (struct tcpc_config). > > Signed-off-by:

[PATCH v3] usb: gadget: net2280: Fix overrun of OUT messages

2019-03-19 Thread Guido Kiener
The OUT endpoint normally blocks (NAK) subsequent packets when a short packet was received and returns an incomplete queue entry to the gadget driver. Thereby the gadget driver can detect a short packet when reading queue entries with a length that is not equal to a multiple of packet size. The st

Re: [PATCH v3] usb: gadget: net2280: Fix overrun of OUT messages

2019-03-19 Thread Alan Stern
On Tue, 19 Mar 2019, Guido Kiener wrote: > The OUT endpoint normally blocks (NAK) subsequent packets when a > short packet was received and returns an incomplete queue entry to > the gadget driver. Thereby the gadget driver can detect a short packet > when reading queue entries with a length that

Re: [PATCH v2 3/3] usb: gadget: net2272: Fix net2272_dequeue()

2019-03-19 Thread guido
Zitat von Guido Kiener : Restore the status of ep->stopped in function net2272_dequeue(). When the given request is not found in the endpoint queue the function returns -EINVAL without restoring the state of ep->stopped. Thus the endpoint keeps blocked and does not transfer any data anymore.

Re: [PATCH v2 3/3] usb: gadget: net2272: Fix net2272_dequeue()

2019-03-19 Thread Alan Stern
On Tue, 19 Mar 2019 gu...@kiener-muenchen.de wrote: > Zitat von Guido Kiener : > > > Restore the status of ep->stopped in function net2272_dequeue(). > > > > When the given request is not found in the endpoint queue > > the function returns -EINVAL without restoring the state of > > ep->stopped.

[PATCH] usb-serial: fix mos_parport refcount imbalance on error path

2019-03-19 Thread Lin Yi
write_parport_ref_nonblock increase mos_parport refcount without decrease it when return -ENOMEM code, so need a decrement before function return -ENOMEM. Signed-off-by: Lin Yi --- drivers/usb/serial/mos7720.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/serial/mos7720.c b/d

Re: [PATCH] [v2]USB:serial:pl2303:add new Pull-Up mode to support PL2303HXD (TYPE_HX)

2019-03-19 Thread Charles Yeh
Hi Greg / Johan, Is there free time to check the patch? Or I have to continue wait. Thanks! Charles Greg KH 於 2019年3月6日 週三 下午1:25寫道: > > On Wed, Mar 06, 2019 at 12:42:29PM +0800, Charles Yeh wrote: > > Hi Johan / Greg, > > > > Do you have time to review the patch? > > If there is no

[PATCH] usb: dwc3: pci: add support for Comet Lake PCH ID

2019-03-19 Thread Felipe Balbi
This patch simply adds a new PCI Device ID Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/dwc3-pci.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c index fdc6e4e403e8..8cced3609e24 100644 --- a/drivers/usb/dwc3/dwc3-pci.c +++ b