[PATCH v2 5/5] usb: dwc3: debugfs: Print/set link state for peripheral mode

2018-11-07 Thread Thinh Nguyen
Current implementation only prints/sets the link state for peripheral mode only. Check and prevent printing bogus link state if the current mode of operation is not peripheral. Signed-off-by: Thinh Nguyen --- Change in v2: - New patch, no previous change drivers/usb/dwc3/debugfs.c | 13

[PATCH 0/3] usb: dwc3: Misc USB2 LPM settings

2018-11-07 Thread Thinh Nguyen
This patch series adds miscellaneous USB2 LPM related settings Thinh Nguyen (3): usb: dwc3: Set GUSB2PHYCFG.ENBLSLPM usb: dwc3: Add a property to disable USB2 LPM usb: dwc3: Support option to disable USB2 LPM Documentation/devicetree/bindings/usb/dwc3.txt | 1 + drivers/usb/dwc3/core.c

[PATCH 3/3] usb: dwc3: Support option to disable USB2 LPM

2018-11-07 Thread Thinh Nguyen
Support the option to disable USB2 LPM. Set xhci "usb2-lpm-disable" property via "snps,usb2-lpm-disable" property. Signed-off-by: Thinh Nguyen --- drivers/usb/dwc3/core.c | 2 ++ drivers/usb/dwc3/core.h | 2 ++ drivers/usb/dwc3/host.c | 5 - 3 files changed, 8 insertions(+), 1 deletion(-)

[PATCH 2/3] usb: dwc3: Add a property to disable USB2 LPM

2018-11-07 Thread Thinh Nguyen
Add an option to disable USB2 LPM from host. There maybe cases where the user does not want to enable USB2 LPM (e.g. USB2 LPM is broken). Signed-off-by: Thinh Nguyen --- Documentation/devicetree/bindings/usb/dwc3.txt | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH 1/3] usb: dwc3: Set GUSB2PHYCFG.ENBLSLPM

2018-11-07 Thread Thinh Nguyen
GUSB2PHYCFG.ENBLSLPM enables the controller to assert low power signals to the PHY. Unless disabled via device property, explicitly set GUSB2PHYCFG.ENBLSLPM as it may not be set by default. Signed-off-by: Thinh Nguyen --- drivers/usb/dwc3/core.c | 2 ++ 1 file changed, 2 insertions(+) diff

[PATCH v2 0/5] usb: dwc3: debugfs: Add various updates

2018-11-07 Thread Thinh Nguyen
This patch series add various fixes to the debugfs printouts Thinh Nguyen (5): usb: dwc3: debugfs: Properly name Tx/RxFIFO usb: dwc3: debugfs: Print eps Tx/RxFIFO in bytes usb: dwc3: debugfs: Dump internal LSP and ep registers usb: dwc3: debugfs: Properly print/set link state for HS

Adding NovAtel USB vendor & device ID to Kernel

2018-11-07 Thread SNELL James
Hello, We produce extremely high-end GNSS (GPS, etc) receivers that are often used for a very wide range of applications. Our receivers can be connected to via USB, which will provide 3 USB-to-serial ports that can be used to issue commands and get receiver data. We typically get Linux users

RE: WARNING: CPU: 0 PID: 0 at ../drivers/usb/dwc2/gadget.c:300 dwc2_hsotg_init_fifo+0x34/0x1b4

2018-11-07 Thread Maynard CABIENTE
Hi Minas, On Wednesday, November 07, 2018 2:10 AM, Minas Harutyunyan wrote: > This warn message popup due to on disconnect not all EP's are disabled and > FIFO released in fifo_map. To solve this issue I submitted patches: > [PATCH v2] usb: dwc2: Disable all EP's on disconnect and fix to above

Re: [PATCH 1/3] usb: dwc3: Add reference clock properties

