[PATCH] net: usb: Merge cpu_to_le32s + memcpy to put_unaligned_le32

2019-07-22 Thread Chuhong Yuan
Merge the combo uses of cpu_to_le32s and memcpy. Use put_unaligned_le32 instead. This simplifies the code. Signed-off-by: Chuhong Yuan --- drivers/net/usb/asix_common.c | 9 - drivers/net/usb/ax88179_178a.c | 11 --- drivers/net/usb/lan78xx.c | 11 --- drivers/net/

Re: [PATCH 1/3] Revert "usb: usb251xb: Add US lanes inversion dts-bindings"

2019-07-22 Thread Marco Felsch
Hi Serge, On 19-07-19 13:13, Serge Semin wrote: > Hello Lucas > > On Fri, Jul 19, 2019 at 10:44:05AM +0200, Lucas Stach wrote: > > This reverts commit 3342ce35a1, as there is no need for this separate > > property and it breaks compatibility with existing devicetree files > > (arch/arm64/boot/dts

Re: Titan Ridge xHCI may stop to working after re-plugging the dock

2019-07-22 Thread Kai-Heng Feng
Hi Felipe, at 18:51, Felipe Balbi wrote: Hi, Kai Heng Feng writes: Oliver Neukum writes: Am Dienstag, den 09.07.2019, 21:10 +0800 schrieb Kai-Heng Feng: Hi Mika and Mathias, I’ve filed a bug [1] which renders docking station unusable. I am not sure it's a bug in PCI, Thunderbolt or xH

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

2019-07-22 Thread Pawel Laszczak
Hi, > >> 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. > >I see you are using debugfs to sele

RE: [PATCH v10 2/6] usb:common Separated decoding functions from dwc3 driver.

2019-07-22 Thread Pawel Laszczak
Hi, > >On Sun, 2019-07-21 at 19:32 +0100, Pawel Laszczak wrote: >> Patch moves some decoding functions from driver/usb/dwc3/debug.h driver >> to driver/usb/common/debug.c file. These moved functions include: >[] >> diff --git a/drivers/usb/common/debug.c b/drivers/usb/common/debug.c >[] >> +static

RE: [PATCH v10 3/6] usb:common Patch simplify usb_decode_set_clear_feature function.

2019-07-22 Thread Pawel Laszczak
> > >On Sun, 2019-07-21 at 19:32 +0100, Pawel Laszczak wrote: >> Patch adds usb_decode_test_mode and usb_decode_device_feature functions, >> which allow to make more readable and simplify the >> usb_decode_set_clear_feature function. > > I need to read entire patch series before >commenting more I

[PATCH v3] usb-storage: Add a limitation for blk_queue_max_hw_sectors()

2019-07-22 Thread Yoshihiro Shimoda
This patch fixes an issue that the following error happens on swiotlb environment: xhci-hcd ee00.usb: swiotlb buffer is full (sz: 524288 bytes), total 32768 (slots), used 1338 (slots) On the kernel v5.1, block settings of a usb-storage with SuperSpeed were the following so that the b

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

2019-07-22 Thread gre...@linuxfoundation.org
On Mon, Jul 22, 2019 at 09:58:42AM +, Pawel Laszczak wrote: > Hi, > > > > >> 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

Re: [PATCH v10 2/6] usb:common Separated decoding functions from dwc3 driver.

2019-07-22 Thread gre...@linuxfoundation.org
On Mon, Jul 22, 2019 at 10:06:38AM +, Pawel Laszczak wrote: > Hi, > > > > >On Sun, 2019-07-21 at 19:32 +0100, Pawel Laszczak wrote: > >> Patch moves some decoding functions from driver/usb/dwc3/debug.h driver > >> to driver/usb/common/debug.c file. These moved functions include: > >[] > >> dif

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

2019-07-22 Thread Pavel Machek
Hi! > > >> 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. > > > > > >I see you

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

2019-07-22 Thread gre...@linuxfoundation.org
On Mon, Jul 22, 2019 at 01:56:45PM +0200, Pavel Machek wrote: > Hi! > > > > >> 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), Periph

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

2019-07-22 Thread Pawel Laszczak
> >Hi! > >> > >> 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. >> > > >> >

WARNING in shark_write_val/usb_submit_urb

2019-07-22 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:6a3599ce 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.txt?x=138da9d060 kernel config: https://syzkaller.appspot.com/x/.

WARNING in amradio_send_cmd/usb_submit_urb

