Re: [PATCH 2/3] usb: dwc3: gadget: Fix early exit in set/clear ep halt

2017-05-11 Thread Thinh Nguyen
Hi Felipe, On 4/11/2017 11:03 PM, Felipe Balbi wrote: > > Hi, > > Thinh Nguyen writes: > Felipe Balbi writes: >> Thinh Nguyen writes: >>> This patch fixes a commit that causes a hang from device waiting for

Re: [PATCH 1/3] usb: dwc3: gadget: Prevent losing events in event cache

2017-05-11 Thread Thinh Nguyen
Hi, On 5/11/2017 1:22 AM, Felipe Balbi wrote: > > Hi, > > John Youn writes: >> The device hangs at the end of the log. I repeated the test with USB 3.0 IP version 2.90a and USB 3.1 IP version 1.60, and I found the same result where the TH is

[PATCH v2 2/2] usb: gadget: f_mass_storage: Serialize wake and sleep execution

2017-05-11 Thread Thinh Nguyen
f_mass_storage has a memorry barrier issue with the sleep and wake functions that can cause a deadlock. This results in intermittent hangs during MSC file transfer. The host will reset the device after receiving no response to resume the transfer. This issue is seen when dwc3 is processing 2

[PATCH v2 1/2] usb: dwc3: gadget: Prevent losing events in event cache

2017-05-11 Thread Thinh Nguyen
The dwc3 driver can overwite its previous events if its top-half IRQ handler (TH) gets invoked again before processing the events in the cache. We see this as a hang in the file transfer and the host will attempt to reset the device. TH gets the event count and deasserts the interrupt line by

blk_update_request: critical target error, dev sr0, sector 0

2017-05-11 Thread Cristian
Hi, dmesg: [5.212311] sr 6:0:0:0: [sr0] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE [5.212315] sr 6:0:0:0: [sr0] tag#0 Sense Key : Illegal Request [current] [5.212318] sr 6:0:0:0: [sr0] tag#0 Add. Sense: Logical block address out of range [5.212322] sr 6:0:0:0:

Re: usb 3-4: unable to get BOS descriptor

2017-05-11 Thread Cristian
Hi, 2017-05-11 20:45 GMT+00:00 Alan Stern : > On Thu, 11 May 2017, Cristian wrote: > >> Hi, >> >> Attach dmesg >> [ 968.998463] usb 3-4: unable to get BOS descriptor >> [ 968.999477] usb 3-4: config 1 has an invalid descriptor of length >> 1, skipping remainder of the

Re: [PATCH] usb-musb: keep VBUS on when device is disconnected

2017-05-11 Thread Tony Lindgren
* Bin Liu [170511 13:47]: > On Thu, May 11, 2017 at 01:23:06PM -0700, Tony Lindgren wrote: > > > > Maybe try something like below, compile tested only. I don't > > think I have any USB modem here to test with. > > The patch below doesn't help. In device detach by the time >

Re: How to improve resume time of USB device on Lenovo X60t?

2017-05-11 Thread Alan Stern
On Tue, 9 May 2017, Paul Menzel wrote: > Dear Alan, > > > Am Montag, den 08.05.2017, 16:58 -0400 schrieb Alan Stern: > > On Mon, 8 May 2017, Paul Menzel wrote: > > > > > `CONFIG_PRINTK_TIME` is already selected in the Debian configuration. > > > > That's odd; the kernel timestamps weren't

Re: usb 3-4: unable to get BOS descriptor

2017-05-11 Thread Alan Stern
On Thu, 11 May 2017, Cristian wrote: > Hi, > > Attach dmesg > [ 968.998463] usb 3-4: unable to get BOS descriptor > [ 968.999477] usb 3-4: config 1 has an invalid descriptor of length > 1, skipping remainder of the config > [ 968.999483] usb 3-4: config 1 has 0 interfaces, different from the

Re: [PATCH] usb-musb: keep VBUS on when device is disconnected

2017-05-11 Thread Bin Liu
On Thu, May 11, 2017 at 01:23:06PM -0700, Tony Lindgren wrote: > * Bin Liu [170511 13:05]: > > On Thu, May 11, 2017 at 12:38:11PM -0700, Tony Lindgren wrote: > > > > > > I wonder if just keeping VBUS on longer in OTG_STATE_A_WAIT_BCON > > > solves this issue? > > > > We don't cut

Re: [PATCH] usb-musb: keep VBUS on when device is disconnected

