[PATCH] USB: phy: twl6030: convert platform driver to use dev_groups

2019-08-06 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 --- drivers/usb/phy/phy-twl6030-usb.c | 12 +++-

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

2019-08-06 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 --- drivers/usb/phy/phy-fsl-usb.c | 12 ++-- 1

Re: [PATCH] USB: usbip: convert platform driver to use dev_groups

2019-08-06 Thread Greg Kroah-Hartman
On Mon, Aug 05, 2019 at 02:22:18PM -0600, shuah wrote: > On 8/5/19 1:36 PM, Greg Kroah-Hartman wrote: > > 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 fil

Re: [PATCH v8 00/11] add USB GPIO based connection detection driver

2019-08-06 Thread Chunfeng Yun
On Mon, 2019-08-05 at 12:06 +0200, Linus Walleij wrote: > On Wed, Jul 24, 2019 at 10:51 AM Chunfeng Yun > wrote: > > > Because the USB Connector is introduced and the requirement of > > usb-connector.txt binding, the old way using extcon to support > > USB Dual-Role switch is now deprecated, mea

RE: [PATCH 2/5] usb: chipidea: add role switch class support

2019-08-06 Thread Peter Chen
> > > > You may use connect bit at portsc since VBUS may not connect to SoC. > > By this way, disconnect can be decided but connect is a problem in current > driver, > as controller was stopped in low power mode so can't detect connection from > host, > unless we also update this behavior too.

RE: [PATCH 2/5] usb: chipidea: add role switch class support

2019-08-06 Thread Jun Li
> -Original Message- > From: Peter Chen > Sent: 2019年8月6日 15:52 > To: Jun Li ; Peter Chen > Cc: Greg Kroah-Hartman ; dl-linux-imx > ; USB list > Subject: RE: [PATCH 2/5] usb: chipidea: add role switch class support > > > > > > > > You may use connect bit at portsc since VBUS may not c

[PATCH] USB: Move wusbcore and UWB to staging as it is obsolete

2019-08-06 Thread Greg Kroah-Hartman
The UWB and wusbcore code is long obsolete, so let us just move the code out of the real part of the kernel and into the drivers/staging/ location with plans to remove it entirely in a few releases. Signed-off-by: Greg Kroah-Hartman --- MAINTAINERS | 15 +++-

Re: KASAN: slab-out-of-bounds Write in lg4ff_init

2019-08-06 Thread Oliver Neukum
Am Montag, den 05.08.2019, 16:53 +0200 schrieb Andrey Konovalov: > On Mon, Aug 5, 2019 at 4:34 PM Oliver Neukum wrote: > > > > Am Montag, den 05.08.2019, 05:38 -0700 schrieb syzbot: > > > Hello, > > > > > > syzbot found the following crash on: > > > > > > HEAD commit:e96407b4 usb-fuzzer: ma

Re: [PATCH] USB: Move wusbcore and UWB to staging as it is obsolete

2019-08-06 Thread Joe Perches
On Tue, 2019-08-06 at 12:15 +0200, Greg Kroah-Hartman wrote: > The UWB and wusbcore code is long obsolete, so let us just move the code > out of the real part of the kernel and into the drivers/staging/ > location with plans to remove it entirely in a few releases. [] > MAINTAINERS

Re: KASAN: slab-out-of-bounds Write in lg4ff_init

2019-08-06 Thread Oliver Neukum
Am Montag, den 05.08.2019, 05:38 -0700 schrieb syzbot: > Hello, > > syzbot found the following crash on: > > HEAD commit:e96407b4 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.tx

Re: KASAN: slab-out-of-bounds Write in lg4ff_init

2019-08-06 Thread syzbot
Hello, syzbot has tested the proposed patch but the reproducer still triggered crash: KASAN: slab-out-of-bounds Write in lg4ff_init logitech 0003:046D:C298.0001: unknown main item tag 0x0 logitech 0003:046D:C298.0001: unknown main item tag 0x0 logitech 0003:046D:C298.0001: hidraw0: USB HID v0

[PATCH] usb: setup authorized_default using usb_bus_notify

2019-08-06 Thread Thiébaud Weksteen
Currently, the authorized_default and interface_authorized_default attributes for HCD are set up after the uevent has been sent to userland. This creates a race condition where userland may fail to access this file when processing the event. Move the appending of these attributes earlier relying on

