[PATCH v2] USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data

2018-12-10 Thread Greg KH
From: Hui Peng The function hso_probe reads if_num from the USB device (as an u8) and uses it without a length check to index an array, resulting in an OOB memory read in hso_probe or hso_get_config_data. Added a length check for both locations and updated hso_probe to bail on error. This issue

Re: [PATCH v4 4/4] doc: usb: ci-hdrc-usb2: Add pinctrl properties for HSIC pin groups

2018-12-10 Thread Schrempf Frieder
Hi Peter, On 09.12.18 06:40, Peter Chen wrote: > For USB HSIC, the data and strobe pin needs to be pulled down > at default, we consider it as "idle" state. When the USB host > is ready to be used, the strobe pin needs to be pulled up, > we consider it as "active" state. > > Signed-off-by: Peter

Re: [PATCH] USB: serial: option: add Fibocom NL668 series (fixed line break issue)

2018-12-10 Thread Johan Hovold
On Mon, Dec 10, 2018 at 01:54:14PM +0700, Lars Melin wrote: > On 12/10/2018 06:21, Jörgen Storvist wrote: > > > > Added USB serial option driver support for Fibocom NL668 series cellular > > module. > > Reserved USB endpoints 4 and 5 for network interfaces. > > > > Signed-off-by: Jörgen Storvist

Re: [PATCH] usb: dwc3: gadget: Disable CSP for stream OUT ep

2018-12-10 Thread Felipe Balbi
Tejas Joglekar writes: > In stream mode, when fast-forwarding TRBs, the stream number > is not cleared causing the new stream to not get assigned. So > we don't want controller to carry on transfers when short packet > is received. So disable the CSP for stream capable endpoint. > > This is based

RE: [PATCH v7 09/10] usb: dwc3: Check for IOC/LST bit in both event->status and TRB->ctrl fields

2018-12-10 Thread Anurag Kumar Vulisha
Hi Felipe, >-Original Message- >From: Felipe Balbi [mailto:ba...@kernel.org] >Sent: Monday, December 10, 2018 12:24 PM >To: Anurag Kumar Vulisha ; Greg Kroah-Hartman >; Shuah Khan ; Alan Stern >; Johan Hovold ; Jaejoong Kim >; Benjamin Herrenschmidt ; >Roger Quadros ; Manu Gautam ; >martin

RE: [PATCH] usb: typec: tcpm: Extend the matching rules on PPS APDO selection

2018-12-10 Thread Adam Thomson
On 06 December 2018 03:02, Kyle Tso wrote: > Current matching rules ensure that the voltage range of selected Source > Capability is entirely within the range defined in one of the Sink > Capabilities. This > is reasonable but not practical because Sink may not support wide range of > voltage whe

RE: [PATCH v7 09/10] usb: dwc3: Check for IOC/LST bit in both event->status and TRB->ctrl fields

2018-12-10 Thread Felipe Balbi
Hi, Anurag Kumar Vulisha writes: > Thanks for reviewing this patch. Lets consider an example where a > request has num_sgs > 0 and each sg is mapped to a TRB and the last > TRB has the IOC bit set. Once the controller is done with the > transfer, it generates XferInProgress for

Re: [PATCH 2/3] dt-bindings: usb: keystone-usb: Add ti,am654-dwc3 support

2018-12-10 Thread Roger Quadros
Hi Vignesh, On 06/12/18 12:32, Vignesh R wrote: > Hi Roger, > > On 05/12/18 8:49 PM, Roger Quadros wrote: >> The AM654 SoC from TI contains a DWC3 controller. Add >> support for it. >> >> Signed-off-by: Roger Quadros >> --- >> Documentation/devicetree/bindings/usb/keystone-usb.txt | 4 ++-- >>

Re: [PATCH] USB: serial: option: add HP lt4132

2018-12-10 Thread Johan Hovold
On Sat, Dec 08, 2018 at 07:05:12PM +0100, Tore Anderson wrote: > The HP lt4132 is a rebranded Huawei ME906s-158 LTE modem. > > The interface with protocol 0x16 is "CDC ECM & NCM" according to the *.inf > files included with the Windows driver. Attaching the option driver to it > doesn't result in

Re: [PATCH -next] USB: serial: mos7840: remove set but not used variables 'number, serial'

