Re: [PATCH] USB: serial: option: set driver_info for SIM5218 and compatibles

2019-02-27 Thread Johan Hovold
On Tue, Feb 26, 2019 at 05:07:10PM +, Mans Rullgard wrote: > The SIMCom SIM5218 and compatible devices have 5 USB interfaces, only 4 > of which are serial ports. The fifth is a network interface supported > by the qmi-wwan driver. Furthermore, the serial ports do not support > modem control s

Re: [PATCH 1/5] usb: gadget: u_serial: add missing port entry locking

2019-02-27 Thread Greg Kroah-Hartman
On Wed, Feb 27, 2019 at 08:48:56AM +0100, Michał Mirosław wrote: > gserial_alloc_line() misses locking (for a release barrier) while > resetting port entry on TTY allocation failure. Fix this. > > Signed-off-by: Michał Mirosław > --- > drivers/usb/gadget/function/u_serial.c | 2 ++ > 1 file chan

Re: [PATCH 3/5] usb: gadget: u_serial: make OBEX port not a console

2019-02-27 Thread Greg Kroah-Hartman
On Wed, Feb 27, 2019 at 08:48:57AM +0100, Michał Mirosław wrote: > Prevent OBEX serial port from ever becoming a console. Why? > /* management of individual TTY ports */ > -int gserial_alloc_line(unsigned char *port_line); > +int gserial_alloc_line(unsigned char *port_line, bool maybe_console);

Re: [PATCH 5/5] usb: gadget: u_serial: diagnose missed console messages

2019-02-27 Thread Greg Kroah-Hartman
On Wed, Feb 27, 2019 at 08:48:58AM +0100, Michał Mirosław wrote: > Insert markers in console stream instead of making console output > glued together when drops happen. I'm sorry, but I can not understand this sentance at all. Can you please write more here to help out? thanks, greg k-h

Re: [PATCH 2/5] usb: gadget: u_serial: reimplement console support

2019-02-27 Thread Greg Kroah-Hartman
On Wed, Feb 27, 2019 at 08:48:57AM +0100, Michał Mirosław wrote: > Rewrite console support to fix a few shortcomings of the old code > preventing its use with multiple ports. This removes some duplicated > code and replaces a custom kthread with simpler workqueue item. > > Only port ttyGS0 gets to

Re: [PATCH] usb: typec: altmodes/displayport: Fall back to multi-func pins