[PATCH net-next 3/5] r8152: use alloc_pages for rx buffer

2019-08-06 Thread Hayes Wang
Replace kmalloc_node() with alloc_pages() for rx buffer. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 31 +++ 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 44d832ceb516..401e56112365

[PATCH net-next 5/5] r8152: change rx_frag_head_sz and rx_max_agg_num dynamically

2019-08-06 Thread Hayes Wang
Let rx_frag_head_sz and rx_max_agg_num could be modified dynamically through the sysfs. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 119 ++-- 1 file changed, 115 insertions(+), 4 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/

[PATCH net-next 2/5] r8152: replace array with linking list for rx information

2019-08-06 Thread Hayes Wang
The original method uses an array to store the rx information. The new one uses a list to link each rx structure. Then, it is possible to increase/decrease the number of rx structure dynamically. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 187

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

2019-08-06 Thread Hayes Wang
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 RTL8152_MAX_RX_AGG. Signed-off-by: Hayes Wang --- d

[PATCH net-next 1/5] r8152: separate the rx buffer size

2019-08-06 Thread Hayes Wang
The different chips may accept different rx buffer sizes. The RTL8152 supports 16K bytes, and RTL8153 support 32K bytes. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/us

[PATCH net-next 0/5] RX improve

2019-08-06 Thread Hayes Wang
The different chips use different rx buffer size. Use skb_add_rx_frag() to reduce memory copy for RX. Hayes Wang (5): r8152: separate the rx buffer size r8152: replace array with linking list for rx information r8152: use alloc_pages for rx buffer r8152: support skb_add_rx_frag r8152: c

Re: [PATCH] USB: Move wusbcore and UWB to staging as it is obsolete

2019-08-06 Thread Greg Kroah-Hartman
On Tue, Aug 06, 2019 at 03:29:40AM -0700, Joe Perches wrote: > On Tue, 2019-08-06 at 12:15 +0200, Greg Kroah-Hartman wrote: > > The UWB and wusbcore code is long obsolete, so let us just move the code > > out of the real part of the kernel and into the drivers/staging/ > > location with plans to re

[RESEND][PATCH] usb: musb: sunxi: propagate devicetree node to glue pdev

2019-08-06 Thread Mans Rullgard
In order for devicetree nodes to be correctly associated with attached devices, the controller node needs to be propagated to the glue device. Signed-off-by: Mans Rullgard --- drivers/usb/musb/sunxi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/musb/sunxi.c b/drivers/usb/mu

Re: [PATCH] usb: setup authorized_default using usb_bus_notify

2019-08-06 Thread Greg Kroah-Hartman
On Tue, Aug 06, 2019 at 01:00:50PM +0200, Thiébaud Weksteen wrote: > Currently, the authorized_default and interface_authorized_default > attributes for HCD are set up after the uevent has been sent to userland. > This creates a race condition where userland may fail to access this > file when proc

[PATCH v4 0/2] usbip: Implement SG support

2019-08-06 Thread Suwan Kim
There are bugs on vhci with usb 3.0 storage device. In USB, each SG list entry buffer should be divisible by the bulk max packet size. But with native SG support, this problem doesn't matter because the SG buffer is treated as contiguous buffer. But without native SG support, USB storage driver bre

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

2019-08-06 Thread Suwan Kim
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. But HCD provides DMA mapping and unmapping function by def

[PATCH v4 2/2] usbip: Implement SG support to vhci-hcd and stub driver

2019-08-06 Thread Suwan Kim
There are bugs on vhci with usb 3.0 storage device. In USB, each SG list entry buffer should be divisible by the bulk max packet size. But with native SG support, this problem doesn't matter because the SG buffer is treated as contiguous buffer. But without native SG support, USB storage driver bre

Re: KASAN: use-after-free Read in device_release_driver_internal

2019-08-06 Thread Oliver Neukum
Am Donnerstag, den 01.08.2019, 14:47 -0400 schrieb Alan Stern: > > I think this must be caused by an unbalanced refcount. That is, > something must drop one more reference to the device than it takes. > That would explain why the invalid access occurs inside a single > bus_remove_device() call, b

Re: KMSAN: kernel-usb-infoleak in pcan_usb_pro_send_req

