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 sou

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 n

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 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 st

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 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 t

[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 Signed

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

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 pat

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 t

[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 usb

[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 insertions(+

[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 a/drivers/usb/dwc3/debugf

[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 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(-) d

[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 a/Documentation/devicetree/bi

[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 --gi

[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(+) diff

[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 --- a/drivers/usb/dwc3/gadg

[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 679

[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 changed

[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 thi

[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 mic

[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 + d

[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 b/drivers/usb/dwc3/g

[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 deletions(

[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 mak

[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 f

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 +

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 679c12e14522..345

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 a/drivers/usb/dwc3

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: [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 > +++ b/Documentation/devicetree/binding

RE: [RFC PATCH v1 01/14] usb:cdns3: add pci to platform driver wrapper.

2018-11-07 Thread Pawel Laszczak
Hi Roger, > >Hi Pawel, > >On 03/11/18 19:51, Pawel Laszczak wrote: >> Patch adds PCI specific glue drivier that creaties and registers in > >s/drivier/driver >s/creaties/creates >s/in system/in-system > >> system cdns-usb3 platform device. Thanks to that we will be able to use >> the cdns-usb3 plat

Re: USB-C device hotplug issue

2018-11-07 Thread Dennis Wassenberg
On 05.11.18 16:35, Mathias Nyman wrote: > On 26.10.2018 17:07, Alan Stern wrote: >> On Fri, 26 Oct 2018, Dennis Wassenberg wrote: >> > --- a/drivers/usb/core/hub.c > +++ b/drivers/usb/core/hub.c > @@ -2815,7 +2815,9 @@ static int hub_port_reset(struct usb_hub *hub, int > port1, >

RE: [RFC PATCH v1 03/14] usb:cdns3: Driver initialization code.

2018-11-07 Thread Pawel Laszczak
>On 03/11/18 19:51, Pawel Laszczak wrote: >> Patch adds core.c and core.h file that implements initialization >> of platform driver and adds function responsible for selecting, >> switching and running appropriate Device/Host mode. >> >> Patch also adds gadget.c, host.c, gadget-export.h, host-exp

Re: [PATCH V3 4/6] usb: ohci-platform: Add support for Broadcom STB SoC's

2018-11-07 Thread Alan Stern
On Tue, 6 Nov 2018, Florian Fainelli wrote: > On 11/6/18 1:40 PM, Al Cooper wrote: > > On 11/6/18 11:08 AM, Alan Stern wrote: > >> On Mon, 5 Nov 2018, Al Cooper wrote: > >> > >>> Add support for Broadcom STB SoC's to the ohci platform driver. > >>> > >>> Signed-off-by: Al Cooper > >>> --- > >> >

Re: [PATCH V3 4/6] usb: ohci-platform: Add support for Broadcom STB SoC's

2018-11-07 Thread Al Cooper
On 11/7/18 10:23 AM, Alan Stern wrote: On Tue, 6 Nov 2018, Florian Fainelli wrote: On 11/6/18 1:40 PM, Al Cooper wrote: On 11/6/18 11:08 AM, Alan Stern wrote: On Mon, 5 Nov 2018, Al Cooper wrote: Add support for Broadcom STB SoC's to the ohci platform driver. Signed-off-by: Al Cooper ---

Re: [PATCH 4/6] usb: gadget: add functions to signal udc driver to delay status stage

2018-11-07 Thread Alan Stern
On Wed, 7 Nov 2018, Felipe Balbi wrote: > Hi, > > Alan Stern writes: > >> Alan Stern writes: > >> > There's a similar race at the hardware level. What happens if the > >> > controller receives a new SETUP packet and concurrently the driver is > >> > setting up the controller registers for a re

Re: [PATCH V3 4/6] usb: ohci-platform: Add support for Broadcom STB SoC's

2018-11-07 Thread Alan Stern
On Wed, 7 Nov 2018, Al Cooper wrote: > On 11/7/18 10:23 AM, Alan Stern wrote: > > On Tue, 6 Nov 2018, Florian Fainelli wrote: > > > >> On 11/6/18 1:40 PM, Al Cooper wrote: > >>> On 11/6/18 11:08 AM, Alan Stern wrote: > On Mon, 5 Nov 2018, Al Cooper wrote: > > > Add support for Broad

[PATCH] [stable, netdev 4.4+] lan78xx: make sure RX_ADDRL & RX_ADDRH regs are always up to date

2018-11-07 Thread Paolo Pisati
[partial backport upstream 760db29bdc97b73ff60b091315ad787b1deb5cf5] Upon invocation, lan78xx_init_mac_address() checks that the mac address present in the RX_ADDRL & RX_ADDRH registers is a valid address, if not, it first tries to read a new address from an external eeprom or the otp area, and in

Re: [PATCH V3 4/6] usb: ohci-platform: Add support for Broadcom STB SoC's

2018-11-07 Thread Florian Fainelli
On 11/7/18 8:27 AM, Alan Stern wrote: > On Wed, 7 Nov 2018, Al Cooper wrote: > >> On 11/7/18 10:23 AM, Alan Stern wrote: >>> On Tue, 6 Nov 2018, Florian Fainelli wrote: >>> On 11/6/18 1:40 PM, Al Cooper wrote: > On 11/6/18 11:08 AM, Alan Stern wrote: >> On Mon, 5 Nov 2018, Al Cooper w

Re: [PATCH V3 4/6] usb: ohci-platform: Add support for Broadcom STB SoC's

2018-11-07 Thread Al Cooper
On 11/7/18 12:29 PM, Florian Fainelli wrote: On 11/7/18 8:27 AM, Alan Stern wrote: On Wed, 7 Nov 2018, Al Cooper wrote: On 11/7/18 10:23 AM, Alan Stern wrote: On Tue, 6 Nov 2018, Florian Fainelli wrote: On 11/6/18 1:40 PM, Al Cooper wrote: On 11/6/18 11:08 AM, Alan Stern wrote: On Mon, 5

Re: [PATCH V3 4/6] usb: ohci-platform: Add support for Broadcom STB SoC's

2018-11-07 Thread Florian Fainelli
On 11/7/2018 9:40 AM, Al Cooper wrote: > On 11/7/18 12:29 PM, Florian Fainelli wrote: >> On 11/7/18 8:27 AM, Alan Stern wrote: >>> On Wed, 7 Nov 2018, Al Cooper wrote: >>> On 11/7/18 10:23 AM, Alan Stern wrote: > On Tue, 6 Nov 2018, Florian Fainelli wrote: > >> On 11/6/18 1:40 PM,

[PATCH] usb: dwc3: don't log probe deferrals; but do log other error codes

2018-11-07 Thread Brian Norris
It's not very useful to repeat a bunch of probe deferral errors. And it's also not very useful to log "failed" without telling the error code. Signed-off-by: Brian Norris --- drivers/usb/dwc3/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/core.c b/d

Re: [PATCH] [stable, netdev 4.4+] lan78xx: make sure RX_ADDRL & RX_ADDRH regs are always up to date

2018-11-07 Thread Sasha Levin
On Wed, Nov 07, 2018 at 05:50:57PM +0100, Paolo Pisati wrote: [partial backport upstream 760db29bdc97b73ff60b091315ad787b1deb5cf5] Upon invocation, lan78xx_init_mac_address() checks that the mac address present in the RX_ADDRL & RX_ADDRH registers is a valid address, if not, it first tries to re

Re: [PATCH] usb: gadget: aspeed-vhub: constify usb_gadget_ops structure

2018-11-07 Thread Andrew Jeffery
On Wed, 31 Oct 2018, at 02:49, Julia Lawall wrote: > The usb_gadget_ops structure can be const as it is only stored in > the ops field of a usb_gadget structure and this field is const. > > Done with the help of Coccinelle. > > Signed-off-by: Julia Lawall Reviewed-by: Andrew Jeffery > > ---

Re: [PATCH V2 2/6] usb: core: Add ability to skip phy exit on suspend and init on resume

2018-11-07 Thread Chunfeng Yun
hi, On Tue, 2018-10-30 at 18:30 -0400, Alan Cooper wrote: > On 10/17/18 9:46 PM, Chunfeng Yun wrote:> hi, > > > > On Wed, 2018-10-17 at 18:29 -0400, Al Cooper wrote: > >> Add the ability to skip calling the PHY's exit routine on suspend > >> and the PHY's init routine on resume. This is to handle a

Re: [PATCH] usb: gadget: fix spelling mistakeis "[En]queing" -> "[En]queuing"

2018-11-07 Thread Andrew Jeffery
On Sat, 29 Sep 2018, at 22:13, Colin King wrote: > From: Colin Ian King > > Trivial fix to spelling mistakes in debug warning messages > > Signed-off-by: Colin Ian King Reviewed-by: Andrew Jeffery > --- > drivers/usb/gadget/udc/aspeed-vhub/epn.c | 2 +- > drivers/usb/gadget/udc/udc-xilinx.c