2019-07-22 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:6a3599ce 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.txt?x=111a1ed060 kernel config: https://syzkaller.appspot.com/x/.

Regression xhci_hcd: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state

2019-07-22 Thread Bernhard Gebetsberger
Hi Mathias, around 1.5 weeks ago I've sent the dmesg log and xhci_hcd tracing file to you. Is there anything else that needs to be provided? How should we precede otherwise? The problem occurs since kernel version 4.20 and it looks like more and more people are affected by this, most of them b

[PATCH v4 1/6] usb: gadget: u_serial: add missing port entry locking

2019-07-22 Thread Michał Mirosław
gserial_alloc_line() misses locking (for a release barrier) while resetting port entry on TTY allocation failure. Fix this. Cc: sta...@vger.kernel.org Signed-off-by: Michał Mirosław Reviewed-by: Greg Kroah-Hartman Tested-by: Ladislav Michl --- v4: no changes v3: cc-stable v2: no changes

[PATCH v4 3/6] usb: gadget: u_serial: make OBEX port not a console

2019-07-22 Thread Michał Mirosław
Prevent OBEX serial port from ever becoming a console. Console messages will definitely break the protocol, and since you have to instantiate the port making it explicitly for OBEX, there is no point in allowing console to break it by mistake. Signed-off-by: Michał Mirosław Reviewed-by: Greg Kroa

[PATCH v4 0/6] usb: gadget: u_serial: console improvements

2019-07-22 Thread Michał Mirosław
This series makes it possible to have more control over console using USB serial gadget ports. This can be useful when you need more than one USB console or are configuring multiple serial port function via configfs. The patches are against usb-next tree. You can also pull from: https://rere.qm

[PATCH v4 6/6] USB: gadget: legacy/serial: allow dynamic removal

2019-07-22 Thread Michał Mirosław
Legacy serial USB gadget is still useful as an early console, before userspace is up. Later it could be replaced with proper configfs-configured composite gadget - that use case is enabled by this patch. Signed-off-by: Michał Mirosław --- v4: initial revision, new in the patchset --- drivers

[PATCH v4 5/6] usb: gadget: u_serial: diagnose missed console messages

2019-07-22 Thread Michał Mirosław
Insert markers in console stream marking places where data is missing. This makes the hole in the data stand out clearly instead of glueing together unrelated messages. Example output as seen from USB host side: [0.064078] pinctrl core: registered pin 16 (UART3_RTS_N PC0) on 7868.pinmux

[PATCH v4 2/6] usb: gadget: u_serial: reimplement console support

2019-07-22 Thread Michał Mirosław
Rewrite console support to fix a few shortcomings of the old code preventing its use with multiple ports. This removes some duplicated code and replaces a custom kthread with simpler workqueue item. Only port ttyGS0 gets to be a console for now. Signed-off-by: Michał Mirosław Reviewed-by: Greg K

[PATCH v4 4/6] usb: gadget: u_serial: allow more console gadget ports

2019-07-22 Thread Michał Mirosław
Allow configuring more than one console using USB serial or ACM gadget. By default, only first (ttyGS0) is a console, but this may be changed using function's new "console" attribute. Signed-off-by: Michał Mirosław --- v4: fixed locking in gserial_set_console() v3: no changes v2: no chang

[PATCH v5 0/6] usb: gadget: u_serial: console improvements

2019-07-22 Thread Michał Mirosław
This series makes it possible to have more control over console using USB serial gadget ports. This can be useful when you need more than one USB console or are configuring multiple serial port function via configfs. The patches are against usb-next tree. You can also pull from: https://rere.qm

[PATCH v5 1/6] usb: gadget: u_serial: add missing port entry locking

2019-07-22 Thread Michał Mirosław
gserial_alloc_line() misses locking (for a release barrier) while resetting port entry on TTY allocation failure. Fix this. Cc: sta...@vger.kernel.org Signed-off-by: Michał Mirosław Reviewed-by: Greg Kroah-Hartman Tested-by: Ladislav Michl --- v5: no changes v4: no changes v3: cc-stable

[PATCH v5 5/6] usb: gadget: u_serial: diagnose missed console messages

2019-07-22 Thread Michał Mirosław
Insert markers in console stream marking places where data is missing. This makes the hole in the data stand out clearly instead of glueing together unrelated messages. Example output as seen from USB host side: [0.064078] pinctrl core: registered pin 16 (UART3_RTS_N PC0) on 7868.pinmux

[PATCH v5 2/6] usb: gadget: u_serial: reimplement console support

