[PATCH] usb: core: message: remove memset in usb_get_descriptor()

2019-06-28 Thread yuan linyu
in the loop, if get a descriptor which is not desired type, the buf will be not clean. caller check return length to decide success or not. Signed-off-by: yuan linyu --- drivers/usb/core/message.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/core/message.c b/drivers/usb/core/

[PATCH] usb: typec: ucsi: add support for separate DP altmode devices

2019-06-28 Thread Ajay Gupta
From: Ajay Gupta CCGx controller used on NVIDIA GPU card has two separate display altmode for two DP pin assignments. UCSI specification doesn't prohibits using separate display altmode. Current UCSI Type-C framework expects only one display altmode for all DP pin assignment. This patch squashes

RE: [PATCH] USB: serial: ch341: fix wrong baud rate setting calculation

2019-06-28 Thread Jonathan Olds
Hi Johan, Sorry for the slow reply. Thanks for the feedback. I've amended the patch and is below. I think I've done all of your suggestions and looks more Linux Kernelish style. > drop the denom outmost parenthesis (also in some expressions below) I removed the outmost parenthesis from the " de

Re: [PATCH 4.19.y v2 0/9] Fix scheduling while atomic in dwc3_gadget_ep_dequeue

2019-06-28 Thread John Stultz
On Fri, Jun 28, 2019 at 3:58 PM Sasha Levin wrote: > > On Fri, Jun 28, 2019 at 06:24:04PM +, John Stultz wrote: > >With recent changes in AOSP, adb is using asynchronous io, which > >causes the following crash usually on a reboot: > > > >[ 184.278302] BUG: scheduling while atomic: ksoftirqd/0

Re: [PATCH 4.19.y v2 0/9] Fix scheduling while atomic in dwc3_gadget_ep_dequeue

2019-06-28 Thread Sasha Levin
On Fri, Jun 28, 2019 at 06:24:04PM +, John Stultz wrote: With recent changes in AOSP, adb is using asynchronous io, which causes the following crash usually on a reboot: [ 184.278302] BUG: scheduling while atomic: ksoftirqd/0/9/0x0104 [ 184.284617] Modules linked in: wl18xx wlcore snd_

[PATCH 4.19.y v2 6/9] usb: dwc3: gadget: introduce cancelled_list

2019-06-28 Thread John Stultz
From: Felipe Balbi commit d5443bbf5fc8f8389cce146b1fc2987cdd229d12 upstream This list will host cancelled requests who still have TRBs being processed. Cc: Fei Yang Cc: Sam Protsenko Cc: Felipe Balbi Cc: linux-usb@vger.kernel.org Cc: sta...@vger.kernel.org # 4.19.y Signed-off-by: Felipe Balb

[PATCH 4.19.y v2 8/9] usb: dwc3: gadget: remove wait_end_transfer

2019-06-28 Thread John Stultz
From: Felipe Balbi commit fec9095bdef4e7c988adb603d0d4f92ee735d4a1 upstream Now that we have a list of cancelled requests, we can skip over TRBs when END_TRANSFER command completes. Cc: Fei Yang Cc: Sam Protsenko Cc: Felipe Balbi Cc: linux-usb@vger.kernel.org Cc: sta...@vger.kernel.org # 4.1

[PATCH 4.19.y v2 7/9] usb: dwc3: gadget: move requests to cancelled_list

2019-06-28 Thread John Stultz
From: Felipe Balbi commit d4f1afe5e896c18ae01099a85dab5e1a198bd2a8 upstream Whenever we have a request in flight, we can move it to the cancelled list and later simply iterate over that list and skip over any TRBs we find. Cc: Fei Yang Cc: Sam Protsenko Cc: Felipe Balbi Cc: linux-usb@vger.ke

[PATCH 4.19.y v2 1/9] Revert "usb: dwc3: gadget: Clear req->needs_extra_trb flag on cleanup"

2019-06-28 Thread John Stultz
This reverts commit 25ad17d692ad54c3c33b2a31e5ce2a82e38de14e, as we will be cherry-picking a number of changes from upstream that allows us to later cherry-pick the same fix from upstream rather than using this modified backported version. Cc: Fei Yang Cc: Sam Protsenko Cc: Felipe Balbi Cc: lin

[PATCH 4.19.y v2 9/9] usb: dwc3: gadget: Clear req->needs_extra_trb flag on cleanup

2019-06-28 Thread John Stultz
From: Jack Pham commit bd6742249b9ca918565e4e3abaa06665e587f4b5 upstream OUT endpoint requests may somtimes have this flag set when preparing to be submitted to HW indicating that there is an additional TRB chained to the request for alignment purposes. If that request is removed before the cont

