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

2018-12-11 Thread Johan Hovold
On Tue, Dec 11, 2018 at 08:41:24AM +0100, Jörgen Storvist wrote: > > 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:

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

2018-12-11 Thread Mathias Nyman
On 10.12.2018 18:34, Frank Lee wrote: ping.. Thanks Adding to queue for 4.22 -Mathias

Re: [PATCH v1 2/2] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-11 Thread Roger Quadros
Pawel, On 10/12/18 14:39, Pawel Laszczak wrote: > This patch introduce new Cadence USBSS DRD driver > to linux kernel. > > The Cadence USBSS DRD Driver is a highly > configurable IP Core which can be > instantiated as Dual-Role Device (DRD), > Peripheral Only and Host Only (XHCI) > configurations

Re: USB driver resets

2018-12-11 Thread Mika Westerberg
On Mon, Dec 10, 2018 at 03:02:26PM +, Richard van der Hoff wrote: > On 10/12/2018 14:53, Mika Westerberg wrote: > > 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? I

RE: [PATCH v1 2/2] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-11 Thread Pawel Laszczak
Hi, >On 10/12/18 14:39, Pawel Laszczak wrote: >> This patch introduce new Cadence USBSS DRD driver >> to linux kernel. >> >> The Cadence USBSS DRD Driver is a highly >> configurable IP Core which can be >> instantiated as Dual-Role Device (DRD), >> Peripheral Only and Host Only (XHCI) >> configura

[PATCH] usb: renesas_usbhs: mark PM functions as __maybe_unused

2018-12-11 Thread Arnd Bergmann
Without CONFIG_PM, we get a new build warning here: drivers/usb/renesas_usbhs/common.c:860:12: error: 'usbhsc_resume' defined but not used [-Werror=unused-function] static int usbhsc_resume(struct device *dev) ^ drivers/usb/renesas_usbhs/common.c:844:12: error: 'usbhsc_su

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

2018-12-11 Thread Roger Quadros
Pawel, On 10/12/18 14:39, Pawel Laszczak wrote: > 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(+) >

Re: [RFC PATCH v2 08/15] usb:cdns3: Implements device operations part of the API

2018-12-11 Thread Sekhar Nori
On 10/12/18 7:42 AM, Peter Chen wrote: >>> +static struct usb_ep *cdns3_gadget_match_ep(struct usb_gadget *gadget, >>> + struct usb_endpoint_descriptor >>> *desc, >>> + struct usb_ss_ep_comp_descriptor >>> *comp_desc)

Re: [PATCH v1 2/2] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-11 Thread Felipe Balbi
Hi, Roger Quadros writes: >> This patch introduce new Cadence USBSS DRD driver >> to linux kernel. >> >> The Cadence USBSS DRD Driver is a highly >> configurable IP Core which can be >> instantiated as Dual-Role Device (DRD), >> Peripheral Only and Host Only (XHCI) >> configurations. >> >> The