2018-11-07 Thread Thinh Nguyen
Hi Felipe, On 11/6/2018 10:37 PM, Felipe Balbi wrote: > Hi, > > Thinh Nguyen writes: >>> Thinh Nguyen writes: Add two new device properties to program the reference clock period and to enable low power management using the reference clock. This allows a higher demand to go in low

[PATCH 2/2] usb: dwc3: gadget: Report isoc scheduled frame number

2018-11-07 Thread Thinh Nguyen
Report the scheduled frame number of an isochronous request. Signed-off-by: Thinh Nguyen --- drivers/usb/dwc3/gadget.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 679c12e14522..34540b661592 100644 ---

[PATCH 1/2] usb: gadget: Add start_frame to usb_request

2018-11-07 Thread Thinh Nguyen
Similar to URB's start_frame, add a field start_frame to the usb_request to report the scheduled (micro)frame number of an isochronous transfer. This option is useful for debugging purposes. Signed-off-by: Thinh Nguyen --- include/linux/usb/gadget.h | 3 +++ 1 file changed, 3 insertions(+)

Re: [PATCH 1/2] usb: gadget: Add start_frame to usb_request

2018-11-07 Thread Felipe Balbi
Hi, Thinh Nguyen writes: > Similar to URB's start_frame, add a field start_frame to the usb_request > to report the scheduled (micro)frame number of an isochronous transfer. > This option is useful for debugging purposes. > > Signed-off-by: Thinh Nguyen > --- > include/linux/usb/gadget.h | 3

[PATCH v5 3/3] usb: dwc3: Add workaround for isoc start transfer failure

2018-11-07 Thread Thinh Nguyen
In DWC_usb31 version 1.70a-ea06 and prior, for highspeed and fullspeed isochronous IN, BIT[15:14] of the 16-bit microframe number reported by the XferNotReady event are invalid. The driver uses this number to schedule the isochronous transfer and passes it to the START TRANSFER command. Because

[PATCH v5 0/3] usb: dwc3: Workaround isoc start_transfer failure

2018-11-07 Thread Thinh Nguyen
DWC_usb31 peripheral v1.70a-ea06 and prior needs a SW workaround for isoc START TRANSFER command failure. This patch series implements that workaround Change in v5: - Splited and resent from an old patch series - Cleanup and fixed review issues Change in v4: - None Change in v3: - None Change

[PATCH v5 2/3] usb: dwc3: Add disabling of start_transfer failure quirk

2018-11-07 Thread Thinh Nguyen
DWC_usb31 peripheral v1.70a-ea06 and prior needs a SW workaround for isoc START TRANSFER command failure. However, some affected versions may have RTL patches to fix this without a SW workaround. Add this quirk to disable the SW workaround when it is not needed. Synopsys STAR 9001202023: Wrong

Re: [PATCH 1/3] usb: dwc3: Add reference clock properties

2018-11-07 Thread Felipe Balbi
Hi, Thinh Nguyen writes: > diff --git a/Documentation/devicetree/bindings/usb/dwc3.txt > b/Documentation/devicetree/bindings/usb/dwc3.txt > index 636630fb92d7..712b344c3a31 100644 > --- a/Documentation/devicetree/bindings/usb/dwc3.txt > +++

[PATCH v5 1/3] usb: dwc3: Track DWC_usb31 VERSIONTYPE

2018-11-07 Thread Thinh Nguyen
Add a new field to dwc3 structure to track VERSIONTYPE. The VERSIONTYPE is represented in ASCII in the 32-bit VERSIONTYPE register. In DWC_usb31, sub releases for each version are tracked with VERSIONTYPE such as "ea01" and "ea02". Signed-off-by: Thinh Nguyen --- drivers/usb/dwc3/core.c | 1 +

Re: [PATCH 2/2] usb: dwc3: gadget: Report isoc scheduled frame number

2018-11-07 Thread Felipe Balbi
Hi, Thinh Nguyen writes: > Report the scheduled frame number of an isochronous request. > > Signed-off-by: Thinh Nguyen > --- > drivers/usb/dwc3/gadget.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c > index