2019-08-06 Thread Oliver Neukum
Am Dienstag, den 30.07.2019, 02:38 -0700 schrieb syzbot: > Hello, > > syzbot found the following crash on: > > HEAD commit:41550654 [UPSTREAM] KVM: x86: degrade WARN to pr_warn_rate.. > git tree: kmsan > console output: https://syzkaller.appspot.com/x/log.txt?x=13e95183a0 > kernel c

Re: Re: KMSAN: kernel-usb-infoleak in pcan_usb_pro_send_req

2019-08-06 Thread syzbot
Am Dienstag, den 30.07.2019, 02:38 -0700 schrieb syzbot: Hello, syzbot found the following crash on: HEAD commit:41550654 [UPSTREAM] KVM: x86: degrade WARN to pr_warn_rate.. git tree: kmsan console output: https://syzkaller.appspot.com/x/log.txt?x=13e95183a0 kernel config:

Re: KMSAN: kernel-usb-infoleak in pcan_usb_pro_send_req

2019-08-06 Thread Andrey Konovalov
On Tue, Aug 6, 2019 at 2:45 PM Oliver Neukum wrote: > > Am Dienstag, den 30.07.2019, 02:38 -0700 schrieb syzbot: > > Hello, > > > > syzbot found the following crash on: > > > > HEAD commit:41550654 [UPSTREAM] KVM: x86: degrade WARN to pr_warn_rate.. > > git tree: kmsan > > console output

Re: [PATCH] USB: typec: ucsi_ccg: convert i2c driver to use dev_groups

2019-08-06 Thread Heikki Krogerus
On Mon, Aug 05, 2019 at 09:36:36PM +0200, Greg Kroah-Hartman wrote: > The driver core now supports the option to automatically create and > remove any needed sysfs attribute files for a driver when the device is > bound/removed from it. Convert the uscsi_ccg code to use that instead > of trying to

Re: KMSAN: kernel-usb-infoleak in pcan_usb_pro_send_req

2019-08-06 Thread Oliver Neukum
Am Dienstag, den 30.07.2019, 02:38 -0700 schrieb syzbot: > Hello, > > syzbot found the following crash on: > > HEAD commit:41550654 [UPSTREAM] KVM: x86: degrade WARN to pr_warn_rate.. > git tree: kmsan > console output: https://syzkaller.appspot.com/x/log.txt?x=13e95183a0 > kernel c

KASAN: use-after-free Read in dvb_usb_device_exit (2)

2019-08-06 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:e96407b4 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=114fd9aa60 kernel config: https://syzkaller.appspot.com/x/.

KASAN: use-after-free Read in hiddev_ioctl

2019-08-06 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:e96407b4 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=1732258a60 kernel config: https://syzkaller.appspot.com/x/.

KASAN: slab-out-of-bounds Read in usbhid_close

2019-08-06 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:e96407b4 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=117a9f4260 kernel config: https://syzkaller.appspot.com/x/.

Re: [PATCH v8 00/11] add USB GPIO based connection detection driver

2019-08-06 Thread Linus Walleij
On Tue, Aug 6, 2019 at 9:48 AM Chunfeng Yun wrote: > On Mon, 2019-08-05 at 12:06 +0200, Linus Walleij wrote: > > On Wed, Jul 24, 2019 at 10:51 AM Chunfeng Yun > > wrote: > > But for just "hey I'm plugged in" we can surely keep this > > ID on GPIO detection in the USB subsystem. > > Sorry, you m

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

2019-08-06 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

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

2019-08-06 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: WARNING in __iforce_usb_xmit/usb_submit_urb

2019-08-06 Thread Oliver Neukum
Am Montag, den 05.08.2019, 04:58 -0700 schrieb syzbot: > Hello, > > syzbot found the following crash on: > > HEAD commit:e96407b4 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.tx

Re: WARNING in __iforce_usb_xmit/usb_submit_urb

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

Re: KMSAN: kernel-usb-infoleak in pcan_usb_pro_send_req

2019-08-06 Thread Alan Stern
On Tue, 6 Aug 2019, Andrey Konovalov wrote: > On Tue, Aug 6, 2019 at 2:45 PM Oliver Neukum wrote: > > > > Am Dienstag, den 30.07.2019, 02:38 -0700 schrieb syzbot: > > > Hello, > > > > > > syzbot found the following crash on: > > > > > > HEAD commit:41550654 [UPSTREAM] KVM: x86: degrade WARN t

Re: KMSAN: kernel-usb-infoleak in pcan_usb_pro_send_req