2018-12-10 Thread Johan Hovold
On Fri, Dec 07, 2018 at 02:50:42AM +, YueHaibing wrote: > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/usb/serial/mos7840.c: In function 'mos7840_send_cmd_write_baud_rate': > drivers/usb/serial/mos7840.c:1584:16: warning: > variable 'number' set but not used [-Wunused-but-set-va

Re: [PATCH v4 4/4] doc: usb: ci-hdrc-usb2: Add pinctrl properties for HSIC pin groups

2018-12-10 Thread Fabio Estevam
On Mon, Dec 10, 2018 at 6:09 AM Schrempf Frieder wrote: > With a separate example for HSIC, we should probably leave the standard > example unchanged (I think that was one of the reasons for adding a > separate example). Yes, I agree. That would make the binding doc clearer. Thanks

Re: [PATCH] usb: dwc3: gadget: Disable CSP for stream OUT ep

2018-12-10 Thread Tejas Joglekar
Hi, On 12/10/2018 2:04 PM, Felipe Balbi wrote: > Tejas Joglekar writes: > >> In stream mode, when fast-forwarding TRBs, the stream number >> is not cleared causing the new stream to not get assigned. So >> we don't want controller to carry on transfers when short packet >> is received. So disable

[PATCH v2] usb: dwc3: gadget: Disable CSP for stream OUT ep

2018-12-10 Thread Tejas Joglekar
In stream mode, when fast-forwarding TRBs, the stream number is not cleared causing the new stream to not get assigned. So we don't want controller to carry on transfers when short packet is received. So disable the CSP for stream capable endpoint. This is based on the 3.30a Programming guide, whe

RE: [PATCH] usb: typec: tcpm: Extend the matching rules on PPS APDO selection

2018-12-10 Thread Adam Thomson
On 10 December 2018 09:01, Adam Thomson wrote: > On 06 December 2018 03:02, Kyle Tso wrote: > > > Current matching rules ensure that the voltage range of selected > > Source Capability is entirely within the range defined in one of the > > Sink Capabilities. This is reasonable but not practical b

Re: USB driver resets

2018-12-10 Thread Richard van der Hoff
On 05/12/2018 10:08, Richard van der Hoff wrote: On 05/12/2018 09:44, Mika Westerberg wrote: On Tue, Dec 04, 2018 at 04:02:56PM +, Richard van der Hoff wrote: Sorry. The system is a Dell XPS13 9350, with an Intel DSL6340 Thunderbolt 3 bridge. The dock is a Plugable UD-CA1 [2]. Also i

Re: new device: vendor: 1c9e product: 3003 (4G Systems W21s)

2018-12-10 Thread Bjoern Franke
Hi, > > That's great to hear, but why do we need to know this? Were you using > the 'generic' usb-serial interface which asked you to email this > information here? Yes. > If so, can you provide the output of 'lsusb -v' with the device plugged > into the system and working? > I've attached t

[PATCH v1 1/2] dt-bindings: add binding for USBSS-DRD controller.

2018-12-10 Thread Pawel Laszczak
This patch aim at documenting USB related dt-bindings for the Cadence USBSS-DRD controller. Signed-off-by: Pawel Laszczak --- .../devicetree/bindings/usb/cdns3-usb.txt | 31 +++ 1 file changed, 31 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/cdns3-u

[PATCH v1 0/2] Introduced new Cadence USBSS DRD Driver.

2018-12-10 Thread Pawel Laszczak
This patch set introduce new Cadence USBSS DRD driver to linux kernel. The Cadence USBSS DRD Driver s a highly configurable IP Core which can be instantiated as Dual-Role Device (DRD), Peripheral Only and Host Only (XHCI) configurations. The current driver has been validated with FPGA burned. We

Re: [PATCH v2] USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data

2018-12-10 Thread Sebastian Andrzej Siewior
On 2018-12-10 09:04:43 [+0100], Greg KH wrote: > From: Hui Peng > > The function hso_probe reads if_num from the USB device (as an u8) and uses > it without a length check to index an array, resulting in an OOB memory read > in hso_probe or hso_get_config_data. Added a length check for both locat

Re: [PATCH 1/1] usb: dwc2: disable power_down on Amlogic devices

2018-12-10 Thread Brad Harper
On 10/12/2018 6:01 am, Martin Blumenstingl wrote: Disable power_down by setting the parameter to DWC2_POWER_DOWN_PARAM_NONE. This fixes a problem on various Amlogic Meson SoCs where USB devices are only recognized when plugged in before booting Linux. A hot-plugged USB device was not detected eve

Re: USB driver resets

2018-12-10 Thread Mathias Nyman
On 10.12.2018 14:24, Richard van der Hoff wrote: On 05/12/2018 10:08, Richard van der Hoff wrote: On 05/12/2018 09:44, Mika Westerberg wrote: On Tue, Dec 04, 2018 at 04:02:56PM +, Richard van der Hoff wrote: Sorry. The system is a Dell XPS13 9350, with an Intel DSL6340 Thunderbolt 3 brid

Re: USB driver resets

2018-12-10 Thread Richard van der Hoff
On 10/12/2018 13:30, Mathias Nyman wrote: Do you have the beginning part of the dmesg? It could show why the USB devices all get disconnected. The whole xhci usb host will be hotplug removed from the PCI bus when last device is disconnected, this is roughly where your current dmesg starts.

Re: [PATCH] USB: quirks: add NO_LPM quirk for Logitech Flare|Meetup|Brio|Rally

2018-12-10 Thread Mathias Nyman
On 08.12.2018 00:18, Kyle Williams wrote: On Tue, Dec 04, 2018 at 04:36:18PM -0500, Alan Stern wrote: On Tue, 4 Dec 2018, Kyle Williams wrote: Description: Some USB device / host controller combinations seem to have problems with Link Power management. In particular it is described that the co

[PATCH] usb: dwc2: Fix disable all EP's on disconnect

2018-12-10 Thread Minas Harutyunyan
Disabling all EP's allow to reset EP's to initial state. Introduced new function dwc2_hsotg_ep_disable_lock() which before calling dwc2_hsotg_ep_disable() function acquire hsotg->lock and release on exiting. >From dwc2_hsotg_ep_disable() function removed acquiring hsotg->lock. In dwc2_hsotg_core_in

Re: USB driver resets

2018-12-10 Thread Mika Westerberg
On Mon, Dec 10, 2018 at 01:33:45PM +, Richard van der Hoff wrote: > > On 10/12/2018 13:30, Mathias Nyman wrote: > > Do you have the beginning part of the dmesg? It could show why the USB > > devices all get disconnected. > > The whole xhci usb host will be hotplug removed from the PCI bus when

[PATCH] usb: core: hcd: Remove unnecessarily repeated memset()

2018-12-10 Thread Suwan Kim
The device map of struct usb_bus is already initialized in usb_bus_init() during host controller probe function. Signed-off-by: Suwan Kim --- drivers/usb/core/hcd.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 487025d31d44..015b126ce4

Re: [PATCH v2] usb: xhci: fix small typo

2018-12-10 Thread Frank Lee
ping..

Re: [PATCH 1/2] pci: pci_ids: Move Synopsys HAPS platform device IDs

2018-12-10 Thread Bjorn Helgaas
On Fri, Nov 02, 2018 at 06:47:38PM -0700, Thinh Nguyen wrote: > Move Synopsys HAPS platform device IDs to pci_ids.h. > > Signed-off-by: Thinh Nguyen 1) Run "git log --oneline include/linux/pci_ids.h" and follow the style convention for patch subject. 2) Explain in the changelog why we're moving