[PATCH v2 1/5] usb: dwc3: debugfs: Properly name Tx/RxFIFO

2018-11-07 Thread Thinh Nguyen
The Tx/RxFIFO types in the GDBGFIFOSPACE.FIFO_QUEUE_SELECT are not queue. Properly rename them. Signed-off-by: Thinh Nguyen --- Change in v2: - New patch, no previous change drivers/usb/dwc3/core.h| 4 ++-- drivers/usb/dwc3/debugfs.c | 16 2 files changed, 10

[PATCH v2 2/5] usb: dwc3: debugfs: Print eps Tx/RxFIFO in bytes

2018-11-07 Thread Thinh Nguyen
TxFIFO and RxFIFO from GDBGFIFOSPACE are fifo depths in MDWIDTH. Convert them into bytes for easier read. Signed-off-by: Thinh Nguyen --- Change in v2: - New patch, no previous change drivers/usb/dwc3/debugfs.c | 8 1 file changed, 8 insertions(+) diff --git

[PATCH v2 4/5] usb: dwc3: debugfs: Properly print/set link state for HS

2018-11-07 Thread Thinh Nguyen
Highspeed device and below has different state names than superspeed and higher. Add proper checks and printouts of link states for highspeed and below. Signed-off-by: Thinh Nguyen --- Change in v2: - New patch, no previous change drivers/usb/dwc3/debug.h | 29 +

[PATCH v2 3/5] usb: dwc3: debugfs: Dump internal LSP and ep registers

2018-11-07 Thread Thinh Nguyen
To dump internal LSP and endpoint state debug registers, we must write to GDBGLSPMUX register. This patch correctly dump LSP and endpoint states from the debug registers. If the controller is in device mode, all LSP and endpoint state registers will be dumped via the debugfs attribute "lsp_dump".

[PATCH v2 2/2] usb: dwc3: gadget: Report isoc scheduled frame number

2018-11-07 Thread Thinh Nguyen
Report the scheduled frame number of an isochronous request. Signed-off-by: Thinh Nguyen --- Change in v2: - Capture frame number at request cleanup drivers/usb/dwc3/gadget.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index

[PATCH v2 1/2] usb: gadget: Add start_frame to usb_request

2018-11-07 Thread Thinh Nguyen
Similar to URB's start_frame, add a field start_frame to the usb_request to report the scheduled (micro)frame number of an isochronous transfer. This option is useful for debugging purposes. Signed-off-by: Thinh Nguyen --- Change in v2: - None include/linux/usb/gadget.h | 3 +++ 1 file

[PATCH 3/4] usb: dwc3: gadget: remove unnecessary dev_info()

2018-11-07 Thread Felipe Balbi
Running out of requests on isochronous endpoints is part of normal operation. We don't really need to know about it every time it happens. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c

[PATCH 1/4] usb: dwc3: gadget: return errors from __dwc3_gadget_start_isoc()

2018-11-07 Thread Felipe Balbi
Sometimes, errors happen when kicking transfers from __dwc3_gadget_start_isoc(). In those cases, we need to pass along the error so gadget driver can make informed decisions. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 11 +-- 1 file changed, 5 insertions(+), 6

[PATCH 4/4] usb: dwc3: gadget: check if dep->frame_number is still valid

2018-11-07 Thread Felipe Balbi
Gadget driver may take an unbounded amount of time to queue requests after XferNotReady. This is important for isochronous endpoints which need to be started for a specific (micro-)frame. Before kicking the transfer, let's check how much time has elapsed since dep->frame_number was updated and

[PATCH 2/4] usb: dwc3: trace: log ep commands in hex

2018-11-07 Thread Felipe Balbi
They are much more useful in hexadecimal than in decimal. Moreover, generic commands are already logged in hex. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/trace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/trace.h b/drivers/usb/dwc3/trace.h index

Re: [PATCH v2 2/2] usb: dwc3: gadget: Report isoc scheduled frame number