2019-07-22 Thread Michał Mirosław
Rewrite console support to fix a few shortcomings of the old code preventing its use with multiple ports. This removes some duplicated code and replaces a custom kthread with simpler workqueue item. Only port ttyGS0 gets to be a console for now. Signed-off-by: Michał Mirosław Reviewed-by: Greg K

[PATCH v5 4/6] usb: gadget: u_serial: allow more console gadget ports

2019-07-22 Thread Michał Mirosław
Allow configuring more than one console using USB serial or ACM gadget. By default, only first (ttyGS0) is a console, but this may be changed using function's new "console" attribute. Signed-off-by: Michał Mirosław --- v5: fixed locking in gserial_get_console() v4: fixed locking in gserial_

[PATCH v5 3/6] usb: gadget: u_serial: make OBEX port not a console

2019-07-22 Thread Michał Mirosław
Prevent OBEX serial port from ever becoming a console. Console messages will definitely break the protocol, and since you have to instantiate the port making it explicitly for OBEX, there is no point in allowing console to break it by mistake. Signed-off-by: Michał Mirosław Reviewed-by: Greg Kroa

[PATCH v5 6/6] usb: gadget: legacy/serial: allow dynamic removal

2019-07-22 Thread Michał Mirosław
Legacy serial USB gadget is still useful as an early console, before userspace is up. Later it could be replaced with proper configfs-configured composite gadget - that use case is enabled by this patch. Signed-off-by: Michał Mirosław --- v5: no changes v4: initial revision, new in the patch

Re: [PATCH] phy: core: document calibrate() method

2019-07-22 Thread Marek Szyprowski
Hi Kishon, On 2019-07-19 14:25, Kishon Vijay Abraham I wrote: > On 19/07/19 5:51 PM, Marek Szyprowski wrote: >> On 2019-07-19 12:04, Kishon Vijay Abraham I wrote: >>> On 19/07/19 3:22 PM, Marek Szyprowski wrote: Commit 36914111e682 ("drivers: phy: add calibrate method") added support for

[PATCH v2] phy: core: document phy_calibrate()

2019-07-22 Thread Marek Szyprowski
Commit 36914111e682 ("drivers: phy: add calibrate method") added support for generic phy_calibrate() method, but it didn't explain in detail when such method is supposed to be called. Add some more documentation directly to the phy.h to make it clean that it is intended to be called after every hos

Re: [PATCH v2 1/2] usb: core: phy: add support for PHY calibration