2019-02-27 Thread Heikki Krogerus
On Mon, Feb 25, 2019 at 07:50:32PM +0100, Hans de Goede wrote: > Hi Heikki, > > On 25-02-19 16:49, Heikki Krogerus wrote: > > On Mon, Feb 25, 2019 at 01:56:37PM +0100, Hans de Goede wrote: > > > If our port-partner supports both DP-only operation (pin-assignment C) > > > and multi-func operation (

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

2019-02-27 Thread Heikki Krogerus
On Mon, Feb 25, 2019 at 07:52:10PM +0100, Hans de Goede wrote: > Hi, > > On 25-02-19 16:50, 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 w

Re: [PATCH 1/5] usb: gadget: u_serial: add missing port entry locking

2019-02-27 Thread Michał Mirosław
On Wed, Feb 27, 2019 at 09:41:07AM +0100, Greg Kroah-Hartman wrote: > On Wed, Feb 27, 2019 at 08:48:56AM +0100, Michał Mirosław wrote: > > gserial_alloc_line() misses locking (for a release barrier) while > > resetting port entry on TTY allocation failure. Fix this. > > > > Signed-off-by: Michał M

[PATCH v2 2/5] usb: gadget: u_serial: reimplement console support

2019-02-27 Thread Michał Mirosław
Rewrite console support to fix a few shortcomings of the old code preventing its use with multiple ports. This removes some duplicated code and replaces a custom kthread with simpler workqueue item. Only port ttyGS0 gets to be a console for now. Signed-off-by: Michał Mirosław --- v2: no change

[PATCH v2 5/5] usb: gadget: u_serial: diagnose missed console messages

2019-02-27 Thread Michał Mirosław
Insert markers in console stream marking places where data is missing. This makes the hole in the data stand out clearly instead of glueing together unrelated messages. Signed-off-by: Michał Mirosław --- v2: commit message massage --- drivers/usb/gadget/function/u_serial.c | 15 ++-

[PATCH v2 4/5] usb: gadget: u_serial: allow more console gadget ports

2019-02-27 Thread Michał Mirosław
Allow configuring more than one console using USB serial or ACM gadget. By default, only first (ttyGS0) is a console, but this may be changed using function's new "console" attribute. Signed-off-by: Michał Mirosław --- v2: no changes --- drivers/usb/gadget/function/f_acm.c| 21 +++

[PATCH v2 1/5] usb: gadget: u_serial: add missing port entry locking

2019-02-27 Thread Michał Mirosław
gserial_alloc_line() misses locking (for a release barrier) while resetting port entry on TTY allocation failure. Fix this. Signed-off-by: Michał Mirosław --- v2: no changes --- drivers/usb/gadget/function/u_serial.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/gadget/func

[PATCH v2 3/5] usb: gadget: u_serial: make OBEX port not a console

2019-02-27 Thread Michał Mirosław
Prevent OBEX serial port from ever becoming a console. Console messages will definitely break the protocol, and since you have to instantiate the port making it explicitly for OBEX, there is no point in allowing console to break it by mistake. Signed-off-by: Michał Mirosław --- v2: change of AP

[PATCH v2 0/5] usb: gadget: u_serial: console for multiple ports

2019-02-27 Thread Michał Mirosław
This series makes it possible to have more control over console using USB serial gadget ports. This can be useful when you need more than one USB console or are configuring multiple serial port function via configfs. The patches are against usb-next branch. Michał Mirosław (5): usb: gadget: u_

Re: [PATCH v2 1/5] usb: gadget: u_serial: add missing port entry locking

2019-02-27 Thread Greg Kroah-Hartman
On Wed, Feb 27, 2019 at 10:29:37AM +0100, Michał Mirosław wrote: > gserial_alloc_line() misses locking (for a release barrier) while > resetting port entry on TTY allocation failure. Fix this. > > Signed-off-by: Michał Mirosław > --- > v2: no changes Shouldn't you have added a: Cc: stable to

Re: [PATCH v2 3/5] usb: gadget: u_serial: make OBEX port not a console

2019-02-27 Thread Greg Kroah-Hartman
On Wed, Feb 27, 2019 at 10:29:38AM +0100, Michał Mirosław wrote: > /* management of individual TTY ports */ > +int gserial_alloc_line_raw(unsigned char *port_line); > int gserial_alloc_line(unsigned char *port_line); What is the difference between "raw" and "not raw"? I can't even answer that q

Re: [PATCH v2 5/5] usb: gadget: u_serial: diagnose missed console messages

2019-02-27 Thread Greg Kroah-Hartman
On Wed, Feb 27, 2019 at 10:29:39AM +0100, Michał Mirosław wrote: > Insert markers in console stream marking places where data > is missing. This makes the hole in the data stand out clearly > instead of glueing together unrelated messages. > > Signed-off-by: Michał Mirosław > --- > v2: commit m

Re: [PATCH 2/2] usb: typec: add typec switch via GPIO control

2019-02-27 Thread Heikki Krogerus
On Mon, Feb 25, 2019 at 07:27:08AM +, Jun Li wrote: > This patch adds a simple typec switch driver which only needs > a GPIO to switch the super speed active channel according to > typec orientation. > > Signed-off-by: Li Jun > --- > drivers/usb/typec/mux/Kconfig | 6 +++ > drivers/u

Re: [PATCH 3/3] usb: typec: altmodes/displayport: Notify drm subsys of hotplug events

2019-02-27 Thread Heikki Krogerus
On Mon, Feb 25, 2019 at 02:20:37PM +0100, Hans de Goede wrote: > Use the new drm_kms_call_oob_hotplug_notifier_chain() function to load > drm/kms drivers know about DisplayPort over Type-C hotplug events. > > Signed-off-by: Hans de Goede I'm OK with this. I'll wait for the v2 and see if I can te

Re: [PATCH v2 3/5] usb: gadget: u_serial: make OBEX port not a console

2019-02-27 Thread Michał Mirosław
On Wed, Feb 27, 2019 at 10:36:25AM +0100, Greg Kroah-Hartman wrote: > On Wed, Feb 27, 2019 at 10:29:38AM +0100, Michał Mirosław wrote: > > /* management of individual TTY ports */ > > +int gserial_alloc_line_raw(unsigned char *port_line); > > int gserial_alloc_line(unsigned char *port_line); > Wh

Re: [PATCH v2 3/5] usb: gadget: u_serial: make OBEX port not a console

2019-02-27 Thread Greg Kroah-Hartman
On Wed, Feb 27, 2019 at 11:14:27AM +0100, Michał Mirosław wrote: > On Wed, Feb 27, 2019 at 10:36:25AM +0100, Greg Kroah-Hartman wrote: > > On Wed, Feb 27, 2019 at 10:29:38AM +0100, Michał Mirosław wrote: > > > /* management of individual TTY ports */ > > > +int gserial_alloc_line_raw(unsigned char

[PATCH v3 3/5] usb: gadget: u_serial: make OBEX port not a console

2019-02-27 Thread Michał Mirosław
Prevent OBEX serial port from ever becoming a console. Console messages will definitely break the protocol, and since you have to instantiate the port making it explicitly for OBEX, there is no point in allowing console to break it by mistake. Signed-off-by: Michał Mirosław --- v3: rename gser

[PATCH v3 1/5] usb: gadget: u_serial: add missing port entry locking

2019-02-27 Thread Michał Mirosław
gserial_alloc_line() misses locking (for a release barrier) while resetting port entry on TTY allocation failure. Fix this. Cc: sta...@vger.kernel.org Signed-off-by: Michał Mirosław --- v3: added cc-stable v2: no changes --- drivers/usb/gadget/function/u_serial.c | 2 ++ 1 file changed, 2 i

[PATCH v3 5/5] usb: gadget: u_serial: diagnose missed console messages

2019-02-27 Thread Michał Mirosław
Insert markers in console stream marking places where data is missing. This makes the hole in the data stand out clearly instead of glueing together unrelated messages. Example output as seen from USB host side: [0.064078] pinctrl core: registered pin 16 (UART3_RTS_N PC0) on 7868.pinmux

[PATCH v3 4/5] usb: gadget: u_serial: allow more console gadget ports

2019-02-27 Thread Michał Mirosław
Allow configuring more than one console using USB serial or ACM gadget. By default, only first (ttyGS0) is a console, but this may be changed using function's new "console" attribute. Signed-off-by: Michał Mirosław --- v3: no changes v2: no changes --- drivers/usb/gadget/function/f_acm.c

[PATCH v3 0/5] usb: gadget: u_serial: console for multiple ports

2019-02-27 Thread Michał Mirosław
This series makes it possible to have more control over console using USB serial gadget ports. This can be useful when you need more than one USB console or are configuring multiple serial port function via configfs. The patches are against usb-next branch. Michał Mirosław (5): usb: gadget: u_

[PATCH v3 2/5] usb: gadget: u_serial: reimplement console support

2019-02-27 Thread Michał Mirosław
Rewrite console support to fix a few shortcomings of the old code preventing its use with multiple ports. This removes some duplicated code and replaces a custom kthread with simpler workqueue item. Only port ttyGS0 gets to be a console for now. Signed-off-by: Michał Mirosław --- v3: no chang

Re: [PATCH 0/3] Propagate DP-over-Type-C hotplug events from Type-C subsys to drm-drivers

2019-02-27 Thread Heikki Krogerus
Hi Hans, On Mon, Feb 25, 2019 at 02:20:34PM +0100, Hans de Goede wrote: > Hi All, > > On some Cherry Trail devices, DisplayPort over Type-C is supported through > a USB-PD microcontroller (e.g. a fusb302) + a mux to switch the superspeed > datalines between USB-3 and DP (e.g. a pi3usb30532). The

Re: [PATCH 0/3] Propagate DP-over-Type-C hotplug events from Type-C subsys to drm-drivers

2019-02-27 Thread Jani Nikula
On Wed, 27 Feb 2019, Heikki Krogerus wrote: > One thing that this series does not consider is the DP lane count > problem. The GPU drivers (i915 in this case) does not know is four, > two or one DP lanes in use. Also, orientation. > I guess that is not a critical issue since there is a workaroun

Re: Do usb_submit_urb() memory allocation errors really exist in the wild?

2019-02-27 Thread Oliver Neukum
On Di, 2019-02-26 at 19:42 +0100, Petr Tesarik wrote: > On Tue, 26 Feb 2019 13:46:19 +0100 > Nicolas Saenz Julienne wrote: > > > [...] > > > USB and "critical" should never be in the same sentance, without the > > > word "not" being in there as well. :) > > > > Fair enough. It might still anno

Re: [PATCH 0/3] Propagate DP-over-Type-C hotplug events from Type-C subsys to drm-drivers

2019-02-27 Thread Heikki Krogerus
On Wed, Feb 27, 2019 at 01:16:27PM +0200, Jani Nikula wrote: > On Wed, 27 Feb 2019, Heikki Krogerus wrote: > > One thing that this series does not consider is the DP lane count > > problem. The GPU drivers (i915 in this case) does not know is four, > > two or one DP lanes in use. > > Also, orient

Re: [PATCH] USB: serial: option: set driver_info for SIM5218 and compatibles

2019-02-27 Thread Måns Rullgård
Johan Hovold writes: > On Tue, Feb 26, 2019 at 05:07:10PM +, Mans Rullgard wrote: >> The SIMCom SIM5218 and compatible devices have 5 USB interfaces, only 4 >> of which are serial ports. The fifth is a network interface supported >> by the qmi-wwan driver. Furthermore, the serial ports do n

Re: [PATCH v3 1/5] usb: gadget: u_serial: add missing port entry locking

2019-02-27 Thread Greg Kroah-Hartman
On Wed, Feb 27, 2019 at 11:46:57AM +0100, Michał Mirosław wrote: > gserial_alloc_line() misses locking (for a release barrier) while > resetting port entry on TTY allocation failure. Fix this. > > Cc: sta...@vger.kernel.org > Signed-off-by: Michał Mirosław > Reviewed-by: Greg Kroah-Hartman

Re: [PATCH v3 3/5] usb: gadget: u_serial: make OBEX port not a console

2019-02-27 Thread Greg Kroah-Hartman
On Wed, Feb 27, 2019 at 11:46:58AM +0100, Michał Mirosław wrote: > Prevent OBEX serial port from ever becoming a console. Console messages > will definitely break the protocol, and since you have to instantiate > the port making it explicitly for OBEX, there is no point in allowing > console to bre

Re: [PATCH v3 2/5] usb: gadget: u_serial: reimplement console support

2019-02-27 Thread Greg Kroah-Hartman
On Wed, Feb 27, 2019 at 11:46:57AM +0100, Michał Mirosław wrote: > Rewrite console support to fix a few shortcomings of the old code > preventing its use with multiple ports. This removes some duplicated > code and replaces a custom kthread with simpler workqueue item. > > Only port ttyGS0 gets to

Re: [PATCH v3 5/5] usb: gadget: u_serial: diagnose missed console messages

2019-02-27 Thread Greg Kroah-Hartman
On Wed, Feb 27, 2019 at 11:46:59AM +0100, Michał Mirosław wrote: > Insert markers in console stream marking places where data > is missing. This makes the hole in the data stand out clearly > instead of glueing together unrelated messages. > > Example output as seen from USB host side: > > [0

Re: [PATCH v3 4/5] usb: gadget: u_serial: allow more console gadget ports

2019-02-27 Thread Greg Kroah-Hartman
On Wed, Feb 27, 2019 at 11:46:58AM +0100, Michał Mirosław wrote: > Allow configuring more than one console using USB serial or ACM gadget. > > By default, only first (ttyGS0) is a console, but this may be changed > using function's new "console" attribute. > > Signed-off-by: Michał Mirosław Rev

Re: [PATCH] USB: serial: option: set driver_info for SIM5218 and compatibles

2019-02-27 Thread Johan Hovold
Adding Bjørn. On Wed, Feb 27, 2019 at 11:57:16AM +, Måns Rullgård wrote: > Johan Hovold writes: > > > On Tue, Feb 26, 2019 at 05:07:10PM +, Mans Rullgard wrote: > >> The SIMCom SIM5218 and compatible devices have 5 USB interfaces, only 4 > >> of which are serial ports. The fifth is a ne

Re: usb: gadget: net2280: Fix function net2280_dequeue()

2019-02-27 Thread guido
Zitat von Alan Stern : On Tue, 19 Feb 2019 gu...@kiener-muenchen.de wrote: Hi Alan, My last proposal "udc: net2280: Fix overrun of OUT messages" is still under investigation. During the random stress tests I found a new rare problem: When a request must be dequeued with net2280_dequeue()

Re: [PATCH] USB: serial: option: set driver_info for SIM5218 and compatibles

2019-02-27 Thread Måns Rullgård
Johan Hovold writes: > Adding Bjørn. > > On Wed, Feb 27, 2019 at 11:57:16AM +, Måns Rullgård wrote: >> Johan Hovold writes: >> >> > On Tue, Feb 26, 2019 at 05:07:10PM +, Mans Rullgard wrote: >> >> The SIMCom SIM5218 and compatible devices have 5 USB interfaces, only 4 >> >> of which are

Re: [PATCH] usb: core: Fix typo in description of "authorized_default"

2019-02-27 Thread Greg Kroah-Hartman
On Wed, Feb 27, 2019 at 12:33:32PM +0100, Jakub Wilk wrote: > Add missing right parenthesis. > > Signed-off-by: Jakub Wilk > --- > drivers/usb/core/hcd.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c > index 015b126ce455

Re: [PATCH] usb: core: Fix typo in description of "authorized_default"

2019-02-27 Thread Greg Kroah-Hartman
On Wed, Feb 27, 2019 at 12:33:32PM +0100, Jakub Wilk wrote: > Add missing right parenthesis. > > Signed-off-by: Jakub Wilk > --- > drivers/usb/core/hcd.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c > index 015b126ce455

Re: [PATCH 0/3] Propagate DP-over-Type-C hotplug events from Type-C subsys to drm-drivers

2019-02-27 Thread Hans de Goede
Hi, On 27-02-19 12:16, Jani Nikula wrote: On Wed, 27 Feb 2019, Heikki Krogerus wrote: One thing that this series does not consider is the DP lane count problem. The GPU drivers (i915 in this case) does not know is four, two or one DP lanes in use. Also, orientation. The orientation should

Re: [PATCH 3/3] usb: typec: altmodes/displayport: Notify drm subsys of hotplug events

2019-02-27 Thread Hans de Goede
Hi, On 27-02-19 10:44, Heikki Krogerus wrote: On Mon, Feb 25, 2019 at 02:20:37PM +0100, Hans de Goede wrote: Use the new drm_kms_call_oob_hotplug_notifier_chain() function to load drm/kms drivers know about DisplayPort over Type-C hotplug events. Signed-off-by: Hans de Goede I'm OK with thi

[PATCH] usb: core: Fix typo in description of "authorized_default"

2019-02-27 Thread Jakub Wilk
Add missing right parenthesis. Signed-off-by: Jakub Wilk --- drivers/usb/core/hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 015b126ce455..c29ca6e8577c 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.

Re: [PATCH 1/2] dt-bindings: usb-xhci: Add usb-phy-port-reset property

2019-02-27 Thread Srinath Mannam
Hi Rob, Thanks for the information. Please find my comments below. Regards, Srinath. On Tue, Feb 26, 2019 at 11:33 PM Rob Herring wrote: > > On Mon, Feb 25, 2019 at 10:57 PM Srinath Mannam > wrote: > > > > Hi Rob, > > Thanks for the review, Please see my comments below in line. > > > > Regards, >

[PATCH v2] usb: core: Fix typo in description of "authorized_default"

2019-02-27 Thread Jakub Wilk
Add missing right parenthesis. Signed-off-by: Jakub Wilk --- drivers/usb/core/hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 3b6e3e25f59e..3189181bb628 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.

Re: Bus noise periodically causes ci_hdrc IRQ lockup

2019-02-27 Thread Chandler Griscom
On 2/27/19 2:22 AM, Peter Chen wrote: Chandler From the above, we know the controller is at RX active status. But I am sorry I got the imprecise instruction from IC guys. The reason we do that is to know the RX status change during one packet, for your example, there are ISOC packets, so, m

[PATCH] xhci: use iopoll for xhci_handshake

2019-02-27 Thread Daniel Kurtz
In cases such as xhci_abort_cmd_ring(), xhci_handshake() is called with a spin lock held (and local interrupts disabled) with a huge 5 second timeout. This can translates to 5 million calls to udelay(1). By its very nature, udelay() is not meant to be precise, it only guarantees to delay a minimu

RE: Bus noise periodically causes ci_hdrc IRQ lockup

2019-02-27 Thread Peter Chen
> > Let me summary your observation: > > - bind/unbind ci_hdrc device can recover connection > > - Reset HUB can't recover, and will go the previous error state after > > reset > > > > From the register, we do see something abnormal, and the RX is > > waiting the SYNC Field. We need to see the d

Re: [PATCH] xhci: use iopoll for xhci_handshake

2019-02-27 Thread Greg Kroah-Hartman
On Wed, Feb 27, 2019 at 03:19:17PM -0700, Daniel Kurtz wrote: > In cases such as xhci_abort_cmd_ring(), xhci_handshake() is called with > a spin lock held (and local interrupts disabled) with a huge 5 second > timeout. This can translates to 5 million calls to udelay(1). By its > very nature, ude