2019-08-06 Thread Andrey Konovalov
On Tue, Aug 6, 2019 at 3:59 PM Alan Stern wrote: > > On Tue, 6 Aug 2019, Andrey Konovalov wrote: > > > On Tue, Aug 6, 2019 at 2:45 PM Oliver Neukum wrote: > > > > > > Am Dienstag, den 30.07.2019, 02:38 -0700 schrieb syzbot: > > > > Hello, > > > > > > > > syzbot found the following crash on: > > >

Re: KASAN: use-after-free Read in device_release_driver_internal

2019-08-06 Thread Alan Stern
On Tue, 6 Aug 2019, Oliver Neukum wrote: > Am Donnerstag, den 01.08.2019, 14:47 -0400 schrieb Alan Stern: > > > > I think this must be caused by an unbalanced refcount. That is, > > something must drop one more reference to the device than it takes. > > That would explain why the invalid access

Re: possible deadlock in usb_deregister_dev

2019-08-06 Thread Oliver Neukum
Am Montag, den 05.08.2019, 04:58 -0700 schrieb syzbot: > Hello, > > syzbot found the following crash on: > > HEAD commit:e96407b4 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.tx

Re: Re: possible deadlock in usb_deregister_dev

2019-08-06 Thread syzbot
Am Montag, den 05.08.2019, 04:58 -0700 schrieb syzbot: Hello, syzbot found the following crash on: HEAD commit:e96407b4 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=13b5

Re: KASAN: use-after-free Read in device_release_driver_internal

2019-08-06 Thread Oliver Neukum
Am Dienstag, den 06.08.2019, 10:19 -0400 schrieb Alan Stern: > On Tue, 6 Aug 2019, Oliver Neukum wrote: > > > Am Donnerstag, den 01.08.2019, 14:47 -0400 schrieb Alan Stern: > > > > > > I think this must be caused by an unbalanced refcount. That is, > > > something must drop one more reference to

Re: KMSAN: kernel-usb-infoleak in pcan_usb_pro_send_req

2019-08-06 Thread syzbot
Hello, syzbot has tested the proposed patch and the reproducer did not trigger crash: Reported-and-tested-by: syzbot+513e4d0985298538b...@syzkaller.appspotmail.com Tested on: commit: 41550654 [UPSTREAM] KVM: x86: degrade WARN to pr_warn_rate.. git tree: https://github.com/g

[PATCH 01/12] USB: add support for dev_groups to struct usb_driver