Re: [PATCH v1 2/2] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-11 Thread Felipe Balbi
Hi, Pawel Laszczak writes: > +static int cdns3_probe(struct platform_device *pdev) > +{ > + struct device *dev = &pdev->dev; > + struct resource *res; > + struct cdns3 *cdns; > + void __iomem *regs; > + int ret; > + > + cdns = devm_kzalloc(dev, sizeof(*cdns), GFP_KERNEL);

RE: [PATCH v1 2/2] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-11 Thread Felipe Balbi
Hi, Pawel Laszczak writes: >>I think what Felipe meant was to only combine the gadget driver code into one >>patch. >> >>The series could be split into 6 patches like so. >>-dt binding >>-pci glue >>-core driver >>-host driver >>-gadget driver >>-drd driver > > Felipe wrote: > " > Frankly, I d

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

2018-12-11 Thread Jörgen Storvist
Den Tue, 11 Dec 2018 09:32:36 +0100 skrev Re: [PATCH] USB: serial: option: add Fibocom NL668 series: > On Tue, Dec 11, 2018 at 08:41:24AM +0100, Jörgen Storvist wrote: > > > > Added USB serial option driver support for Fibocom NL668 series cellular > > modules. > > Reserved USB endpoints 4, 5 an

[PATCH 2/6] iommu/of: Use device_iommu_mapped()

2018-12-11 Thread Joerg Roedel
From: Joerg Roedel Use Use device_iommu_mapped() to check if the device is already mapped by an IOMMU. Acked-by: Robin Murphy Signed-off-by: Joerg Roedel --- drivers/iommu/of_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/of_iommu.c b/drivers/iommu/o

[PATCH 4/6] powerpc/iommu: Use device_iommu_mapped()

2018-12-11 Thread Joerg Roedel
From: Joerg Roedel Use the new function to replace the open-coded iommu check. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Russell Currey Cc: Sam Bobroff Acked-by: Robin Murphy Signed-off-by: Joerg Roedel --- arch/powerpc/kernel/eeh.c | 2 +- arch/powerpc/kernel/iommu.c | 6 +++---

[PATCH 6/6] dmaengine: sh: rcar-dmac: Use device_iommu_mapped()

2018-12-11 Thread Joerg Roedel
From: Joerg Roedel Use Use device_iommu_mapped() to check if the device is already mapped by an IOMMU. Acked-by: Robin Murphy Signed-off-by: Joerg Roedel --- drivers/dma/sh/rcar-dmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/sh/rcar-dmac.c b/drivers/dma

[PATCH 3/6] ACPI/IORT: Use device_iommu_mapped()

2018-12-11 Thread Joerg Roedel
From: Joerg Roedel Replace the iommu-check with a proper and readable function call. Cc: Lorenzo Pieralisi Acked-by: Robin Murphy Signed-off-by: Joerg Roedel --- drivers/acpi/arm64/iort.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/arm64/iort.c b/drivers/

[PATCH 5/6] xhci: Use device_iommu_mapped()

2018-12-11 Thread Joerg Roedel
From: Joerg Roedel Replace the dev->iommu_group check with a proper function call that better reprensents its purpose. Cc: Mathias Nyman Acked-by: Robin Murphy Signed-off-by: Joerg Roedel --- drivers/usb/host/xhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/

[PATCH 0/6 v2] Introduce device_iommu_mapped() function

2018-12-11 Thread Joerg Roedel
Hi, here is the second version of this patch-set. It replaces the various (dev->iommu_group) checks with a function call which better expresses their intend. Changes to the first version are the added patch for rcar-dmac, a driver I missed before. I also added all Acked-By's I received on the fir

[PATCH 1/6] driver core: Introduce device_iommu_mapped() function

2018-12-11 Thread Joerg Roedel
From: Joerg Roedel Some places in the kernel check the iommu_group pointer in 'struct device' in order to find ot whether a device is mapped by an IOMMU. This is not good way to make this check, as the pointer will be moved to 'struct dev_iommu_data'. This way to make the check is also not very

Re: XHCI DbC (debug port) problems

2018-12-11 Thread Mathias Nyman
On 05.12.2018 13:13, Tj wrote: I'm assisting in debugging what appears to be a race condition in I2C code [0] on Intel ComputeStick STK1A32SC [1] devices. As part of that effort we were originally using an external USB<>RS232 adapter and "console=ttyUSB0,115200n8" but that can be extremely slow (

[PATCH] r8152: Add support for MAC address pass through on RTL8153-BND

2018-12-11 Thread Mario Limonciello
All previous docks and dongles that have supported this feature use the RTL8153-AD chip. RTL8153-BND is a new chip that will be used in upcoming Dell type-C docks. It should be added to the whitelist of devices to activate MAC address pass through. Per confirming with Realtek all devices containi

Re: [PATCH 1/6] driver core: Introduce device_iommu_mapped() function

2018-12-11 Thread Sergei Shtylyov
Hello! On 12/11/2018 04:43 PM, Joerg Roedel wrote: > From: Joerg Roedel > > Some places in the kernel check the iommu_group pointer in > 'struct device' in order to find ot whether a device is > mapped by an IOMMU. > > This is not good way to make this check, as the pointer will > be moved to

Re: [PATCH 1/6] driver core: Introduce device_iommu_mapped() function

2018-12-11 Thread Joerg Roedel
On Tue, Dec 11, 2018 at 05:59:33PM +0300, Sergei Shtylyov wrote: > > +static inline bool device_iommu_mapped(struct device *dev) > > +{ > > + return (dev->iommu_group != NULL); > >You know that parens are unnecessary here, right? :-) Yes, I know, but it feels incomplete to me without them :

[PATCH] USB: serial: option: add GosunCn ZTE WeLink ME3630

2018-12-11 Thread Jörgen Storvist
Added USB serial option driver support for GosunCn ZTE WeLink ME3630 series cellular modules for USB modes ECM/NCM and MBIM. Signed-off-by: Jörgen Storvist --- usb-devices output MBIM mode: T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 10 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=

RE: [PATCH v1 2/2] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-11 Thread Pawel Laszczak
Hi, > >Pawel Laszczak writes: >> +static int cdns3_probe(struct platform_device *pdev) >> +{ >> +struct device *dev = &pdev->dev; >> +struct resource *res; >> +struct cdns3 *cdns; >> +void __iomem *regs; >> +int ret; >> + >> +cdns = devm_kzalloc(dev, sizeof(*cdns), GFP_KER

RE: [RFC PATCH v2 08/15] usb:cdns3: Implements device operations part of the API

2018-12-11 Thread Pawel Laszczak
Hi, >On 10/12/18 7:42 AM, Peter Chen wrote: +static struct usb_ep *cdns3_gadget_match_ep(struct usb_gadget *gadget, + struct usb_endpoint_descriptor *desc, + struct usb_ss_ep_comp_descriptor

Re: [RFC PATCH 0/2] USB: DTS: allow suggesting busnumber for platform USB bus via DTS alias

2018-12-11 Thread Rob Herring
On Tue, Nov 27, 2018 at 04:57:05PM +, David R. Piegdon wrote: > Hi, > > on our embedded systems we rely on systemd's persistent netdev names. > Those currently do not work for USB netdevs that are connected to a > platform USB bus. > > In https://github.com/systemd/systemd/pull/7273 a systemd

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

2018-12-11 Thread Kyle Tso
On Fri, Dec 7, 2018 at 1:56 AM Guenter Roeck wrote: > > On Thu, Dec 06, 2018 at 11:02:27AM +0800, 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

Re: [PATCH v1 2/2] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-11 Thread Peter Chen
> >> +tmode = le16_to_cpu(ctrl->wIndex); > >> + > >> +if (!set || (tmode & 0xff) != 0) > >> +return -EINVAL; > >> + > >> +switch (tmode >> 8) { > >> +case TEST_J: > >> +case TEST_K: > >> +case TEST_SE0_NAK:

RE: [PATCH] usb: renesas_usbhs: mark PM functions as __maybe_unused

2018-12-11 Thread Yoshihiro Shimoda
Hi Arnd, Thank you for the patch! > From: Arnd Bergmann, Sent: Tuesday, December 11, 2018 7:06 PM > To: Greg Kroah-Hartman > Cc: Arnd Bergmann ; Yoshihiro Shimoda > ; Felipe Balbi > ; Simon Horman ; > Chris Brandt ; > linux-usb@vger.kernel.org; linux-ker...@vger.kernel.org > Subject: [PATCH] u

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

2018-12-11 Thread Kyle Tso
On Mon, Dec 10, 2018 at 7:36 PM Adam Thomson wrote: > > 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

RE: [PATCH v1 2/2] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-11 Thread Felipe Balbi
Hi Pawel Laszczak writes: >>> + cdns->phy = devm_phy_get(dev, "cdns3,usbphy"); >>> + if (IS_ERR(cdns->phy)) { >>> + ret = PTR_ERR(cdns->phy); >>> + if (ret == -ENOSYS || ret == -ENODEV) { >> >>Are you sure you can get ENOSYS here? Have you checked output of >>checkpatch -

Re: [PATCH v1 2/2] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-11 Thread Felipe Balbi
Peter Chen writes: >> >> +tmode = le16_to_cpu(ctrl->wIndex); >> >> + >> >> +if (!set || (tmode & 0xff) != 0) >> >> +return -EINVAL; >> >> + >> >> +switch (tmode >> 8) { >> >> +case TEST_J: >> >> +case TEST_K: >> >> +

RE: [PATCH v1 2/2] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-11 Thread Peter Chen
> >> >> + USB_CMD_STMODE | > >> >> + > >> >> + USB_STS_TMODE_SEL(tmode - 1)); > >> > > >> >I'm 90% sure this won't work. There's a reason why we only enter the > >> >requested test mode from status stage. How have you tested this? > >> > > > > What's the

[PATCH] USB: serial: option: add Simcom SIM7500/SIM7600 (MBIM mode)

2018-12-11 Thread Jörgen Storvist
Added USB serial option driver support for Simcom SIM7500/SIM7600 series cellular modules exposing MBIM interface (VID 0x1e0e,PID 0x9003) Signed-off-by: Jörgen Storvist --- usb-devices T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 14 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00