2017-05-11 Thread Tony Lindgren
* Tony Lindgren [170511 13:26]: > diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c > --- a/drivers/usb/musb/musb_dsps.c > +++ b/drivers/usb/musb/musb_dsps.c > @@ -270,6 +270,10 @@ static int dsps_check_status(struct musb *musb, void > *unused) >

Re: [PATCH] usb-musb: keep VBUS on when device is disconnected

2017-05-11 Thread Tony Lindgren
* Bin Liu [170511 13:05]: > On Thu, May 11, 2017 at 12:38:11PM -0700, Tony Lindgren wrote: > > > > I wonder if just keeping VBUS on longer in OTG_STATE_A_WAIT_BCON > > solves this issue? > > We don't cut VBUS intentionally for host mode (when devctl=0x19). The > VBUS got cut in

Re: I'd like to donate a MacBook Pro

2017-05-11 Thread Alex Henrie
2017-05-11 5:16 GMT-06:00 Mathias Nyman : > Looks like there are a few people suffering from macbook xhci related issues > > From the bugs linked it looks like there are both some UEFI issues and a > non-responsive > usb device at boot. at least one USB device does

Re: [PATCH] usb-musb: keep VBUS on when device is disconnected

2017-05-11 Thread Bin Liu
On Thu, May 11, 2017 at 12:38:11PM -0700, Tony Lindgren wrote: > * Bin Liu [170511 12:23]: > > On Thu, May 11, 2017 at 02:10:05PM -0500, Bin Liu wrote: > > [...] > > > > > > The otg state machine implementation in the musb drivers are kind > > > > > > of strange. > > > > > >

Re: [PATCH 2/3] USB: serial: mct_u232: fix big-endian baud-rate handling