Re: [PATCH 2/2] pci: quirks: Override Synopsys USB 3.x HAPS device driver

2018-12-10 Thread Bjorn Helgaas
On Sat, Dec 08, 2018 at 02:49:09AM +, Thinh Nguyen wrote: > Hi Bjorn, > > On 11/6/2018 12:44 AM, Felipe Balbi wrote: > > Thinh Nguyen writes: > > > >> ++ linux-usb > >> ++ Greg > >> > >> On 11/2/2018 6:47 PM, Thinh Nguyen wrote: > >>> Synopsys USB 3.x host HAPS platform has a class code of >

Re: [PATCH] usb: core: Remove unnecessary memset()

2018-12-10 Thread Alan Stern
On Tue, 4 Dec 2018, Suwan Kim wrote: > register_root_hub() calls memset() setting usb_dev->bus->devmap. > devicemap to 0 during hcd probe function (usb_hcd_pci_probe). But > in previous function which is also the procedure of usb_hcd_pci_probe(), > usb_bus_init() already initialized bus->devmap ca

Re: [PATCH 1/2] pci: pci_ids: Move Synopsys HAPS platform device IDs

2018-12-10 Thread Thinh Nguyen
Hi Bjorn, On 12/10/2018 10:49 AM, Bjorn Helgaas wrote: > On Fri, Nov 02, 2018 at 06:47:38PM -0700, Thinh Nguyen wrote: >> Move Synopsys HAPS platform device IDs to pci_ids.h. >> >> Signed-off-by: Thinh Nguyen > 1) Run "git log --oneline include/linux/pci_ids.h" and follow the > style convention f

Re: [PATCH 2/2] pci: quirks: Override Synopsys USB 3.x HAPS device driver