2018-11-07 Thread Felipe Balbi
Hi, Thinh Nguyen writes: > Report the scheduled frame number of an isochronous request. > > Signed-off-by: Thinh Nguyen > --- > Change in v2: > - Capture frame number at request cleanup > > drivers/usb/dwc3/gadget.c | 4 > 1 file changed, 4 insertions(+) > > diff --git

Re: [PATCH v5 1/3] usb: dwc3: Track DWC_usb31 VERSIONTYPE

2018-11-07 Thread Felipe Balbi
Hi, Thinh Nguyen writes: > Add a new field to dwc3 structure to track VERSIONTYPE. The VERSIONTYPE > is represented in ASCII in the 32-bit VERSIONTYPE register. In > DWC_usb31, sub releases for each version are tracked with VERSIONTYPE > such as "ea01" and "ea02". > > Signed-off-by: Thinh Nguyen

Re: Prolific: PL2303G Linux driver ( new USB to UART chip)

2018-11-07 Thread Greg KH
On Wed, Nov 07, 2018 at 06:18:07PM +0800, Charles Yeh wrote: > Hi Greg, > > The " Documentation/SubmittingPatches is write : This file has moved > to process/submitting-patches.rst > > The document is "Documentation\process\submitting-patches.rst" ? > please confirm Yes, that is what

Re: [PATCH] usb: dwc3: debugfs: Dump internal states

2018-11-07 Thread Greg Kroah-Hartman
On Wed, Nov 07, 2018 at 08:39:41AM +0200, Felipe Balbi wrote: > > Hi, > > Thinh Nguyen writes: > > +static ssize_t dwc3_internal_states_write(struct file *file, > > + const char __user *ubuf, size_t count, loff_t *ppos) > why is this necessary? Seems like it would be

Re: Prolific: PL2303G Linux driver ( new USB to UART chip)

2018-11-07 Thread Greg KH
On Wed, Nov 07, 2018 at 05:17:02PM +0800, Charles Yeh wrote: > Hi Greg, > Can you give me a link URL about " Documentation/SubmittingPatches "? > I am not very familiar with Linux kernel OS... It is in the main kernel source tree that you had to patch in order to create the diff you did, you

Re: [PATCH] usb: dwc3: debugfs: Dump internal states

2018-11-07 Thread Greg Kroah-Hartman
On Wed, Nov 07, 2018 at 12:45:50PM +0200, Felipe Balbi wrote: > > Hi, > > Greg Kroah-Hartman writes: > >> Thinh Nguyen writes: > >> > +static ssize_t dwc3_internal_states_write(struct file *file, > >> > +const char __user *ubuf, size_t count, loff_t *ppos) > >> why is

Re: [PATCH] usb: dwc3: debugfs: Dump internal states

2018-11-07 Thread Felipe Balbi
Hi, Greg Kroah-Hartman writes: >> Thinh Nguyen writes: >> > +static ssize_t dwc3_internal_states_write(struct file *file, >> > + const char __user *ubuf, size_t count, loff_t *ppos) >> why is this necessary? Seems like it would be nicer to create a >> directory

Re: Prolific: PL2303G Linux driver ( new USB to UART chip)

2018-11-07 Thread Greg KH
On Wed, Nov 07, 2018 at 04:07:03PM +0800, Charles Yeh wrote: > Hi Johan, > I use latest mainline releas: 4.19 to make patch file.. > please refer to attach file: "diff419pl2303c.patch" & " > diff419pl2303h.patch " Please read the file, Documentation/SubmittingPatches in the kernel

[PATCH] HID: Add quirk for Microsoft PIXART OEM mouse

2018-11-07 Thread Sebastian Parschauer
The PixArt OEM mice are known for disconnecting every minute in runlevel 1 or 3 if they are not always polled. So add quirk ALWAYS_POLL for this one as well. References: https://www.spinics.net/lists/linux-usb/msg88965.html http://linet.gr.jp/~kojima/PlamoWeb/ML/htdocs/201808/msg00019.html