[PATCH 4.19.y v2 0/9] Fix scheduling while atomic in dwc3_gadget_ep_dequeue

2019-06-28 Thread John Stultz
With recent changes in AOSP, adb is using asynchronous io, which causes the following crash usually on a reboot: [ 184.278302] BUG: scheduling while atomic: ksoftirqd/0/9/0x0104 [ 184.284617] Modules linked in: wl18xx wlcore snd_soc_hdmi_codec wlcore_sdio tcpci_rt1711h tcpci tcpm typec adv7

[PATCH 4.19.y v2 5/9] usb: dwc3: gadget: extract dwc3_gadget_ep_skip_trbs()

2019-06-28 Thread John Stultz
From: Felipe Balbi commit 7746a8dfb3f9c91b3a0b63a1d5c2664410e6498d upstream Extract the logic for skipping over TRBs to its own function. This makes the code slightly more readable and makes it easier to move this call to its final resting place as a following patch. Cc: Fei Yang Cc: Sam Prots

[PATCH 4.19.y v2 3/9] usb: dwc3: gadget: track number of TRBs per request

2019-06-28 Thread John Stultz
From: Felipe Balbi commit 09fe1f8d7e2f461275b1cdd832f2cfa5e9be346d upstream This will help us remove the wait_event() from our ->dequeue(). Cc: Fei Yang Cc: Sam Protsenko Cc: Felipe Balbi Cc: linux-usb@vger.kernel.org Cc: sta...@vger.kernel.org # 4.19.y Signed-off-by: Felipe Balbi (cherry p

[PATCH 4.19.y v2 4/9] usb: dwc3: gadget: use num_trbs when skipping TRBs on ->dequeue()

2019-06-28 Thread John Stultz
From: Felipe Balbi commit c3acd59014148470dc58519870fbc779785b4bf7 upstream Now that we track how many TRBs a request uses, it's easier to skip over them in case of a call to usb_ep_dequeue(). Let's do so and simplify the code a bit. Cc: Fei Yang Cc: Sam Protsenko Cc: Felipe Balbi Cc: linux-

[PATCH 4.19.y v2 2/9] usb: dwc3: gadget: combine unaligned and zero flags

2019-06-28 Thread John Stultz
From: Felipe Balbi commit 1a22ec643580626f439c8583edafdcc73798f2fb upstream Both flags are used for the same purpose in dwc3: appending an extra TRB at the end to deal with controller requirements. By combining both flags into one, we make it clear that the situation is the same and that they sh

Re: [PATCH 4.19.y 0/9] Fix scheduling while atomic in dwc3_gadget_ep_dequeue

2019-06-28 Thread John Stultz
On Fri, Jun 28, 2019 at 3:10 AM Gopal, Saranya wrote: > > > With recent changes in AOSP, adb is using asynchronous io, which > > causes the following crash usually on a reboot: > > > > [ 184.278302] BUG: scheduling while atomic: ksoftirqd/0/9/0x0104 > > [ 184.284617] Modules linked in: wl18x

Re: Pass transfer_buffer to gadget drivers

2019-06-28 Thread Alan Stern
On Fri, 28 Jun 2019, Andrey Konovalov wrote: > On Fri, Jun 28, 2019 at 6:44 PM Andrey Konovalov > wrote: > > > > On Tue, Jun 18, 2019 at 3:53 PM Alan Stern > > wrote: ... > > > > > Another question: do I understand correctly, that we only proceed with > > > > > submitting an URB to get the d

Re: [PATCH 4.19.y 8/9] Revert "usb: dwc3: gadget: Clear req->needs_extra_trb flag on cleanup"

2019-06-28 Thread John Stultz
On Thu, Jun 27, 2019 at 10:54 PM Jack Pham wrote: > On Thu, Jun 27, 2019 at 08:52:39PM +, John Stultz wrote: > > diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c > > index 879f652c5580..843586f20572 100644 > > --- a/drivers/usb/dwc3/gadget.c > > +++ b/drivers/usb/dwc3/gadget.

Re: Pass transfer_buffer to gadget drivers

2019-06-28 Thread Andrey Konovalov
On Fri, Jun 28, 2019 at 6:44 PM Andrey Konovalov wrote: > > On Tue, Jun 18, 2019 at 3:53 PM Alan Stern wrote: > > > > On Tue, 18 Jun 2019, Andrey Konovalov wrote: > > > > > On Tue, Jun 18, 2019 at 3:31 PM Andrey Konovalov > > > wrote: > > > > > > > > On Fri, Jun 7, 2019 at 5:05 PM Andrey Konova

Re: Pass transfer_buffer to gadget drivers