2018-12-10 Thread Thinh Nguyen
Hi Bjorn, On 12/10/2018 10:54 AM, Bjorn Helgaas wrote: > On Sat, Dec 08, 2018 at 02:49:09AM +, Thinh Nguyen wrote: >> Hi Bjorn, >> >> On 11/6/2018 12:44 AM, Felipe Balbi wrote: >>> Thinh Nguyen writes: >>> ++ linux-usb ++ Greg On 11/2/2018 6:47 PM, Thinh Nguyen wrote:

[PATCH v2 1/2] PCI: Move Synopsys HAPS platform device IDs

2018-12-10 Thread Thinh Nguyen
Move Synopsys HAPS platform device IDs to pci_ids.h so that both drivers/pci/quirks.c and dwc3-haps driver can reference these IDs. Signed-off-by: Thinh Nguyen Acked-by: Felipe Balbi --- Change in v2: - Revise title to fit PCI patches' convention - Revise commit message to include the change pur

[PATCH v2 2/2] PCI: Override Synopsys USB 3.x HAPS device class

2018-12-10 Thread Thinh Nguyen
Synopsys USB 3.x host HAPS platform has a class code of PCI_CLASS_SERIAL_USB_XHCI, and xhci driver can claim it. However, these devices should use dwc3-haps driver. Change these devices' class code to PCI_CLASS_SERIAL_USB_DEVICE to prevent the xhci-pci driver from claiming them. Signed-off-by: Thi

RE: [PATCH v4 4/4] doc: usb: ci-hdrc-usb2: Add pinctrl properties for HSIC pin groups

2018-12-10 Thread Peter Chen
> > On Mon, Dec 10, 2018 at 6:09 AM Schrempf Frieder > wrote: > > > With a separate example for HSIC, we should probably leave the > > standard example unchanged (I think that was one of the reasons for > > adding a separate example). > > Yes, I agree. That would make the binding doc clearer.

[PATCH] usb: gadget: uvc: configfs: add framebased format support

2018-12-10 Thread Zeng Tao
As we know, The framebased format can be used to support a lot of formats other than YUV and MJPEG, for example: H264 or H265. And Nowadays, the H264 and H265 is used more and more compared to the MJPEG, so there is a need to support such usecase, although the new UVC 1.5 and the UVC1.1 extensions

[PATCH v5 0/4] usb: chipidea: imx: add HSIC support

2018-12-10 Thread Peter Chen
Most of NXP (Freescale) i.mx USB part has HSIC support, in this series, we add support for them, it should cover all imx6 and imx7d SoC. Changes for v5: - Delete the useless doc changes introduced by former patch revision. [Patch 4/4] Changes for v4: - Some code style improvements [Patch 3/4] -

[PATCH v5 4/4] doc: usb: ci-hdrc-usb2: Add pinctrl properties for HSIC pin groups

2018-12-10 Thread Peter Chen
For USB HSIC, the data and strobe pin needs to be pulled down at default, we consider it as "idle" state. When the USB host is ready to be used, the strobe pin needs to be pulled up, we consider it as "active" state. Signed-off-by: Peter Chen --- .../devicetree/bindings/usb/ci-hdrc-usb2.txt

[PATCH v5 1/4] usb: chipidea: add flag for imx hsic implementation

2018-12-10 Thread Peter Chen
NXP (Freecale) imx HSIC design has some special requirements, add some flags at host code to handle them. Reviewed-by: Frieder Schrempf Tested-by: Frieder Schrempf Signed-off-by: Peter Chen --- drivers/usb/chipidea/host.c | 17 + include/linux/usb/chipidea.h | 3 +++ 2 files

[PATCH v5 3/4] usb: chipidea: host: override ehci->hub_control

2018-12-10 Thread Peter Chen
The chipidea controller has some special requirements during suspend/resume, override common ehci->hub_control to implement it. Reviewed-by: Frieder Schrempf Tested-by: Frieder Schrempf Signed-off-by: Peter Chen --- drivers/usb/chipidea/host.c | 75 +

[PATCH v5 2/4] usb: chipidea: imx: add HSIC support

2018-12-10 Thread Peter Chen
To support imx HSIC, there are some special requirement: - The HSIC pad is 1.2v, it may need to supply from external - The data/strobe pin needs to be pulled down first, and after host mode is initialized, the strobe pin needs to be pulled up - During the USB suspend/resume, special setting is ne

[PATCH] USB: serial: option: add Fibocom NL668 series

2018-12-10 Thread Jörgen Storvist
Added USB serial option driver support for Fibocom NL668 series cellular modules. Reserved USB endpoints 4, 5 and 6 for network + ADB interface. Signed-off-by: Jörgen Storvist --- Thanks for feedback! Changes: Removed name declarations for VID/PID Added reserved endpoint for ADB interface us