2019-08-06 Thread Greg Kroah-Hartman
Now that the driver core supports dev_groups for individual drivers, expose that pointer to struct usb_driver to make it easier for USB drivers to also use it. Signed-off-by: Greg Kroah-Hartman --- drivers/usb/core/driver.c | 1 + include/linux/usb.h | 3 +++ 2 files changed, 4 insertions(

[PATCH 00/12] USB: dev_groups support for usb drivers

2019-08-06 Thread Greg Kroah-Hartman
Now that the driver core supports the ability for individual drivers to have attribute groups added/removed when a device is bound/unbound to a driver automatically, we should take advantage of that in the USB subsystem. This patch series adds dev_groups support to struct usb_driver and struct usb

[PATCH 11/12] USB: usbsevseg: convert to use dev_groups

2019-08-06 Thread Greg Kroah-Hartman
USB drivers now support the ability for the driver core to handle the creation and removal of device-specific sysfs files in a race-free manner. Take advantage of that by converting the driver to use this by moving the sysfs attributes into a group and assigning the dev_groups pointer to it. Sign

[PATCH 12/12] USB: usbip: convert to use dev_groups

2019-08-06 Thread Greg Kroah-Hartman
USB drivers now support the ability for the driver core to handle the creation and removal of device-specific sysfs files in a race-free manner. Take advantage of that by converting the driver to use this by moving the sysfs attributes into a group and assigning the dev_groups pointer to it. Cc:

[PATCH 10/12] USB: trancevibrator: convert to use dev_groups

2019-08-06 Thread Greg Kroah-Hartman
USB drivers now support the ability for the driver core to handle the creation and removal of device-specific sysfs files in a race-free manner. Take advantage of that by converting the driver to use this by moving the sysfs attributes into a group and assigning the dev_groups pointer to it. Cc:

[PATCH 02/12] USB: add support for dev_groups to struct usb_device_driver

2019-08-06 Thread Greg Kroah-Hartman
Now that the driver core supports dev_groups for individual drivers, expose that pointer to struct usb_device_driver to make it easier for USB drivers to also use it. Yes, users of usb_device_driver are much rare, but there are instances already that use custom sysfs files, so adding this support

[PATCH 03/12] USB: atm: cxacru: convert to use dev_groups

2019-08-06 Thread Greg Kroah-Hartman
USB drivers now support the ability for the driver core to handle the creation and removal of device-specific sysfs files in a race-free manner. Take advantage of that by converting the driver to use this by moving the sysfs attributes into a group and assigning the dev_groups pointer to it. Sign

[PATCH 04/12] USB: ueagle-atm: convert to use dev_groups

2019-08-06 Thread Greg Kroah-Hartman
USB drivers now support the ability for the driver core to handle the creation and removal of device-specific sysfs files in a race-free manner. Take advantage of that by converting the driver to use this by moving the sysfs attributes into a group and assigning the dev_groups pointer to it. Cc:

[PATCH 05/12] USB: usblp: convert to use dev_groups

2019-08-06 Thread Greg Kroah-Hartman
USB drivers now support the ability for the driver core to handle the creation and removal of device-specific sysfs files in a race-free manner. Take advantage of that by converting the driver to use this by moving the sysfs attributes into a group and assigning the dev_groups pointer to it. Cc:

[PATCH 06/12] USB: usbtmc: convert to use dev_groups

2019-08-06 Thread Greg Kroah-Hartman
USB drivers now support the ability for the driver core to handle the creation and removal of device-specific sysfs files in a race-free manner. Take advantage of that by converting the driver to use this by moving the sysfs attributes into a group and assigning the dev_groups pointer to it. Cc:

[PATCH 07/12] USB: cypress_cy7c63: convert to use dev_groups

2019-08-06 Thread Greg Kroah-Hartman
USB drivers now support the ability for the driver core to handle the creation and removal of device-specific sysfs files in a race-free manner. Take advantage of that by converting the driver to use this by moving the sysfs attributes into a group and assigning the dev_groups pointer to it. Sign

[PATCH 08/12] USB: cytherm: convert to use dev_groups

2019-08-06 Thread Greg Kroah-Hartman
USB drivers now support the ability for the driver core to handle the creation and removal of device-specific sysfs files in a race-free manner. Take advantage of that by converting the driver to use this by moving the sysfs attributes into a group and assigning the dev_groups pointer to it. Sign

[PATCH 09/12] USB: lvstest: convert to use dev_groups

2019-08-06 Thread Greg Kroah-Hartman
USB drivers now support the ability for the driver core to handle the creation and removal of device-specific sysfs files in a race-free manner. Take advantage of that by converting the driver to use this by moving the sysfs attributes into a group and assigning the dev_groups pointer to it. Sign

Re: KASAN: use-after-free Read in device_release_driver_internal

2019-08-06 Thread Andrey Konovalov
On Tue, Aug 6, 2019 at 2:36 PM Oliver Neukum wrote: > > Am Donnerstag, den 01.08.2019, 14:47 -0400 schrieb Alan Stern: > > > > I think this must be caused by an unbalanced refcount. That is, > > something must drop one more reference to the device than it takes. > > That would explain why the inv

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

2019-08-06 Thread shuah
On 8/6/19 6:31 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. But HCD provides DMA

Re: [PATCH v4 2/2] usbip: Implement SG support to vhci-hcd and stub driver

2019-08-06 Thread shuah
On 8/6/19 6:31 AM, Suwan Kim wrote: There are bugs on vhci with usb 3.0 storage device. In USB, each SG list entry buffer should be divisible by the bulk max packet size. But with native SG support, this problem doesn't matter because the SG buffer is treated as contiguous buffer. But without nat

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

2019-08-06 Thread Suwan Kim
On Tue, Aug 06, 2019 at 09:11:30AM -0600, shuah wrote: > On 8/6/19 6:31 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 a

Re: KASAN: use-after-free Read in device_release_driver_internal

2019-08-06 Thread Oliver Neukum
Am Dienstag, den 06.08.2019, 10:19 -0400 schrieb Alan Stern: > In any case, I don't know if this missing "get" would cause the > problem, but it might well. Hi, upon further thought, this should be automated. Checking for refcount leaks is KASAN's job. In particular, refcounts should not * decr

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

2019-08-06 Thread shuah
On 8/6/19 9:32 AM, Suwan Kim wrote: On Tue, Aug 06, 2019 at 09:11:30AM -0600, shuah wrote: On 8/6/19 6:31 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 st

Re: [PATCH v4 2/2] usbip: Implement SG support to vhci-hcd and stub driver

2019-08-06 Thread Suwan Kim
On Tue, Aug 06, 2019 at 09:13:54AM -0600, shuah wrote: > On 8/6/19 6:31 AM, Suwan Kim wrote: > > There are bugs on vhci with usb 3.0 storage device. In USB, each SG > > list entry buffer should be divisible by the bulk max packet size. > > But with native SG support, this problem doesn't matter bec

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

2019-08-06 Thread Suwan Kim
On Tue, Aug 06, 2019 at 09:38:54AM -0600, shuah wrote: > On 8/6/19 9:32 AM, Suwan Kim wrote: > > On Tue, Aug 06, 2019 at 09:11:30AM -0600, shuah wrote: > > > On 8/6/19 6:31 AM, Suwan Kim wrote: > > > > vhci doesn’t do DMA for remote device. Actually, the real DMA > > > > operation is done by networ

Re: [PATCH v4 2/2] usbip: Implement SG support to vhci-hcd and stub driver

2019-08-06 Thread shuah
On 8/6/19 9:48 AM, Suwan Kim wrote: On Tue, Aug 06, 2019 at 09:13:54AM -0600, shuah wrote: On 8/6/19 6:31 AM, Suwan Kim wrote: There are bugs on vhci with usb 3.0 storage device. In USB, each SG list entry buffer should be divisible by the bulk max packet size. But with native SG support, this

Re: possible deadlock in open_rio

2019-08-06 Thread Alan Stern
On Thu, 1 Aug 2019, syzbot wrote: > Hello, > > syzbot found the following crash on: > > HEAD commit:7f7867ff 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=136b6aec60 >

[PATCH] usbfs: Add ioctls for runtime power management

2019-08-06 Thread Alan Stern
It has been requested that usbfs should implement runtime power management, instead of forcing the device to remain at full power as long as the device file is open. This patch introduces that new feature. It does so by adding three new usbfs ioctls: USBDEVFS_FORBID_SUSPEND: Prevents the

Re: [PATCH net-next 2/5] r8152: replace array with linking list for rx information

2019-08-06 Thread Jakub Kicinski
On Tue, 6 Aug 2019 19:18:01 +0800, Hayes Wang wrote: > The original method uses an array to store the rx information. The > new one uses a list to link each rx structure. Then, it is possible > to increase/decrease the number of rx structure dynamically. > > Signed-off-by: Hayes Wang > --- > dri

Re: [PATCH 05/14] gpio: lpc32xx: allow building on non-lpc32xx targets

2019-08-06 Thread Sylvain Lemieux
Hi Arnd, On Wed, Jul 31, 2019 at 4:00 PM Arnd Bergmann wrote: > > The driver uses hardwire MMIO addresses instead of the data > that is passed in device tree. Change it over to only > hardcode the register offset values and allow compile-testing. > > Signed-off-by: Arnd Bergmann > --- > drivers

Re: [PATCH 07/14] net: lpc-enet: move phy setup into platform code

2019-08-06 Thread Sylvain Lemieux
On Wed, Jul 31, 2019 at 4:01 PM Arnd Bergmann wrote: > > Setting the phy mode requires touching a platform specific > register, which prevents us from building the driver without > its header files. > > Move it into a separate function in arch/arm/mach/lpc32xx > to hide the core registers from the

Re: [PATCH 07/14] net: lpc-enet: move phy setup into platform code

2019-08-06 Thread Sylvain Lemieux
Acked-by: Sylvain Lemieux On Wed, Jul 31, 2019 at 4:01 PM Arnd Bergmann wrote: > > Setting the phy mode requires touching a platform specific > register, which prevents us from building the driver without > its header files. > > Move it into a separate function in arch/arm/mach/lpc32xx > to hide

Re: [PATCH 08/14] net: lpc-enet: allow compile testing

2019-08-06 Thread Sylvain Lemieux
Acked-by: Sylvain Lemieux On Wed, Jul 31, 2019 at 4:01 PM Arnd Bergmann wrote: > > The lpc-enet driver can now be built on all platforms, so > allow compile testing as well. > > Signed-off-by: Arnd Bergmann > --- > drivers/net/ethernet/nxp/Kconfig | 2 +- > drivers/net/ethernet/nxp/lpc_eth.c

Re: [PATCH 10/14] ARM: lpc32xx: clean up header files

2019-08-06 Thread Sylvain Lemieux
Acked-by: Sylvain Lemieux On Wed, Jul 31, 2019 at 4:03 PM Arnd Bergmann wrote: > > All device drivers have stopped relying on mach/*.h headers, > so move the remaining headers into arch/arm/mach-lpc32xx/lpc32xx.h > to prepare for multiplatform builds. > > The mach/entry-macro.S file has been unu

Re: [PATCH net-next 2/5] r8152: replace array with linking list for rx information

2019-08-06 Thread Jakub Kicinski
On Tue, 6 Aug 2019 12:53:42 -0700, Jakub Kicinski wrote: > > @@ -744,6 +745,8 @@ struct r8152 { > > void (*autosuspend_en)(struct r8152 *tp, bool enable); > > } rtl_ops; > > > > + atomic_t rx_count; > > I wonder what the advantage of rx_count being atomic is, perhpas it > cou

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

2019-08-06 Thread Jakub Kicinski
On Tue, 6 Aug 2019 19:18:03 +0800, 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 i

Re: [PATCH net-next 5/5] r8152: change rx_frag_head_sz and rx_max_agg_num dynamically

2019-08-06 Thread Jakub Kicinski
On Tue, 6 Aug 2019 19:18:04 +0800, Hayes Wang wrote: > Let rx_frag_head_sz and rx_max_agg_num could be modified dynamically > through the sysfs. > > Signed-off-by: Hayes Wang Please don't expose those via sysfs. Ethtool's copybreak and descriptor count should be applicable here, I think.

PARTNERSHIP REQUEST,

2019-08-06 Thread Simon Beron
Dear Friend, I need you to please let me know if there are fast growing investments in your country in which i can invest money in. I have access to a huge amount of money, which i want to invest in your country, i want to know if you can be an agent/partner to me and i will give you a commission

RE: [PATCH 2/5] usb: chipidea: add role switch class support

2019-08-06 Thread Peter Chen
> > > > > > > > > > > > You may use connect bit at portsc since VBUS may not connect to SoC. > > > > > > By this way, disconnect can be decided but connect is a problem in > > > current driver, as controller was stopped in low power mode so can't > > > detect connection from host, unless we also

Re: EHSET USB testing

2019-08-06 Thread Rob Weber
Hi Everyone, (Pinging Mathias regarding xHCI support of the USB 2.0 test modes) On Mon, Aug 05, 2019 at 02:07:23PM +0800, Peter Chen wrote: > On Sun, Aug 4, 2019 at 10:45 AM Evan Gates wrote: > > > > I'm trying to get my device to pass the EHSET tests. I found the thread > > "Using EHSET module

RE: [PATCH net-next 2/5] r8152: replace array with linking list for rx information

2019-08-06 Thread Hayes Wang
Jakub Kicinski [mailto:jakub.kicin...@netronome.com] [...] > > static int rtl_stop_rx(struct r8152 *tp) > > { > > - int i; > > + struct list_head *cursor, *next, tmp_list; > > + unsigned long flags; > > + > > + INIT_LIST_HEAD(&tmp_list); > > > > - for (i = 0; i < RTL8152_MAX_RX; i++) >

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

2019-08-06 Thread Hayes Wang
Jakub Kicinski [mailto:jakub.kicin...@netronome.com] > Sent: Wednesday, August 07, 2019 6:08 AM [...] > > #define RTL8152_REQT_READ 0xc0 > > @@ -720,7 +723,7 @@ struct r8152 { > > struct net_device *netdev; > > struct urb *intr_urb; > > struct tx_agg tx_info[RTL8152_MAX_TX]; > > - s

RE: EHSET USB testing

2019-08-06 Thread Peter Chen
> Hi Everyone, > > (Pinging Mathias regarding xHCI support of the USB 2.0 test modes) > > On Mon, Aug 05, 2019 at 02:07:23PM +0800, Peter Chen wrote: > > On Sun, Aug 4, 2019 at 10:45 AM Evan Gates wrote: > > > > > > I'm trying to get my device to pass the EHSET tests. I found the > > > thread

igazgató

2019-08-06 Thread wwwunitedban...@gmail.com