Re: [PATCH] From: cy_huang Subject: usb: add more vendor defined ops in tcpci

2019-08-15 Thread Greg KH
On Thu, Aug 15, 2019 at 12:19:13PM +0800, cy_huang wrote: > From: cy_huang Your subject line is a bit odd :) Also, we need a "real" name here, and in the signed-off-by line, not an email prefix. Please fix up and resend. thanks, greg k-h

Re: [PATCH] From: cy_huang Subject: usb: add more vendor defined ops in tcpci

2019-08-15 Thread Greg KH
On Thu, Aug 15, 2019 at 12:19:13PM +0800, cy_huang wrote: > diff --git a/drivers/usb/typec/tcpm/tcpci.h b/drivers/usb/typec/tcpm/tcpci.h > index 303ebde..a6754fb 100644 > --- a/drivers/usb/typec/tcpm/tcpci.h > +++ b/drivers/usb/typec/tcpm/tcpci.h > @@ -130,6 +130,11 @@ struct tcpci_data { >

Re: [PATCH] From: cy_huang Subject: usb: add more vendor defined ops in tcpci

2019-08-15 Thread 啟原黃
Greg KH 於 2019年8月15日 週四 下午3:14寫道: > > On Thu, Aug 15, 2019 at 12:19:13PM +0800, cy_huang wrote: > > diff --git a/drivers/usb/typec/tcpm/tcpci.h b/drivers/usb/typec/tcpm/tcpci.h > > index 303ebde..a6754fb 100644 > > --- a/drivers/usb/typec/tcpm/tcpci.h > > +++ b/drivers/usb/typec/tcpm/tcpci.h > > @

[PATCHv2] USB: serial: option: Add Motorola modem UARTs

2019-08-15 Thread Tony Lindgren
On Motorola Mapphone devices such as Droid 4 there are five USB ports that do not use the same layout as Gobi 1K/2K/etc devices listed in qcserial.c. So we should use qcaux.c or option.c as noted by Dan Williams . As the Motorola USB serial ports have an interrupt endpoint as shown with lsusb -v,

USB disconnect due to error from flowcontrol urb

2019-08-15 Thread Bjoern
Hi, I'm running on Ubuntu Bionic 4.14.94-155 on an odroid-x4 (armhf). I have a FT230X Basic UART (0403:6015) plugged into the exynos-ohci USB. The device is linked via a udev rule to a "symbolic/virtual" device so that the software FHEM can address it independent of the real ttyUSB* name.

Re: USB disconnect due to error from flowcontrol urb

2019-08-15 Thread Greg KH
On Thu, Aug 15, 2019 at 10:41:05AM +0200, Bjoern wrote: > Hi, > > > I'm running on Ubuntu Bionic 4.14.94-155 on an odroid-x4 (armhf). > > > I have a FT230X Basic UART (0403:6015) plugged into the exynos-ohci USB. The > device is linked via a udev rule to a "symbolic/virtual" device so that the

Re: [PATCHv2] USB: serial: option: Add Motorola modem UARTs

2019-08-15 Thread Pavel Machek
On Thu 2019-08-15 01:26:02, Tony Lindgren wrote: > On Motorola Mapphone devices such as Droid 4 there are five USB ports > that do not use the same layout as Gobi 1K/2K/etc devices listed in > qcserial.c. So we should use qcaux.c or option.c as noted by > Dan Williams . > > As the Motorola USB ser

Re: [PATCH] net: usbnet: fix a memory leak bug

2019-08-15 Thread Oliver Neukum
Am Mittwoch, den 14.08.2019, 12:41 -0500 schrieb Wenwen Wang: > In usbnet_start_xmit(), 'urb->sg' is allocated through kmalloc_array() by > invoking build_dma_sg(). Later on, if 'CONFIG_PM' is defined and the if > branch is taken, the execution will go to the label 'deferred'. However, > 'urb->sg'

Re: dwc2 / Raspberry Pi - hardware bug for small transfers results in memory corruption

2019-08-15 Thread Oliver Neukum
Am Mittwoch, den 14.08.2019, 16:59 +0100 schrieb Jonathan Bell: > As reported by one of our users here: > https://github.com/raspberrypi/linux/issues/3148 > > There is a bug when the dwc2 core receives USB data packets that are > between 1 and 4 bytes in length - 4 bytes are always written to memo

Re: kexec on rk3399

2019-08-15 Thread Robin Murphy
On 15/08/2019 07:06, Felipe Balbi wrote: Hi, Vicente Bergas writes: On Wednesday, August 14, 2019 3:12:26 PM CEST, Robin Murphy wrote: On 14/08/2019 13:53, Vicente Bergas wrote: On Monday, July 22, 2019 4:31:27 PM CEST, Vicente Bergas wrote: ... This particular change looks like it's imp

Re: [PATCH v10 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-08-15 Thread Roger Quadros
Pawel, On 21/07/2019 21:32, Pawel Laszczak wrote: > This patch introduce new Cadence USBSS DRD driver to Linux kernel. > > The Cadence USBSS DRD Controller is a highly configurable IP Core which > can be instantiated as Dual-Role Device (DRD), Peripheral Only and > Host Only (XHCI)configurations.

Re: [PATCHv2] USB: serial: option: Add Motorola modem UARTs

2019-08-15 Thread Johan Hovold
On Thu, Aug 15, 2019 at 01:26:02AM -0700, Tony Lindgren wrote: > On Motorola Mapphone devices such as Droid 4 there are five USB ports > that do not use the same layout as Gobi 1K/2K/etc devices listed in > qcserial.c. So we should use qcaux.c or option.c as noted by > Dan Williams . > > As the Mo

Re: dwc2 / Raspberry Pi - hardware bug for small transfers results in memory corruption

2019-08-15 Thread Jonathan Bell
On Thu, Aug 15, 2019 at 11:55 AM Oliver Neukum wrote: > > Am Mittwoch, den 14.08.2019, 16:59 +0100 schrieb Jonathan Bell: > > As reported by one of our users here: > > https://github.com/raspberrypi/linux/issues/3148 > > > > There is a bug when the dwc2 core receives USB data packets that are > >

Re: [PATCH 1/2] usb: serial: option: Add the BroadMobi BM818 card

2019-08-15 Thread Johan Hovold
On Mon, Aug 05, 2019 at 03:44:30PM +0100, Bob Ham wrote: > On 05/08/2019 12:47, Johan Hovold wrote: > > On Wed, Jul 24, 2019 at 07:52:26AM -0700, Angus Ainslie (Purism) wrote: > >> From: Bob Ham > >> > >> Add a VID:PID for the BroadModi BM818 M.2 card > > > > Would you mind posting the output of

AW: AW: Strange behaviour of D-Link DUB-1312 USB 3.0 Adapters

2019-08-15 Thread Schmid, Carsten
>> I don't think its a regression. > > It would be better to know than to assume. > Happens with kernel 4.14.102 also, not only with 4.14.129. Looks more HW related. > >> Is there something i can do to force an error message to be seen >> when the ETH2USB adapter stalls? > > You can activate dynam

Re: [PATCH v10 0/6] Introduced new Cadence USBSS DRD Driver.

2019-08-15 Thread Roger Quadros
Felipe & Alan, On 21/07/2019 21:32, Pawel Laszczak wrote: > This patch introduce new Cadence USBSS DRD driver to linux kernel. > > The Cadence USBSS DRD Controller is a highly configurable IP Core which > can be instantiated as Dual-Role Device (DRD), Peripheral Only and > Host Only (XHCI)configu

Re: [PATCH 1/2] usb: serial: option: Add the BroadMobi BM818 card

2019-08-15 Thread Bob Ham
On 15/08/2019 12:49, Johan Hovold wrote: > On Mon, Aug 05, 2019 at 03:44:30PM +0100, Bob Ham wrote: >> On 05/08/2019 12:47, Johan Hovold wrote: >>> On Wed, Jul 24, 2019 at 07:52:26AM -0700, Angus Ainslie (Purism) wrote: From: Bob Ham Add a VID:PID for the BroadModi BM818 M.2 card >>

Re: [PATCH 1/2] usb: serial: option: Add the BroadMobi BM818 card

2019-08-15 Thread Johan Hovold
On Thu, Aug 15, 2019 at 01:19:19PM +0100, Bob Ham wrote: > On 15/08/2019 12:49, Johan Hovold wrote: > > On Mon, Aug 05, 2019 at 03:44:30PM +0100, Bob Ham wrote: > >> On 05/08/2019 12:47, Johan Hovold wrote: > >>> On Wed, Jul 24, 2019 at 07:52:26AM -0700, Angus Ainslie (Purism) wrote: > From: B

Re: [PATCH] usb: host: ohci-pxa27x: Fix and & vs | typo

2019-08-15 Thread Greg Kroah-Hartman
On Wed, Aug 14, 2019 at 05:04:14PM +0300, Dan Carpenter wrote: > I was looking at this code again today and I'm still convinced this > patch is correct. Should I resend? Please resend, it's not in my queue anywhere :(

Re: [PATCH v2 01/13] usb: ohci-nxp: enable compile-testing

2019-08-15 Thread Greg Kroah-Hartman
On Fri, Aug 09, 2019 at 04:40:27PM +0200, Arnd Bergmann wrote: > The driver hardcodes a hardware I/O address the way one should > generally not do, and this prevents both compile-testing, and > moving the platform to CONFIG_ARCH_MULTIPLATFORM. > > Change the code to be independent of the machine h

Re: [PATCH] USB: rio500: Fix lockdep violation

2019-08-15 Thread Greg KH
On Thu, Aug 08, 2019 at 02:23:00PM -0400, Alan Stern wrote: > On Thu, 8 Aug 2019, Greg KH wrote: > > > On Thu, Aug 08, 2019 at 01:34:08PM -0400, Alan Stern wrote: > > > The syzbot fuzzer found a lockdep violation in the rio500 driver: > > > > > >

Re: dwc2 / Raspberry Pi - hardware bug for small transfers results in memory corruption

2019-08-15 Thread Lars Melin
On 8/14/2019 22:59, Jonathan Bell wrote: There is a bug when the dwc2 core receives USB data packets that are between 1 and 4 bytes in length - 4 bytes are always written to memory where the non-packet bytes are garbage. Which host controller driver, dwc2 or the out-of-tree dwc_otg driver? Tha

Re: [PATCH] usb: usbfs: only account once for mmap()'ed usb memory usage

2019-08-15 Thread Greg KH
On Wed, Aug 14, 2019 at 02:29:24PM -0700, gavi...@thegavinli.com wrote: > From: Gavin Li > > Memory usage for USB memory allocated via mmap() is already accounted > for at mmap() time; no need to account for it again at submiturb time. > > Signed-off-by: Gavin Li > --- > drivers/usb/core/devio

Re: [PATCH] usb: typec: fusb302: Call fusb302_debugfs_init earlier

2019-08-15 Thread Greg Kroah-Hartman
On Tue, Aug 13, 2019 at 01:52:16PM +0300, Heikki Krogerus wrote: > Hi Hans, > > On Tue, Aug 13, 2019 at 12:15:24PM +0200, Hans de Goede wrote: > > tcpm_register_port() will call some of the fusb302 code's callbacks > > wich in turn will call fusb302_log(). So we need to call > > fusb302_debugfs_in

Re: dwc2 / Raspberry Pi - hardware bug for small transfers results in memory corruption

2019-08-15 Thread Jonathan Bell
On Thu, Aug 15, 2019 at 1:51 PM Lars Melin wrote: > > On 8/14/2019 22:59, Jonathan Bell wrote: > > There is a bug when the dwc2 core receives USB data packets that are > > between 1 and 4 bytes in length - 4 bytes are always written to memory > > where the non-packet bytes are garbage. > > Which h

Re: [PATCH 0/3] usb: typec: fusb302: Small changes

2019-08-15 Thread Greg Kroah-Hartman
On Wed, Aug 14, 2019 at 03:42:46PM +0200, Hans de Goede wrote: > Hi, > > On 14-08-19 15:24, Heikki Krogerus wrote: > > Hi, > > > > This series removes the deprecated fusb302 specific properties, and > > stops using struct tcpc_config in the driver. > > Series looks good to me: > > Reviewed-by:

[PATCH v2] USB: phy: fsl-usb: convert platform driver to use dev_groups

2019-08-15 Thread Greg Kroah-Hartman
Platform drivers now have the option to have the platform core create and remove any needed sysfs attribute files. So take advantage of that and do not register "by hand" any sysfs files. Cc: Felipe Balbi Signed-off-by: Greg Kroah-Hartman --- v2: fix build errors caught by 0-day drivers/usb/p

Re: [PATCH 6/6] driver core: initialize a default DMA mask for platform device

2019-08-15 Thread Greg Kroah-Hartman
On Sun, Aug 11, 2019 at 10:05:20AM +0200, Christoph Hellwig wrote: > We still treat devices without a DMA mask as defaulting to 32-bits for > both mask, but a few releases ago we've started warning about such > cases, as they require special cases to work around this sloppyness. > Add a dma_mask fi

Re: [PATCH 00/14] ARM: move lpc32xx and dove to multiplatform

2019-08-15 Thread Arnd Bergmann
On Thu, Aug 1, 2019 at 9:33 AM Arnd Bergmann wrote: > > On Thu, Aug 1, 2019 at 12:53 AM Russell King - ARM Linux admin > wrote: > > > > On Wed, Jul 31, 2019 at 09:56:42PM +0200, Arnd Bergmann wrote: > > > For dove, the patches are basically what I had proposed back in > > > 2015 when all other AR

Re: next take at setting up a dma mask by default for platform devices

2019-08-15 Thread Greg Kroah-Hartman
On Sun, Aug 11, 2019 at 10:05:14AM +0200, Christoph Hellwig wrote: > Hi all, > > this is another attempt to make sure the dma_mask pointer is always > initialized for platform devices. Not doing so lead to lots of > boilerplate code, and makes platform devices different from all our > major busse

Re: [PATCH v5 0/2] usbip: Implement SG support

2019-08-15 Thread Greg KH
On Wed, Aug 14, 2019 at 06:19:51AM -0700, Christoph Hellwig wrote: > FYI, I think my > >"usb: add a HCD_DMA flag instead of guestimating DMA capabilities" > > is the proper core fix for what your patch 1 works around, as the USB > core should not assume DMA capabilities based on the presence

Re: next take at setting up a dma mask by default for platform devices

2019-08-15 Thread Christoph Hellwig
On Thu, Aug 15, 2019 at 03:23:18PM +0200, Greg Kroah-Hartman wrote: > I've taken the first 2 patches for 5.3-final. Given that patch 3 needs > to be fixed, I'll wait for a respin of these before considering them. I have a respun version ready, but I'd really like to hear some comments from usb de

Re: divide error in usbtmc_generic_read

2019-08-15 Thread Oliver Neukum
Am Mittwoch, den 14.08.2019, 06:38 -0700 schrieb syzbot: > syzbot has tested the proposed patch but the reproducer still triggered > crash: > KASAN: use-after-free Read in usbtmc_disconnect I am afraid that is a difficiency in KASAN that should be fixed. Is the class of the error compared if I l

Re: [PATCH] usb: typec: fusb302: Call fusb302_debugfs_init earlier

2019-08-15 Thread Heikki Krogerus
On Thu, Aug 15, 2019 at 02:54:41PM +0200, Greg Kroah-Hartman wrote: > On Tue, Aug 13, 2019 at 01:52:16PM +0300, Heikki Krogerus wrote: > > Hi Hans, > > > > On Tue, Aug 13, 2019 at 12:15:24PM +0200, Hans de Goede wrote: > > > tcpm_register_port() will call some of the fusb302 code's callbacks > > >

Re: [PATCH 6/6] driver core: initialize a default DMA mask for platform device

2019-08-15 Thread Christoph Hellwig
On Wed, Aug 14, 2019 at 04:49:13PM +0100, Robin Murphy wrote: >> because we have to support platform_device structures that are >> statically allocated. > > This would be a good point to also get rid of the long-standing bodge in > platform_device_register_full(). platform_device_register_full lo

Re: [PATCH 6/6] driver core: initialize a default DMA mask for platform device

2019-08-15 Thread Christoph Hellwig
On Thu, Aug 15, 2019 at 03:03:25PM +0200, Greg Kroah-Hartman wrote: > > --- a/include/linux/platform_device.h > > +++ b/include/linux/platform_device.h > > @@ -24,6 +24,7 @@ struct platform_device { > > int id; > > boolid_auto; > > struct device dev; > > + u6

Re: [v2 08/10] scripts: Coccinelle script for namespace dependencies

2019-08-15 Thread Markus Elfring
> +generate_deps_for_ns() { > +$SPATCH --very-quiet --in-place --sp-file \ > + $srctree/scripts/coccinelle/misc/add_namespace.cocci -D ns=$1 $2 > +} * Where will the variable “srctree” be set for the file “scripts/nsdeps”? * Would you like to support a separate build directory for des

Re: [PATCH 0/3] usb: typec: fusb302: Small changes

2019-08-15 Thread Hans de Goede
Hi, On 15-08-19 14:55, Greg Kroah-Hartman wrote: On Wed, Aug 14, 2019 at 03:42:46PM +0200, Hans de Goede wrote: Hi, On 14-08-19 15:24, Heikki Krogerus wrote: Hi, This series removes the deprecated fusb302 specific properties, and stops using struct tcpc_config in the driver. Series looks g

Re: [PATCH 6/6] driver core: initialize a default DMA mask for platform device

2019-08-15 Thread Greg Kroah-Hartman
On Thu, Aug 15, 2019 at 03:38:12PM +0200, Christoph Hellwig wrote: > On Thu, Aug 15, 2019 at 03:03:25PM +0200, Greg Kroah-Hartman wrote: > > > --- a/include/linux/platform_device.h > > > +++ b/include/linux/platform_device.h > > > @@ -24,6 +24,7 @@ struct platform_device { > > > int i

Re: next take at setting up a dma mask by default for platform devices

2019-08-15 Thread Greg Kroah-Hartman
On Thu, Aug 15, 2019 at 03:25:31PM +0200, Christoph Hellwig wrote: > On Thu, Aug 15, 2019 at 03:23:18PM +0200, Greg Kroah-Hartman wrote: > > I've taken the first 2 patches for 5.3-final. Given that patch 3 needs > > to be fixed, I'll wait for a respin of these before considering them. > > I have

Re: [PATCH v5 0/2] usbip: Implement SG support

2019-08-15 Thread shuah
On 8/15/19 7:23 AM, Greg KH wrote: On Wed, Aug 14, 2019 at 06:19:51AM -0700, Christoph Hellwig wrote: FYI, I think my "usb: add a HCD_DMA flag instead of guestimating DMA capabilities" is the proper core fix for what your patch 1 works around, as the USB core should not assume DMA capabili

Re: divide error in usbtmc_generic_read

2019-08-15 Thread Oliver Neukum
Am Mittwoch, den 14.08.2019, 04:38 -0700 schrieb syzbot: > Hello, > > syzbot found the following crash on: > > HEAD commit:d0847550 usb-fuzzer: main usb gadget fuzzer driver > git tree: https://github.com/google/kasan.git usb-fuzzer > console output: https://syzkaller.appspot.com/x/log.

Re: dwc2 / Raspberry Pi - hardware bug for small transfers results in memory corruption

2019-08-15 Thread Alan Stern
On Thu, 15 Aug 2019, Jonathan Bell wrote: > On Thu, Aug 15, 2019 at 11:55 AM Oliver Neukum wrote: > > > > Am Mittwoch, den 14.08.2019, 16:59 +0100 schrieb Jonathan Bell: > > > As reported by one of our users here: > > > https://github.com/raspberrypi/linux/issues/3148 > > > > > > There is a bug w

Re: [PATCH v10 0/6] Introduced new Cadence USBSS DRD Driver.

2019-08-15 Thread Alan Stern
On Thu, 15 Aug 2019, Roger Quadros wrote: > Felipe & Alan, > > On 21/07/2019 21:32, Pawel Laszczak wrote: > > This patch introduce new Cadence USBSS DRD driver to linux kernel. > > > > The Cadence USBSS DRD Controller is a highly configurable IP Core which > > can be instantiated as Dual-Role De

Re: next take at setting up a dma mask by default for platform devices

2019-08-15 Thread Alan Stern
On Thu, 15 Aug 2019, Christoph Hellwig wrote: > On Thu, Aug 15, 2019 at 03:23:18PM +0200, Greg Kroah-Hartman wrote: > > I've taken the first 2 patches for 5.3-final. Given that patch 3 needs > > to be fixed, I'll wait for a respin of these before considering them. > > I have a respun version rea

Re: [PATCH] USB: rio500: Fix lockdep violation

2019-08-15 Thread Alan Stern
On Thu, 15 Aug 2019, Greg KH wrote: > On Thu, Aug 08, 2019 at 02:23:00PM -0400, Alan Stern wrote: > > On Thu, 8 Aug 2019, Greg KH wrote: > > > > > On Thu, Aug 08, 2019 at 01:34:08PM -0400, Alan Stern wrote: > > > > The syzbot fuzzer found a lockdep violation in the rio500 driver: > > > > > > > >

Re: divide error in usbtmc_generic_read

2019-08-15 Thread syzbot
Hello, syzbot has tested the proposed patch and the reproducer did not trigger crash: Reported-and-tested-by: syzbot+55b0304b360654a75...@syzkaller.appspotmail.com Tested on: commit: d0847550 usb-fuzzer: main usb gadget fuzzer driver git tree: https://github.com/google/kasa

Re: dwc2 / Raspberry Pi - hardware bug for small transfers results in memory corruption

2019-08-15 Thread Oliver Neukum
Am Donnerstag, den 15.08.2019, 12:41 +0100 schrieb Jonathan Bell: > On Thu, Aug 15, 2019 at 11:55 AM Oliver Neukum wrote: > > > > Am Mittwoch, den 14.08.2019, 16:59 +0100 schrieb Jonathan Bell: > > > As reported by one of our users here: > > > https://github.com/raspberrypi/linux/issues/3148 > >

Re: [PATCH] usb: typec: fusb302: Call fusb302_debugfs_init earlier

2019-08-15 Thread Guenter Roeck
On Thu, Aug 15, 2019 at 04:31:59PM +0300, Heikki Krogerus wrote: > > > > As Guenter points out, don't check this, just call it anb move on. > > > > But are you _SURE_ you want this to be the name, at the root of debugfs? > > Why not put it under the usb debugfs directory? > > That's a good point

Re: [PATCH] usb: typec: fusb302: Call fusb302_debugfs_init earlier

2019-08-15 Thread Hans de Goede
Hi, On 15-08-19 17:20, Guenter Roeck wrote: On Thu, Aug 15, 2019 at 04:31:59PM +0300, Heikki Krogerus wrote: As Guenter points out, don't check this, just call it anb move on. But are you _SURE_ you want this to be the name, at the root of debugfs? Why not put it under the usb debugfs directo

Re: [PATCH v5 0/2] usbip: Implement SG support

2019-08-15 Thread Suwan Kim
On Thu, Aug 15, 2019 at 08:10:49AM -0600, shuah wrote: > On 8/15/19 7:23 AM, Greg KH wrote: > > On Wed, Aug 14, 2019 at 06:19:51AM -0700, Christoph Hellwig wrote: > > > FYI, I think my > > > > > > "usb: add a HCD_DMA flag instead of guestimating DMA capabilities" > > > > > > is the proper cor

Re: [PATCH v2] usb: xhci-pci: reorder removal to avoid use-after-free

2019-08-15 Thread Hans de Goede
Hi, On 14-08-19 16:32, Schmid, Carsten wrote: On driver removal, the platform_device_unregister call attached through devm_add_action_or_reset was executed after usb_hcd_pci_remove. This lead to a use-after-free for the iomem resorce of the xhci-ext-caps driver in the platform removal because th

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

2019-08-15 Thread Heikki Krogerus
Hi Ajay, I'm really sorry for being so late with the review. On Mon, Aug 05, 2019 at 11:24:13AM -0700, Ajay Gupta wrote: > 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 sep

[PATCH RESEND] xhci: Prevent deadlock when xhci adapter breaks during init

2019-08-15 Thread Bill Kuzeja
The system can hit a deadlock if xhci adapter breaks while initializing. The deadlock is between two threads: thread 1 is tearing down the adapter and is stuck in usb_unlocked_disable_lpm waiting to lock the hcd->handwidth_mutex. Thread 2 is holding this mutex (while still trying to add a usb d

Re: [PATCH 0/3] usb: typec: fusb302: Small changes

2019-08-15 Thread Hans de Goede
Hi, On 14-08-19 15:24, Heikki Krogerus wrote: Hi, This series removes the deprecated fusb302 specific properties, and stops using struct tcpc_config in the driver. thanks, Heikki Krogerus (3): usb: typec: fusb302: Remove unused properties dt-bindings: usb: fusb302: Remove deprecated pro

[PATCH v2] USB: serial: ftdi_sio: add support for FT232H CBUS gpios

2019-08-15 Thread Matthew Michilot
Enable support for cbus gpios on FT232H. The cbus configuration is stored in one word in the EEPROM at byte-offset 0x1a with the mux config for ACBUS5, ACBUS6, ACBUS8 and ACBUS9 (only pins that can be configured as I/O mode). Tested using FT232H by configuring one ACBUS pin at a time. Signed-off-

Re: general protection fault in __pm_runtime_resume

2019-08-15 Thread Alan Stern
On Mon, 12 Aug 2019, syzbot wrote: > Hello, > > syzbot has tested the proposed patch and the reproducer did not trigger > crash: > > Reported-and-tested-by: > syzbot+3cbe5cd105d2ad56a...@syzkaller.appspotmail.com > > Tested on: > > commit: 7f7867ff usb-fuzzer: main usb gadget fuzze

[PATCH] usb: make comment block in line with coding style

2019-08-15 Thread Jacob Huisman
Comment block was not in accordance with coding style. Fixes two checkpatch warnings: WARNING: Block comments use * on subsequent lines WARNING: Block comments use a trailing */ on a separate line Signed-off-by: Jacob Huisman --- drivers/usb/usb-skeleton.c | 8 +--- 1 file changed, 5 inserti

Re: [PATCH 00/14] ARM: move lpc32xx and dove to multiplatform

2019-08-15 Thread Sylvain Lemieux
Hi Arnd, On 8/15/19 9:11 AM, Arnd Bergmann wrote: On Thu, Aug 1, 2019 at 9:33 AM Arnd Bergmann wrote: On Thu, Aug 1, 2019 at 12:53 AM Russell King - ARM Linux admin wrote: On Wed, Jul 31, 2019 at 09:56:42PM +0200, Arnd Bergmann wrote: For dove, the patches are basically what I had propose

Re: [PATCH] usb: usbfs: only account once for mmap()'ed usb memory usage

2019-08-15 Thread Alan Stern
On Wed, 14 Aug 2019 gavi...@thegavinli.com wrote: > From: Gavin Li > > Memory usage for USB memory allocated via mmap() is already accounted > for at mmap() time; no need to account for it again at submiturb time. > > Signed-off-by: Gavin Li > --- > drivers/usb/core/devio.c | 3 ++- > 1 file

[PATCH 3/3] usb: typec: fusb302: Call fusb302_debugfs_init earlier

2019-08-15 Thread Hans de Goede
tcpm_register_port() will call some of the fusb302 code's callbacks wich in turn will call fusb302_log(). So we need to call fusb302_debugfs_init() before we call tcpm_register_port(). This fixes the following warning, which was caused by the logbuffer_lock not yet being initialized (which is done

[PATCH 1/3] usb: typec: tcpm: Use usb_debug_root as root for our debugfs entry

2019-08-15 Thread Hans de Goede
Use usb_debug_root as root for our debugfs entry instead of creating our own subdirectory under the debugfs root. Another patch in this series will make the same change to the fusb302 driver, which also uses dev_name() (on the same device) for the debugfs entry name. So we also prefix dev_name() w

[PATCH 2/3] usb: typec: fusb: Use usb_debug_root as root for our debugfs entry

2019-08-15 Thread Hans de Goede
Use usb_debug_root as root for our debugfs entry instead of creating our own subdirectory under the debugfs root. Signed-off-by: Hans de Goede --- drivers/usb/typec/tcpm/fusb302.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/usb/typec/tcpm/fusb302.c b/driv

Re: [PATCH 0/3] usb: typec: fusb302: Small changes

2019-08-15 Thread Greg Kroah-Hartman
On Thu, Aug 15, 2019 at 07:26:42PM +0200, Hans de Goede wrote: > Hi, > > On 14-08-19 15:24, Heikki Krogerus wrote: > > Hi, > > > > This series removes the deprecated fusb302 specific properties, and > > stops using struct tcpc_config in the driver. > > > > thanks, > > > > Heikki Krogerus (3): >

Re: [PATCH 00/14] ARM: move lpc32xx and dove to multiplatform

2019-08-15 Thread Arnd Bergmann
On Thu, Aug 15, 2019 at 8:32 PM Sylvain Lemieux wrote: > On 8/15/19 9:11 AM, Arnd Bergmann wrote: > > On Thu, Aug 1, 2019 at 9:33 AM Arnd Bergmann wrote: > > I applied patches 12 and 13 into the soc tree now. There are some > > other pending multiplatform conversions (iop32x, ep93xx, lpc32xx, > >

Re: [PATCH 1/3] usb: typec: tcpm: Use usb_debug_root as root for our debugfs entry

2019-08-15 Thread Guenter Roeck
On Thu, Aug 15, 2019 at 09:18:13PM +0200, Hans de Goede wrote: > Use usb_debug_root as root for our debugfs entry instead of creating our > own subdirectory under the debugfs root. > > Another patch in this series will make the same change to the fusb302 > driver, which also uses dev_name() (on th

Re: [PATCH 2/3] usb: typec: fusb: Use usb_debug_root as root for our debugfs entry

2019-08-15 Thread Guenter Roeck
On Thu, Aug 15, 2019 at 09:18:14PM +0200, Hans de Goede wrote: > Use usb_debug_root as root for our debugfs entry instead of creating our > own subdirectory under the debugfs root. > > Signed-off-by: Hans de Goede Reviewed-by: Guenter Roeck > --- > drivers/usb/typec/tcpm/fusb302.c | 9 ++-

Re: [PATCH 3/3] usb: typec: fusb302: Call fusb302_debugfs_init earlier

2019-08-15 Thread Guenter Roeck
On Thu, Aug 15, 2019 at 09:18:15PM +0200, Hans de Goede wrote: > tcpm_register_port() will call some of the fusb302 code's callbacks > wich in turn will call fusb302_log(). So we need to call > fusb302_debugfs_init() before we call tcpm_register_port(). > > This fixes the following warning, which

Re: Policy to keep USB ports powered in low-power states

2019-08-15 Thread Duncan Laurie
On Wed, Aug 14, 2019 at 6:08 PM Nick Crews wrote: > > Adding Duncan Laurie who I think has some more intimate knowledge > of how this is implemented in HW. Duncan, could you correct or elaborate > on my answers below as you see fit? Also, sorry if I make some beginner > mistakes here, I'm just get

Re: [PATCH v3] usb: chipidea: add role switch class support

2019-08-15 Thread kbuild test robot
-nxp-com/usb-chipidea-add-role-switch-class-support/20190815-040028 config: arm-multi_v5_defconfig (attached as .config) compiler: arm-linux-gnueabi-gcc (GCC) 7.4.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x

RE: [PATCH v3] usb: chipidea: add role switch class support

2019-08-15 Thread Peter Chen
> > Changes for v3: > - Remove the patch usb: chipidea: replace ci_role with usb_role > as the existing ci->role usage can't map to usb_role. > - Use the suggested ci_hdrc_cable for reuse current role change > handling. > - Fix build robot warning by add usb_role head file. > You may need

Re: [PATCH v3] usb: chipidea: add role switch class support

2019-08-15 Thread kbuild test robot
-nxp-com/usb-chipidea-add-role-switch-class-support/20190815-040028 config: arm-multi_v5_defconfig (attached as .config) compiler: arm-linux-gnueabi-gcc (GCC) 7.4.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x

[PATCH 1/1] usb: chipidea: udc: don't do hardware access if gadget has stopped

2019-08-15 Thread Peter Chen
After _gadget_stop_activity is executed, we can consider the hardware operation for gadget has finished, and the udc can be stopped and enter low power mode. So, any later hardware operations (from usb_ep_ops APIs or usb_gadget_ops APIs) should be considered invalid, any deinitializatons has been c

Re: [PATCH] usb: usbfs: only account once for mmap()'ed usb memory usage

2019-08-15 Thread Gavin Li
It is done in usbdev_mmap(); it calls usbfs_increase_memory_usage() to account for the buffer it allocates. No additional memory (other than for the control structures) is needed when actually submitting the URB. On Thu, Aug 15, 2019 at 5:53 AM Greg KH wrote: > > On Wed, Aug 14, 2019 at 02:29:24P

Re: [PATCH v2] USB: phy: fsl-usb: convert platform driver to use dev_groups

2019-08-15 Thread Felipe Balbi
Hi, Greg Kroah-Hartman writes: > Platform drivers now have the option to have the platform core create > and remove any needed sysfs attribute files. So take advantage of that > and do not register "by hand" any sysfs files. > > Cc: Felipe Balbi > Signed-off-by: Greg Kroah-Hartman Acked-by:

next take at setting up a dma mask by default for platform devices v2

2019-08-15 Thread Christoph Hellwig
Hi all, this is another attempt to make sure the dma_mask pointer is always initialized for platform devices. Not doing so lead to lots of boilerplate code, and makes platform devices different from all our major busses like PCI where we always set up a dma_mask. In the long run this should also

[PATCH 2/6] usb: add a hcd_uses_dma helper

2019-08-15 Thread Christoph Hellwig
The USB buffer allocation code is the only place in the usb core (and in fact the whole kernel) that uses is_device_dma_capable, while the URB mapping code uses the uses_dma flag in struct usb_bus. Switch the buffer allocation to use the uses_dma flag used by the rest of the USB code, and create a

[PATCH 1/6] usb: don't create dma pools for HCDs with a localmem_pool

2019-08-15 Thread Christoph Hellwig
If the HCD provides a localmem pool we will never use the DMA pools, so don't create them. Fixes: b0310c2f09bb ("USB: use genalloc for USB HCs with local memory") Signed-off-by: Christoph Hellwig --- drivers/usb/core/buffer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --gi

[PATCH 6/6] driver core: initialize a default DMA mask for platform device

2019-08-15 Thread Christoph Hellwig
We still treat devices without a DMA mask as defaulting to 32-bits for both mask, but a few releases ago we've started warning about such cases, as they require special cases to work around this sloppyness. Add a dma_mask field to struct platform_device so that we can initialize the dma_mask pointe

[PATCH 4/6] usb/max3421: remove the dummy {un,}map_urb_for_dma methods

2019-08-15 Thread Christoph Hellwig
Now that we have an explicit HCD_DMA flag, there is not need to override these methods. Signed-off-by: Christoph Hellwig --- drivers/usb/host/max3421-hcd.c | 17 - 1 file changed, 17 deletions(-) diff --git a/drivers/usb/host/max3421-hcd.c b/drivers/usb/host/max3421-hcd.c index

[PATCH 3/6] usb: add a HCD_DMA flag instead of guestimating DMA capabilities

2019-08-15 Thread Christoph Hellwig
The usb core is the only major place in the kernel that checks for a non-NULL device dma_mask to see if a device is DMA capable. This is generally a bad idea, as all major busses always set up a DMA mask, even if the device is not DMA capable - in fact bus layers like PCI can't even know if a devi

[PATCH 5/6] dma-mapping: remove is_device_dma_capable

2019-08-15 Thread Christoph Hellwig
No users left. Signed-off-by: Christoph Hellwig --- include/linux/dma-mapping.h | 5 - 1 file changed, 5 deletions(-) diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index f7d1eea32c78..14702e2d6fa8 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapp

Re: [PATCH net-next v2 4/5] r8152: support skb_add_rx_frag

2019-08-15 Thread Eric Dumazet
On 8/13/19 5:42 AM, Hayes Wang wrote: > Use skb_add_rx_frag() to reduce the memory copy for rx data. > > Use a new list of rx_used to store the rx buffer which couldn't be > reused yet. > > Besides, the total number of rx buffer may be increased or decreased > dynamically. And it is limited by