RE: [PATCH v9 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-08-12 Thread Pawel Laszczak
Hi, > >Hi, > >Pawel Laszczak writes: > >> Hi, >> >>> >>>Pawel Laszczak writes: >> +static int cdns3_gadget_start(struct cdns3 *cdns) >> +{ >> +struct cdns3_device *priv_dev; >> +u32 max_speed; >> +int ret; >> + >> +priv_dev = kzalloc(si

[PATCH] xhci: wait CNR when doing xhci resume

2019-08-12 Thread Rick Tseng
From: Rick NVIDIA 3.1 xHCI card would lose power when moving power state into D3Cold. Thus we need to wait CNR bit to clear when xhci resmue as xhci init. Signed-off-by: Rick --- drivers/usb/host/xhci-pci.c | 20 1 file changed, 20 insertions(+) diff --git a/drivers/usb/h

Re: [PATCH] xhci: wait CNR when doing xhci resume

2019-08-12 Thread Felipe Balbi
Hi, Rick Tseng writes: > +static int xhci_poll_cnr(struct usb_hcd *hcd) > +{ > + struct xhci_hcd *xhci = hcd_to_xhci(hcd); > + void __iomem *reg = &xhci->op_regs->status; > + u32 result; > + int ret; > + > + ret = readl_poll_timeout_atomic(reg, result, > +

RE: [PATCH v9 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-08-12 Thread Felipe Balbi
Hi, Pawel Laszczak writes: >>> I have such situation in which one interrupt line is shared with ehci and >>> cdns3 driver. >>> In such case this function returns error code. >> >>which function returns error code? > > devm_request_threaded_irq, of course if I set IRQF_SHARED | IRQF_ONESHOT. > A

Re: [PATCH] xhci: wait CNR when doing xhci resume

2019-08-12 Thread Oliver Neukum
Am Montag, den 12.08.2019, 15:24 +0800 schrieb Rick Tseng: > From: Rick > > NVIDIA 3.1 xHCI card would lose power when moving power state into D3Cold. > Thus we need to wait CNR bit to clear when xhci resmue as xhci init. Should any controller have CNR set? Why is this specific to a vendor?

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

2019-08-12 Thread Roger Quadros
Hi, On 11/08/2019 14:59, Pawel Laszczak wrote: > Hi, > >> >> 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 Devic

RE: [PATCH v9 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-08-12 Thread Pawel Laszczak
Hi, > >Pawel Laszczak writes: I have such situation in which one interrupt line is shared with ehci and cdns3 driver. In such case this function returns error code. >>> >>>which function returns error code? >> >> devm_request_threaded_irq, of course if I set IRQF_SHARED | IRQF_ONE

Re: KASAN: slab-out-of-bounds Read in hidraw_ioctl

2019-08-12 Thread Oliver Neukum
Am Sonntag, den 11.08.2019, 13:46 -0700 schrieb syzbot: > syzbot has found a reproducer for 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.co

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

2019-08-12 Thread Pawel Laszczak
Hi, > >On 11/08/2019 14:59, Pawel Laszczak wrote: >> Hi, >> >>> >>> 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-

RE: [PATCH v9 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-08-12 Thread Felipe Balbi
Hi, Pawel Laszczak writes: >>Quick question, then: these ISTS registers, are they masked interrupt >>status or raw interrupt status? > > Yes it's masked, but after masking them the new interrupts will not be > reported > In ISTS registers. Form this reason I can mask onl

Re: KASAN: slab-out-of-bounds Read in hidraw_ioctl

2019-08-12 Thread syzbot
Hello, syzbot has tested the proposed patch but the reproducer still triggered crash: KASAN: slab-out-of-bounds Read in hidraw_ioctl == BUG: KASAN: slab-out-of-bounds in strnlen+0x75/0x80 lib/string.c:542 Read of size 1 at addr f

[GIT PULL] USB fixes for v5.3-rc

2019-08-12 Thread Felipe Balbi
Hi Greg, here's a pull request for some fixes that I collected from linux-usb mailing list. Let me know if you want anything to be changed. Cheers The following changes since commit d45331b00ddb179e291766617259261c112db872: Linux 5.3-rc4 (2019-08-11 13:26:41 -0700) are available in the Git

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

2019-08-12 Thread Roger Quadros
On 11/08/2019 14:59, Pawel Laszczak wrote: > Hi, > >> >> 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

RE: [PATCH v9 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-08-12 Thread Pawel Laszczak
> >Hi, > >Pawel Laszczak writes: >>>Quick question, then: these ISTS registers, are they masked interrupt >>>status or raw interrupt status? >> >> Yes it's masked, but after masking them the new interrupts will not be >> reported >> In ISTS registers. Form this reason I ca

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

2019-08-12 Thread Heikki Krogerus
Hi, > +real_role = cdsn3_real_role_switch_get(cdns->dev); > + > +current_role = role; > +dev_dbg(cdns->dev, "Switching role"); > + > +ret = cdns3_role_start(cdns, real_role); > +if (ret) { > +/* Back to

RE: [PATCH v9 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-08-12 Thread Felipe Balbi
Hi, Pawel Laszczak writes: Yet another thread? Can't you just run this right before giving back the USB request? So, don't do it from IRQ handler, but from giveback path? >>> >>> Do you mean in: >>> if (request->complete) { >>> spin_unlock(&priv_dev->lock); >>>

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

2019-08-12 Thread Roger Quadros
On 12/08/2019 13:31, Heikki Krogerus wrote: > Hi, > >> +real_role = cdsn3_real_role_switch_get(cdns->dev); >> + >> +current_role = role; >> +dev_dbg(cdns->dev, "Switching role"); >> + >> +ret = cdns3_role_start(cdns, real_role); >> +

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

2019-08-12 Thread Pawel Laszczak
> >On 11/08/2019 14:59, Pawel Laszczak wrote: >> Hi, >> >>> >>> 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

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

2019-08-12 Thread Christoph Hellwig
> diff --git a/drivers/usb/host/ehci-ppc-of.c b/drivers/usb/host/ehci-ppc-of.c > index 576f7d79ad4e..9d17e0695e35 100644 > --- a/drivers/usb/host/ehci-ppc-of.c > +++ b/drivers/usb/host/ehci-ppc-of.c > @@ -31,7 +31,7 @@ static const struct hc_driver ehci_ppc_of_hc_driver = { >* generic hardw

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

2019-08-12 Thread Andrey Konovalov
On Fri, Aug 9, 2019 at 10:52 PM Alan Stern wrote: > > On Fri, 9 Aug 2019, syzbot wrote: > > > Hello, > > > > syzbot has tested the proposed patch and the reproducer did not trigger > > crash: > > > > Reported-and-tested-by: > > syzbot+22ae4e3b9fcc8a5c1...@syzkaller.appspotmail.com > > > > Tested o

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

2019-08-12 Thread Andrey Konovalov
On Fri, Aug 9, 2019 at 3:18 PM syzbot wrote: > > 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=10fbd

Re: BUG: bad usercopy in ld_usb_read

2019-08-12 Thread Andrey Konovalov
On Thu, Aug 8, 2019 at 2:38 PM syzbot wrote: > > 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=13aea

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

2019-08-12 Thread Andrey Konovalov
On Fri, Aug 9, 2019 at 6:51 PM Alan Stern wrote: > > Greg: > > See below... > > On Fri, 9 Aug 2019, syzbot wrote: > > > Hello, > > > > syzbot found the following crash on: > > > > HEAD commit:e96407b4 usb-fuzzer: main usb gadget fuzzer driver > > git tree: https://github.com/google/kasan

Re: possible deadlock in iowarrior_open

2019-08-12 Thread Andrey Konovalov
On Thu, Aug 1, 2019 at 5:28 PM 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=17ab6

Re: possible deadlock in usb_deregister_dev

2019-08-12 Thread Andrey Konovalov
On Fri, Aug 9, 2019 at 9:32 PM Alan Stern wrote: > > On Fri, 9 Aug 2019, syzbot wrote: > > > syzbot has found a reproducer for the following crash on: > > > > HEAD commit:e96407b4 usb-fuzzer: main usb gadget fuzzer driver > > git tree: https://github.com/google/kasan.git usb-fuzzer > > c

INFO: task hung in wdm_flush

2019-08-12 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=1046c6ee60 kernel config: https://syzkaller.appspot.com/x/.

KASAN: slab-out-of-bounds Write in ax_probe

2019-08-12 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=1535640260 kernel config: https://syzkaller.appspot.com/x/.

KASAN: use-after-free Write in ld_usb_interrupt_in_callback

2019-08-12 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=1327f2ee60 kernel config: https://syzkaller.appspot.com/x/.

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

2019-08-12 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=162aac0260 kernel config: https://syzkaller.appspot.com/x/.

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

2019-08-12 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=13e270e260 kernel config: https://syzkaller.appspot.com/x/.

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

2019-08-12 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=1390791c60 kernel config: https://syzkaller.appspot.com/x/.

Re: KASAN: use-after-free Write in ld_usb_interrupt_in_callback

2019-08-12 Thread Andrey Konovalov
On Mon, Aug 12, 2019 at 2:18 PM syzbot wrote: > > 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=1327

Re: KASAN: slab-out-of-bounds Read in ld_usb_read

2019-08-12 Thread Andrey Konovalov
On Mon, Aug 12, 2019 at 2:18 PM syzbot wrote: > > 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=162a

Re: KASAN: slab-out-of-bounds Read in usbnet_generic_cdc_bind

2019-08-12 Thread Andrey Konovalov
On Mon, Aug 12, 2019 at 2:18 PM syzbot wrote: > > 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=1390

Re: possible deadlock in usb_deregister_dev

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

Re: general protection fault in __pm_runtime_resume

2019-08-12 Thread Andrey Konovalov
On Thu, Jul 25, 2019 at 7:04 AM syzbot wrote: > > syzbot has found a reproducer for 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.

Re: [Patch V6 7/8] usb: gadget: Add UDC driver for tegra XUSB device mode controller

2019-08-12 Thread Chunfeng Yun
On Thu, 2019-08-08 at 15:07 +0530, Nagarjuna Kristam wrote: > This patch adds UDC driver for tegra XUSB 3.0 device mode controller. > XUSB device mode controller supports SS, HS and FS modes > > Based on work by: > Mark Kuo > Hui Fu > Andrew Bresticker > > Signed-off-by: Nagarjuna Krista

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

2019-08-12 Thread Felipe Balbi
Hi, Roger Quadros writes: >> The sysfs file we expose from the class for the role switches is >> primarily meant for supporting proprietary protocols that require us >> to basically override the connector USB data role. The default role >> should always be selected in the drivers. > > OK. Let's

Re: WARNING in usbhid_raw_request/usb_submit_urb

2019-08-12 Thread Andrey Konovalov
On Tue, Jul 30, 2019 at 6:58 PM syzbot wrote: > > syzbot has found a reproducer for 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.

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

2019-08-12 Thread Andrey Konovalov
On Thu, Aug 8, 2019 at 2:38 PM syzbot wrote: > > 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=16000

Re: [Patch V6 7/8] usb: gadget: Add UDC driver for tegra XUSB device mode controller

2019-08-12 Thread Felipe Balbi
Hi, Chunfeng Yun writes: >> +/* XUSB_DEV registers */ >> +#define SPARAM 0x000 >> +#define SPARAM_ERSTMAX_SHIFT 16 >> +#define SPARAM_ERSTMAX_MASK GENMASK(4, 0) >> +#define DB 0x004 >> +#define DB_TARGET_SHIFT 8 >> +#define DB_TARGET_MASK GENMASK(7, 0) >> +#define DB_STREAMID_SHIFT 16 >> +#

Re: general protection fault in __pm_runtime_resume

2019-08-12 Thread syzbot
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: 6a3599ce usb-fuzzer: main usb gadget fuzzer driver git tree: https://github.com/google/kasa

Re: [Patch V6 7/8] usb: gadget: Add UDC driver for tegra XUSB device mode controller

2019-08-12 Thread Chunfeng Yun
On Mon, 2019-08-12 at 15:49 +0300, Felipe Balbi wrote: > Hi, > > Chunfeng Yun writes: > >> +/* XUSB_DEV registers */ > >> +#define SPARAM 0x000 > >> +#define SPARAM_ERSTMAX_SHIFT 16 > >> +#define SPARAM_ERSTMAX_MASK GENMASK(4, 0) > >> +#define DB 0x004 > >> +#define DB_TARGET_SHIFT 8 > >> +#de

Re: WARNING in usbhid_raw_request/usb_submit_urb

2019-08-12 Thread syzbot
Hello, syzbot has tested the proposed patch but the reproducer still triggered crash: KASAN: invalid-free in hcd_buffer_free usb 5-1: USB disconnect, device number 2 == BUG: KASAN: double-free or invalid-free in hcd_buffer_free+0

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

2019-08-12 Thread Roger Quadros
On 12/08/2019 15:46, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: >>> The sysfs file we expose from the class for the role switches is >>> primarily meant for supporting proprietary protocols that require us >>> to basically override the connector USB data role. The default role >>>

Re: [PATCH] media: em28xx: modules workqueue not inited for 2nd device

2019-08-12 Thread Ezequiel Garcia
On Sun, 2019-08-11 at 06:11 +0100, Sean Young wrote: > syzbot reports an error on flush_request_modules() for the second device. > This workqueue was never initialised so simply remove the offending line. > > usb 1-1: USB disconnect, device number 2 > em28xx 1-1:1.153: Disconnecting em28xx #1 > --

Re: [PATCH] xhci: wait CNR when doing xhci resume

2019-08-12 Thread Greg KH
On Mon, Aug 12, 2019 at 03:24:52PM +0800, Rick Tseng wrote: > From: Rick > > NVIDIA 3.1 xHCI card would lose power when moving power state into D3Cold. > Thus we need to wait CNR bit to clear when xhci resmue as xhci init. > > Signed-off-by: Rick We need a "full" name on the from and signed-of

RE: [PATCH v9 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-08-12 Thread Alan Stern
On Mon, 12 Aug 2019, Felipe Balbi wrote: > I don't understand the intricacies of the coherent API to judge if it's > a bug in the API itself. In any case, here's where the splat comes from: > > void dma_free_attrs(struct device *dev, size_t size, void *cpu_addr, > dma_addr_t dma_han

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

2019-08-12 Thread Alan Stern
On Mon, 12 Aug 2019, Andrey Konovalov wrote: > Alan, could you submit this patch (if you haven't already)? Looks like > it fixes this bug (and might fix some others). I will. I was waiting to see if Greg KH had any comments. Alan Stern > > drivers/usb/core/file.c | 10 +- > > 1 fil

Re: WARNING in usbhid_raw_request/usb_submit_urb

2019-08-12 Thread Andrey Konovalov
On Mon, Aug 12, 2019 at 3:03 PM syzbot wrote: > > Hello, > > syzbot has tested the proposed patch but the reproducer still triggered > crash: > KASAN: invalid-free in hcd_buffer_free > > usb 5-1: USB disconnect, device number 2 > == >

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

2019-08-12 Thread syzbot
On Sat, Aug 3, 2019 at 11:12 AM Hillf Danton wrote: On Fri, 02 Aug 2019 05:58:05 -0700 > 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:

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

2019-08-12 Thread Andrey Konovalov
On Sat, Aug 3, 2019 at 11:12 AM Hillf Danton wrote: > > > On Fri, 02 Aug 2019 05:58:05 -0700 > > 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 > > con

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

2019-08-12 Thread Andrey Konovalov
On Mon, Aug 12, 2019 at 4:27 PM syzbot wrote: > > > On Sat, Aug 3, 2019 at 11:12 AM Hillf Danton wrote: > > > >> On Fri, 02 Aug 2019 05:58:05 -0700 > >> > Hello, > >> > > >> > syzbot found the following crash on: > >> > > >> > HEAD commit:e96407b4 usb-fuzzer: main usb gadget fuzzer driver > >

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

2019-08-12 Thread Andrey Konovalov
On Fri, Aug 9, 2019 at 8:12 PM syzbot wrote: > > Hello, > > syzbot has tested the proposed patch and the reproducer did not trigger > crash: > > Reported-and-tested-by: > syzbot+ef5de9c4f99c4edb4...@syzkaller.appspotmail.com OK, I'm duping this BUG to the similar one that Hillf fixed: #syz dup:

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

2019-08-12 Thread Greg KH
On Mon, Aug 12, 2019 at 10:21:14AM -0400, Alan Stern wrote: > On Mon, 12 Aug 2019, Andrey Konovalov wrote: > > > Alan, could you submit this patch (if you haven't already)? Looks like > > it fixes this bug (and might fix some others). > > I will. I was waiting to see if Greg KH had any comments.

Re: [GIT PULL] USB fixes for v5.3-rc

2019-08-12 Thread Greg Kroah-Hartman
On Mon, Aug 12, 2019 at 01:00:15PM +0300, Felipe Balbi wrote: > > Hi Greg, > > here's a pull request for some fixes that I collected from linux-usb > mailing list. > > Let me know if you want anything to be changed. > > Cheers > > The following changes since commit d45331b00ddb179e291766617259

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

2019-08-12 Thread Heikki Krogerus
Hi Ajay, 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 separate display altmode. > > Current UCSI Type-C frame

Re: WARNING in usbhid_raw_request/usb_submit_urb

2019-08-12 Thread Andrey Konovalov
On Mon, Aug 12, 2019 at 4:47 PM Hillf Danton wrote: > > > Hi Andrey > > On Mon, 12 Aug 2019 06:03:01 -0700 > > Hello, > > > > syzbot has tested the proposed patch but the reproducer still triggered > > crash: > > KASAN: invalid-free in hcd_buffer_free > > > > usb 5-1: USB disconnect, device number

Re: [PATCH] usb: gadget: atmel_usba_udc: Mark expected switch fall-through

2019-08-12 Thread Alexandre Belloni
On 05/08/2019 13:48:42-0500, Gustavo A. R. Silva wrote: > Mark switch cases where we are expecting to fall through. > > This patch fixes the following warning (Building: at91_dt_defconfig arm): > > drivers/usb/gadget/udc/atmel_usba_udc.c:329:13: warning: this statement may > fall through [-Wimpl

Re: general protection fault in __pm_runtime_resume

2019-08-12 Thread syzbot
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 fuzzer driver git tree: https://github.com/google/kasa

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

2019-08-12 Thread Greg KH
On Fri, Aug 09, 2019 at 12:51:00PM -0400, Alan Stern wrote: > Greg: > > See below... > > On Fri, 9 Aug 2019, syzbot wrote: > > > Hello, > > > > syzbot found the following crash on: > > > > HEAD commit:e96407b4 usb-fuzzer: main usb gadget fuzzer driver > > git tree: https://github.com

[PATCH] USB: core: Fix races in character device registration and deregistraion

2019-08-12 Thread Alan Stern
The syzbot fuzzer has found two (!) races in the USB character device registration and deregistration routines. This patch fixes the races. The first race results from the fact that usb_deregister_dev() sets usb_minors[intf->minor] to NULL before calling device_destroy() on the class device. Thi

Re: [PATCH] USB: core: Fix races in character device registration and deregistraion

2019-08-12 Thread Greg KH
On Mon, Aug 12, 2019 at 04:11:07PM -0400, Alan Stern wrote: > The syzbot fuzzer has found two (!) races in the USB character device > registration and deregistration routines. This patch fixes the races. > > The first race results from the fact that usb_deregister_dev() sets > usb_minors[intf->mi

Re: 5.2.x kernel: WD 8TB USB Drives: Unaligned partial completion (resid=78, sector_sz=512)

2019-08-12 Thread Martin K. Petersen
Justin, >> Attached 2 x brand new Western Digital 8TB USB 3.0 drives awhile back >> and ran some file copy tests and was getting these warnings-- is >> there any way to avoid these warnings? I did confirm with parted >> that the partition was aligned but this appears to be something >> related

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

2019-08-12 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 d063c9b358e5..f41cb728e999

[PATCH net-next v2 5/5] r8152: change rx_copybreak and rx_pending through ethtool

2019-08-12 Thread Hayes Wang
Let the rx_copybreak and rx_pending could be modified by ethtool. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 91 ++--- 1 file changed, 86 insertions(+), 5 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 2ae04522c

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

2019-08-12 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 v2 4/5] r8152: support skb_add_rx_frag

2019-08-12 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 v2 2/5] r8152: replace array with linking list for rx information

2019-08-12 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 | 182 +++-

[PATCH net-next v2 0/5] r8152: RX improve

2019-08-12 Thread Hayes Wang
v2: For patch #2, replace list_for_each_safe with list_for_each_entry_safe. Remove unlikely in WARN_ON. Adjust the coding style. For patch #4, replace list_for_each_safe with list_for_each_entry_safe. Remove "else" after "continue". For patch #5. replace sysfs with ethtool to modify rx_copybreak

Re: 5.2.x kernel: WD 8TB USB Drives: Unaligned partial completion (resid=78, sector_sz=512)

2019-08-12 Thread Damien Le Moal
On 2019/08/12 19:12, Martin K. Petersen wrote: > > Justin, > >>> Attached 2 x brand new Western Digital 8TB USB 3.0 drives awhile back >>> and ran some file copy tests and was getting these warnings-- is >>> there any way to avoid these warnings? I did confirm with parted >>> that the partition

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

2019-08-12 Thread Felipe Balbi
Hi, Roger Quadros writes: >> Roger Quadros writes: The sysfs file we expose from the class for the role switches is primarily meant for supporting proprietary protocols that require us to basically override the connector USB data role. The default role should always be sele

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

2019-08-12 Thread Greg Kroah-Hartman
On Mon, Aug 12, 2019 at 06:08:43PM -0600, Nick Crews wrote: > Hi Greg! Hi! First off, please fix your email client to not send html so that vger does not reject your messages :) > I am working on a Chrome OS device that supports a policy called "USB Power > Share," which allows users to turn the

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

2019-08-12 Thread Kai-Heng Feng
Hi Mathias, at 21:24, Kai-Heng Feng wrote: at 22:45, Mathias Nyman wrote: [snipped] Yes, disabling runtime PM can workaround this issue. What’s next step here? Is it a firmware bug? Kai-Heng Kai-Heng -Mathias