2019-07-22 Thread Anand Moon
Hi Marek, On Fri, 19 Jul 2019 at 13:43, Marek Szyprowski wrote: > > Some PHYs (for example Exynos5 USB3.0 DRD PHY) require calibration to be > done after every USB HCD reset. Generic PHY framework has been already > extended with phy_calibrate() function in commit 36914111e682 ("drivers: > phy: a

Re: [PATCH v2 2/2] usb: dwc3: remove generic PHY calibrate() calls

2019-07-22 Thread Anand Moon
Hi Marek, On Fri, 19 Jul 2019 at 13:43, Marek Szyprowski wrote: > > Calls to USB2 generic PHY calibrate() method has been moved to HCD core, > which now successfully handles generic PHYs and their calibration after > every HCD reset. This fixes all the timing issues related to PHY > calibration d

Re: [PATCH] net: lan78xx: Merge memcpy + lexx_to_cpus to get_unaligned_lexx

2019-07-22 Thread David Miller
From: Chuhong Yuan Date: Fri, 19 Jul 2019 15:36:15 +0800 > Merge the combo use of memcpy and lexx_to_cpus. > Use get_unaligned_lexx instead. > This simplifies the code. > > Signed-off-by: Chuhong Yuan Applied.

Re: [PATCH] usbnet: smsc75xx: Merge memcpy + le32_to_cpus to get_unaligned_le32

2019-07-22 Thread David Miller
From: Chuhong Yuan Date: Fri, 19 Jul 2019 16:27:31 +0800 > Merge the combo use of memcpy and le32_to_cpus. > Use get_unaligned_le32 instead. > This simplifies the code. > > Signed-off-by: Chuhong Yuan Applied.

Re: [PATCH] ax88179_178a: Merge memcpy + le32_to_cpus to get_unaligned_le32

2019-07-22 Thread David Miller
From: Chuhong Yuan Date: Fri, 19 Jul 2019 17:07:15 +0800 > Merge the combo use of memcpy and le32_to_cpus. > Use get_unaligned_le32 instead. > This simplifies the code. > > Signed-off-by: Chuhong Yuan Applied.

Re: [PATCH v2 1/2] usbip: Skip DMA mapping and unmapping for urb at vhci

2019-07-22 Thread shuah
Hi Suwan, On 7/5/19 10:43 AM, Suwan Kim wrote: vhci doesn’t do DMA for remote device. Actually, the real DMA operation is done by network card driver. vhci just passes virtual address of the buffer to the network stack, so vhci doesn’t use and need dma address of the buffer of the URB. When it

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

2019-07-22 Thread Pavel Machek
On Mon 2019-07-22 13:56:44, Pavel Machek wrote: > Hi! > > > > >> 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

Enumeration of USB keyboard connected to dock fails during boot

2019-07-22 Thread Rohan Hendrik Jotz-Lean
Hi, I have a USB keyboard that works in UEFI apps (and grub) but if plugged into a dock stops working when Linux boots. It works when hotplugged into the dock or plugged into the laptop directly before or after booting. A mouse plugged into the dock does not share this problem. (I have no other ke

Re: [PATCH] net: usb: Merge cpu_to_le32s + memcpy to put_unaligned_le32

2019-07-22 Thread David Miller
From: Chuhong Yuan Date: Mon, 22 Jul 2019 15:41:34 +0800 > Merge the combo uses of cpu_to_le32s and memcpy. > Use put_unaligned_le32 instead. > This simplifies the code. > > Signed-off-by: Chuhong Yuan Isn't the skb->data aligned to 4 bytes in these situations? If so, we should use the aligne

Re: [PATCH] net: usb: Merge cpu_to_le32s + memcpy to put_unaligned_le32

2019-07-22 Thread Chuhong Yuan
David Miller 于2019年7月23日周二 上午9:22写道: > > From: Chuhong Yuan > Date: Mon, 22 Jul 2019 15:41:34 +0800 > > > Merge the combo uses of cpu_to_le32s and memcpy. > > Use put_unaligned_le32 instead. > > This simplifies the code. > > > > Signed-off-by: Chuhong Yuan > > Isn't the skb->data aligned to 4 by

Re: [PATCH v5 2/6] usb: gadget: u_serial: reimplement console support

2019-07-22 Thread Baolin Wang
Hi Michal, On Mon, 22 Jul 2019 at 23:26, Michał Mirosław wrote: > > Rewrite console support to fix a few shortcomings of the old code > preventing its use with multiple ports. This removes some duplicated > code and replaces a custom kthread with simpler workqueue item. Could you elaborate on wh

[PATCH] usb: chipidea: msm: Use device-managed registration API

2019-07-22 Thread Chuhong Yuan
Use devm_reset_controller_register to get rid of manual unregistration. Signed-off-by: Chuhong Yuan --- drivers/usb/chipidea/ci_hdrc_msm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/usb/chipidea/ci_hdrc_msm.c b/drivers/usb/chipidea/ci_hdrc_msm.c index bb4645a

Re: [PATCH v4 4/6] usb: gadget: u_serial: allow more console gadget ports (fwd)

2019-07-22 Thread Julia Lawall
i , Greg Kroah-Hartman , Ladislav Michl Hi "Micha??, I love your patch! Perhaps something to improve: [auto build test WARNING on linus/master] [cannot apply to v5.3-rc1 next-20190722] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: [PATCH] net: usb: Merge cpu_to_le32s + memcpy to put_unaligned_le32

2019-07-22 Thread David Miller
From: Chuhong Yuan Date: Tue, 23 Jul 2019 10:16:27 +0800 > David Miller 于2019年7月23日周二 上午9:22写道: >> >> From: Chuhong Yuan >> Date: Mon, 22 Jul 2019 15:41:34 +0800 >> >> > Merge the combo uses of cpu_to_le32s and memcpy. >> > Use put_unaligned_le32 instead. >> > This simplifies the code. >> > >>

Re: [PATCH v2 2/2] usbip: Implement SG support to vhci

2019-07-22 Thread shuah
On 7/5/19 10:43 AM, Suwan Kim wrote: There are bugs on vhci with usb 3.0 storage device. Originally, vhci doesn't supported SG, so USB storage driver on vhci breaks SG list grammar - Currently vhci doesn't support? into multiple URBs and it causes error that a transfer got terminated too earl

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

2019-07-22 Thread Pawel Laszczak
Hi, >On Mon 2019-07-22 13:56:44, Pavel Machek wrote: >> Hi! >> >> > > >> 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