2017-05-11 Thread Pete Zaitcev
On Thu, 11 May 2017 11:41:20 +0200 Johan Hovold wrote: > Drop erroneous cpu_to_le32 when setting the baud rate, something which > corrupted the divisor on big-endian hosts. > +++ b/drivers/usb/serial/mct_u232.c > @@ -189,7 +189,7 @@ static int mct_u232_set_baud_rate(struct

Re: [PATCH] usb-musb: keep VBUS on when device is disconnected

2017-05-11 Thread Tony Lindgren
* Bin Liu [170511 12:23]: > On Thu, May 11, 2017 at 02:10:05PM -0500, Bin Liu wrote: > [...] > > > > > The otg state machine implementation in the musb drivers are kind of > > > > > strange. > > > > > OTG_STATE_A_WAIT_BCON suppose to be a steady state when no usb device > > > > >

Re: [PATCH] usb-musb: keep VBUS on when device is disconnected

2017-05-11 Thread Bin Liu
On Thu, May 11, 2017 at 02:10:05PM -0500, Bin Liu wrote: [...] > > > > The otg state machine implementation in the musb drivers are kind of > > > > strange. > > > > OTG_STATE_A_WAIT_BCON suppose to be a steady state when no usb device is > > > > attached, but the musb drivers use it as a

Re: [PATCH] usb-musb: keep VBUS on when device is disconnected

2017-05-11 Thread Bin Liu
On Thu, May 11, 2017 at 02:01:00PM -0500, Bin Liu wrote: > On Thu, May 11, 2017 at 11:55:28AM -0700, Tony Lindgren wrote: > > * Bin Liu [170511 11:53]: > > > On Mon, Mar 27, 2017 at 10:55:37AM -0700, Tony Lindgren wrote: > > > > * Bin Liu [170327 10:17]: > > > > > On

Re: [PATCH] usb-musb: keep VBUS on when device is disconnected

2017-05-11 Thread Bin Liu
On Thu, May 11, 2017 at 11:55:28AM -0700, Tony Lindgren wrote: > * Bin Liu [170511 11:53]: > > On Mon, Mar 27, 2017 at 10:55:37AM -0700, Tony Lindgren wrote: > > > * Bin Liu [170327 10:17]: > > > > On Mon, Mar 27, 2017 at 09:59:47AM -0700, Tony Lindgren wrote: > > > >

Re: [PATCH] usb-musb: keep VBUS on when device is disconnected

2017-05-11 Thread Tony Lindgren
* Bin Liu [170511 11:53]: > On Mon, Mar 27, 2017 at 10:55:37AM -0700, Tony Lindgren wrote: > > * Bin Liu [170327 10:17]: > > > On Mon, Mar 27, 2017 at 09:59:47AM -0700, Tony Lindgren wrote: > > > > * Moreno Bartalucci [170327 09:23]: >

Re: usb 3-4: unable to get BOS descriptor

2017-05-11 Thread Greg KH
A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? A: No. Q: Should I include quotations after my reply? http://daringfireball.net/2007/07/on_top On Thu, May 11, 2017 at

Re: [PATCH] usb-musb: keep VBUS on when device is disconnected

2017-05-11 Thread Bin Liu
On Mon, Mar 27, 2017 at 10:55:37AM -0700, Tony Lindgren wrote: > * Bin Liu [170327 10:17]: > > On Mon, Mar 27, 2017 at 09:59:47AM -0700, Tony Lindgren wrote: > > > * Moreno Bartalucci [170327 09:23]: > > > > If I understood your patch, however, if

Re: usb 3-4: unable to get BOS descriptor

2017-05-11 Thread Cristian
Hi, Attach command. Regards, -- Cristian 2017-05-11 15:22 GMT-03:00 Greg KH : > On Thu, May 11, 2017 at 02:58:24PM -0300, Cristian wrote: >> Hi, >> >> Attach dmesg >> [ 968.998463] usb 3-4: unable to get BOS descriptor > > Device still works, right? > >> [

Re: usb 3-4: unable to get BOS descriptor

2017-05-11 Thread Greg KH
On Thu, May 11, 2017 at 02:58:24PM -0300, Cristian wrote: > Hi, > > Attach dmesg > [ 968.998463] usb 3-4: unable to get BOS descriptor Device still works, right? > [ 968.999477] usb 3-4: config 1 has an invalid descriptor of length > 1, skipping remainder of the config Ick, messy device. >

[PATCH] USB: serial: mos7840: add support for setting custom baud rate

2017-05-11 Thread Peter Mamonov
The patch implements TIOCSSERIAL ioctl call. The following fields of the `struct serial_struct` are processed: - flags: ASYNC_SPD_MASK bits are processed. - baud_base: allow a user to specify arbitrary value less or equal the maximum port speed. Use it later in conjunction with custom_divisor

usb 3-4: unable to get BOS descriptor

2017-05-11 Thread Cristian
Hi, Attach dmesg [ 968.998463] usb 3-4: unable to get BOS descriptor [ 968.999477] usb 3-4: config 1 has an invalid descriptor of length 1, skipping remainder of the config [ 968.999483] usb 3-4: config 1 has 0 interfaces, different from the descriptor's value: 1 [ 969.001897] usb 3-4:

Re: [PATCH v2 2/6] USB: usbip: fix nonconforming hub descriptor

2017-05-11 Thread Johan Hovold
On Thu, May 11, 2017 at 09:40:28AM -0600, Shuah Khan wrote: > On 05/10/2017 10:18 AM, Johan Hovold wrote: > > Fix up the root-hub descriptor to accommodate the variable-length > > DeviceRemovable and PortPwrCtrlMask fields, while marking all ports as > > removable (and leaving the reserved bit

Re: [PATCH v2 05/10] usb: musb: tusb6010_omap: Do not reset the other direction's packet size

2017-05-11 Thread Bin Liu
On Thu, May 11, 2017 at 09:19:17AM +0300, Peter Ujfalusi wrote: > > > On 2017-05-11 02:16, Joe Perches wrote: > >On Wed, 2017-05-10 at 12:07 -0500, Bin Liu wrote: > >>On Wed, May 10, 2017 at 11:42:27AM +0300, Peter Ujfalusi wrote: > >>>We have one register for each EP to set the maximum packet

RE: [PATCH] xhci: remove GFP_DMA flag from allocation

2017-05-11 Thread David Laight
From: Mathias Nyman > Sent: 11 May 2017 15:45 > On 09.05.2017 18:38, David Laight wrote: > > From: Mathias Nyman > >> Sent: 09 May 2017 12:24 > >> On 08.05.2017 09:26, Mathias Nyman wrote: > >>> On 05.05.2017 15:05, Matthias Lange wrote: > There is no reason to restrict allocations to the

Re: [PATCH v2 2/6] USB: usbip: fix nonconforming hub descriptor

2017-05-11 Thread Shuah Khan
On 05/10/2017 10:18 AM, Johan Hovold wrote: > Fix up the root-hub descriptor to accommodate the variable-length > DeviceRemovable and PortPwrCtrlMask fields, while marking all ports as > removable (and leaving the reserved bit zero unset). > > Also add a build-time constraint on VHCI_HC_PORTS

Re: [PATCH] xhci: remove GFP_DMA flag from allocation

2017-05-11 Thread Mathias Nyman
On 09.05.2017 18:38, David Laight wrote: From: Mathias Nyman Sent: 09 May 2017 12:24 On 08.05.2017 09:26, Mathias Nyman wrote: On 05.05.2017 15:05, Matthias Lange wrote: There is no reason to restrict allocations to the first 16MB ISA DMA addresses. ... What about the 4G boundary? Can you

Re: [PATCH v2] usb: musb: musb_cppi41: Update an error message

2017-05-11 Thread Bin Liu
On Thu, May 11, 2017 at 09:51:11AM +0200, Johan Hovold wrote: > On Wed, May 10, 2017 at 02:45:13PM -0500, Bin Liu wrote: > > On Fri, May 05, 2017 at 07:52:33AM -0500, Alexandre Bailon wrote: > > > If dma_request_slave_channel() failed to return a channel, > > > then the driver will print an error

Hallo

2017-05-11 Thread Dienstleistungsdarlehen
Brauchen Sie ein Darlehen, um eine Rechnung zu bezahlen oder ein Geschäft zu gründen? Schreiben Sie uns eine E-Mail -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: I'd like to donate a MacBook Pro

2017-05-11 Thread Mathias Nyman
On 04.05.2017 05:34, Alex Henrie wrote: 2017-05-03 8:58 GMT-06:00 Joerg Roedel : On Wed, May 03, 2017 at 08:35:47AM -0600, Alex Henrie wrote: 2017-05-03 5:58 GMT-06:00 Greg KH : On Tue, May 02, 2017 at 10:55:09PM -0600, Alex Henrie wrote: Today I

Re: Fwd: Issues with exposing USB serial dongle to guest VM

2017-05-11 Thread Johan Hovold
On Tue, May 09, 2017 at 10:52:38AM -0600, Philip Prindeville wrote: > Greg pointed out to me that he’s turned over ownership of > drivers/usb/serial/pl2303.c … so I thought I’d contact the list > instead. > > > Begin forwarded message: > > > > From: Philip Prindeville

Re: [PATCH 0/3] USB: serial: endianness and DBZ fixes

2017-05-11 Thread Greg KH
On Thu, May 11, 2017 at 11:41:18AM +0200, Johan Hovold wrote: > A run of sparse on USB-serial revealed a couple of endianness issues of > which one would break baud-rate handling on big-endian hosts. > > Also included is a division-by-zero bug in io_ti that was found through > inspection. All

[PATCH 2/3] USB: serial: mct_u232: fix big-endian baud-rate handling

2017-05-11 Thread Johan Hovold
Drop erroneous cpu_to_le32 when setting the baud rate, something which corrupted the divisor on big-endian hosts. Found using sparse: warning: incorrect type in argument 1 (different base types) expected unsigned int [unsigned] [usertype] val got restricted __le32

[PATCH 3/3] USB: serial: io_ti: fix div-by-zero in set_termios

2017-05-11 Thread Johan Hovold
Fix a division-by-zero in set_termios when debugging is enabled and a high-enough speed has been requested so that the divisor value becomes zero. Instead of just fixing the offending debug statement, cap the baud rate at the base as a zero divisor value also appears to crash the firmware.

[PATCH 1/3] USB: serial: ir-usb: fix big-endian baud-rate debug printk

2017-05-11 Thread Johan Hovold
Add missing endianness conversion when printing the supported baud rates. Found using sparse: warning: restricted __le16 degrades to integer Fixes: e0d795e4f36c ("usb: irda: cleanup on ir-usb module") Signed-off-by: Johan Hovold --- drivers/usb/serial/ir-usb.c | 21

[PATCH 0/3] USB: serial: endianness and DBZ fixes

2017-05-11 Thread Johan Hovold
A run of sparse on USB-serial revealed a couple of endianness issues of which one would break baud-rate handling on big-endian hosts. Also included is a division-by-zero bug in io_ti that was found through inspection. Johan Johan Hovold (3): USB: serial: ir-usb: fix big-endian baud-rate

[PATCH 1/2] USB: chaoskey: fix Alea quirk on big-endian hosts

2017-05-11 Thread Johan Hovold
Add missing endianness conversion when applying the Alea timeout quirk. Found using sparse: warning: restricted __le16 degrades to integer Fixes: e4a886e811cd ("hwrng: chaoskey - Fix URB warning due to timeout on Alea") Cc: stable # 4.8 Cc: Bob Ham

[PATCH 0/2] USB: endianness fixes

2017-05-11 Thread Johan Hovold
Running sparse on some drivers I had recently touched revealed a couple of minor but real endianness bugs. Johan Johan Hovold (2): USB: chaoskey: fix Alea quirk on big-endian hosts USB: iowarrior: fix info ioctl on big-endian hosts drivers/usb/misc/chaoskey.c | 2 +-

[PATCH 2/2] USB: iowarrior: fix info ioctl on big-endian hosts

2017-05-11 Thread Johan Hovold
Drop erroneous le16_to_cpu when returning the USB device speed which is already in host byte order. Found using sparse: warning: cast to restricted __le16 Fixes: 946b960d13c1 ("USB: add driver for iowarrior devices.") Cc: stable # 2.6.21 Signed-off-by: Johan

Re: XHCI is slow during boot (bios/efi) and leaves many dmesg messages

2017-05-11 Thread Mael Lavault
On Wed, May 10, 2017 at 3:04 PM, Mathias Nyman wrote: > On 09.05.2017 16:50, Maël Lavault wrote: >> >> On Tue, 2017-05-09 at 11:34 +0300, Felipe Balbi wrote: >>> >>> Hi, >>> >>> Maël Lavault writes: Le 28 avr. 2017 15:57,

Re: [PATCH 1/3] usb: dwc3: gadget: Prevent losing events in event cache

2017-05-11 Thread Felipe Balbi
Hi, John Youn writes: > The device hangs at the end of the log. >>> >>> I repeated the test with USB 3.0 IP version 2.90a and USB 3.1 IP version >>> 1.60, and I found the same result where the TH is occasionally called >>> twice back-to-back. >>> Right,

Re: [PATCH v2] usb: musb: musb_cppi41: Update an error message

2017-05-11 Thread Johan Hovold
On Wed, May 10, 2017 at 02:45:13PM -0500, Bin Liu wrote: > On Fri, May 05, 2017 at 07:52:33AM -0500, Alexandre Bailon wrote: > > If dma_request_slave_channel() failed to return a channel, > > then the driver will print an error and request to defer probe, > > regardless of the cause of the

Re: [PATCH v5 2/3] phy: Move ULPI phy header out of drivers to include path

2017-05-11 Thread Heikki Krogerus
On Thu, May 11, 2017 at 12:17:41PM +0530, Vivek Gautam wrote: > Although ULPI phy is currently being used by tusb1210, > there can be other consumers too in future. So move this > to the includes path for phy. > > Signed-off-by: Vivek Gautam > Cc: Stephen Boyd

Re: USB CDP (charging downstream port) charging over Chipidea HDRC in host mode

2017-05-11 Thread Jayan John
On Tue, May 9, 2017 at 3:39 PM, Jayan John wrote: > On Tue, May 9, 2017 at 1:10 PM, Peter Chen wrote: >> On Tue, May 09, 2017 at 12:51:53PM +0530, Jayan John wrote: >>> On Tue, May 9, 2017 at 6:24 AM, Peter Chen wrote: >>> >

[PATCH v5 1/3] phy: qcom-usb: Remove unused ulpi phy header

2017-05-11 Thread Vivek Gautam
Ulpi phy header is not used for anything. Remove the same from qcom-hs and qcom-hsic phy drivers. Signed-off-by: Vivek Gautam Suggested-by: Stephen Boyd Cc: Kishon Vijay Abraham I Cc: linux-arm-ker...@lists.infradead.org Cc:

[PATCH v5 2/3] phy: Move ULPI phy header out of drivers to include path

2017-05-11 Thread Vivek Gautam
Although ULPI phy is currently being used by tusb1210, there can be other consumers too in future. So move this to the includes path for phy. Signed-off-by: Vivek Gautam Cc: Stephen Boyd Cc: Heikki Krogerus

[PATCH v5 3/3] phy: Group vendor specific phy drivers

2017-05-11 Thread Vivek Gautam
Adding vendor specific directories in phy to group phy drivers under their respective vendor umbrella. Also updated the MAINTAINERS file to reflect the correct directory structure for phy drivers. Signed-off-by: Vivek Gautam Acked-by: Heiko Stuebner

Re: [PATCH v2 05/10] usb: musb: tusb6010_omap: Do not reset the other direction's packet size

2017-05-11 Thread Peter Ujfalusi
On 2017-05-11 02:16, Joe Perches wrote: On Wed, 2017-05-10 at 12:07 -0500, Bin Liu wrote: On Wed, May 10, 2017 at 11:42:27AM +0300, Peter Ujfalusi wrote: We have one register for each EP to set the maximum packet size for both TX and RX. If for example an RX programming would happen before