2019-06-28 Thread Andrey Konovalov
On Tue, Jun 18, 2019 at 3:53 PM Alan Stern wrote: > > On Tue, 18 Jun 2019, Andrey Konovalov wrote: > > > On Tue, Jun 18, 2019 at 3:31 PM Andrey Konovalov > > wrote: > > > > > > On Fri, Jun 7, 2019 at 5:05 PM Andrey Konovalov > > > wrote: > > > > > > > > On Fri, Jun 7, 2019 at 5:02 PM Alan Ster

Re: [PATCH] [PATCH v5] USB: serial: pl2303: Add new PID to support PL2303HXN (TYPE_HXN)

2019-06-28 Thread Johan Hovold
On Thu, Jun 13, 2019 at 09:45:44PM +0800, Charles Yeh wrote: > Prolific has developed a new USB to UART chip: PL2303HXN > PL2303HXN : PL2303GC/PL2303GS/PL2303GT/PL2303GL/PL2303GE/PL2303GB > The Vendor request used by the PL2303HXN (TYPE_HXN) is different from > the existing PL2303 series (TYPE_HX &

RE: No carrier lost information with gadget RNDIS/ECM

2019-06-28 Thread Kai Ruhnau
Hi, I write: > Peter Chen writes: >>> Felipe Balbi writes: >>> > Kai Ruhnau writes: >>> >>> Which peripheral controller is this board using? Is it chipidea? dwc2? >>> >>> dwc3? High Speed or Super Speed? >>> >> >>> >> According to the device tree it's 'fsl,imx6sx-usb' driven by >>> >> chipidea/ci

Re: HDD's attached via USB3 ports not automatically seen by kernel

2019-06-28 Thread Greg KH
On Thu, Jun 27, 2019 at 09:15:46PM +0200, Bauke Jan Douma wrote: > Kernel: Linux 4.15.0-52-generic #56~16.04.1-Ubuntu SMP Thu Jun 6 12:03:31 UTC > 2019 x86_64 x86_64 x86_64 GNU/Linux That's a very old kernel release, have you tried getting support from Canonical for this? We have no idea what is

Re: [RFC] usb: typec: ucsi: add support for separate DP altmode devices

2019-06-28 Thread Ajay Gupta
Hi Heikki, > On Jun 28, 2019, at 3:47 AM, Heikki Krogerus > wrote: > >> On Thu, Jun 27, 2019 at 10:45:47PM -0700, Ajay Gupta wrote: >> CCGx controller used on NVIDIA GPU card has two separate display >> altmode for two DP pin assignments. UCSI specification doesn't >> prohibits using separate d

Re: [RFC] usb: typec: ucsi: add support for separate DP altmode devices

2019-06-28 Thread Heikki Krogerus
On Thu, Jun 27, 2019 at 10:45:47PM -0700, Ajay Gupta wrote: > CCGx controller used on NVIDIA GPU card has two separate display > altmode for two DP pin assignments. UCSI specification doesn't > prohibits using separate display altmode. > > Current UCSI Type-C framework expects only one display alt

RE: [PATCH 4.19.y 0/9] Fix scheduling while atomic in dwc3_gadget_ep_dequeue

2019-06-28 Thread Gopal, Saranya
> With recent changes in AOSP, adb is using asynchronous io, which > causes the following crash usually on a reboot: > > [ 184.278302] BUG: scheduling while atomic: ksoftirqd/0/9/0x0104 > [ 184.284617] Modules linked in: wl18xx wlcore snd_soc_hdmi_codec > wlcore_sdio tcpci_rt1711h tcpci tcpm

Re: [PATCH] [PATCH v5] USB: serial: pl2303: Add new PID to support PL2303HXN (TYPE_HXN)

2019-06-28 Thread Charles Yeh
Is there any need to modify it? If there is no need to modify, how long does it take to complete REVIEW? Charles Yeh Charles Yeh 於 2019年6月13日 週四 下午9:46寫道: > > Prolific has developed a new USB to UART chip: PL2303HXN > PL2303HXN : PL2303GC/PL2303GS/PL2303GT/PL2303GL/PL2303GE/PL2303GB > The Vendor

RE: No carrier lost information with gadget RNDIS/ECM

2019-06-28 Thread Kai Ruhnau
Hi Peter, Peter Chen writes: >> Felipe Balbi writes: >> > Kai Ruhnau writes: >> >>> Which peripheral controller is this board using? Is it chipidea? dwc2? >> >>> dwc3? High Speed or Super Speed? >> >> >> >> According to the device tree it's 'fsl,imx6sx-usb' driven by >> >> chipidea/ci_hdrc_imx.c