[PATCH 3/4 v6] memstick: rtsx_usb_ms: Use ms_dev() helper

2018-10-30 Thread Kai-Heng Feng
Use ms_dev() helper for consistency. Signed-off-by: Kai-Heng Feng --- drivers/memstick/host/rtsx_usb_ms.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/memstick/host/rtsx_usb_ms.c b/drivers/memstick/host/rtsx_usb_ms.c index 4f64563df7de..cd12f3d1c088 100644 -

[PATCH 1/4 v6] misc: rtsx_usb: Use USB remote wakeup signaling for card insertion detection

2018-10-30 Thread Kai-Heng Feng
Although rtsx_usb doesn't support card removal detection, card insertion will resume rtsx_usb by USB remote wakeup signaling. When rtsx_usb gets resumed, also resumes its child devices, rtsx_usb_sdmmc and rtsx_usb_ms, to notify them there's a card in its slot. Signed-off-by: Kai-Heng Feng --- d

[PATCH 2/4 v6] memstick: Prevent memstick host from getting runtime suspended during card detection

2018-10-30 Thread Kai-Heng Feng
We can use MEMSTICK_POWER_{ON,OFF} along with pm_runtime_{get,put} helpers to let memstick host support runtime pm. The rpm count may go down to zero before the memstick host powers on, so the host can be runtime suspended. So before doing card detection, increment the rpm count to avoid the host

[PATCH 0/4 v6] Keep rtsx_usb suspended when there's no card

2018-10-30 Thread Kai-Heng Feng
Hi, This is based on Ulf's work [1] [2]. This patch series can keep rtsx_usb suspended, to save ~0.5W on Intel platforms and ~1.5W on AMD platforms. [1] https://patchwork.kernel.org/patch/10440583/ [2] https://patchwork.kernel.org/patch/10445725/ Kai-Heng Feng (4): misc: rtsx_usb: Use USB rem

Re: [PATCH 2/4 v5] memstick: Prevent memstick host from getting runtime suspended during card detection

2018-10-30 Thread Kai Heng Feng
> On Oct 31, 2018, at 12:04 AM, Ulf Hansson wrote: > > On 30 October 2018 at 16:23, Kai Heng Feng > wrote: >> >> >>> On Oct 30, 2018, at 21:03, Ulf Hansson wrote: >>> >>> On 29 October 2018 at 17:31, Kai Heng Feng >>> wrote: > On Oct 29, 2018, at 20:25, Ulf Hansson wro

[PATCH v2] USB: Don't enable LPM if it's already enabled

2018-10-30 Thread Kai-Heng Feng
USB Bluetooth controller QCA ROME (0cf3:e007) sometimes stops working after S3: [ 165.110742] Bluetooth: hci0: using NVM file: qca/nvm_usb_0302.bin [ 168.432065] Bluetooth: hci0: Failed to send body at 4 of 1953 (-110) After some experiments, I found that disabling LPM can workaround the issue

Re: USB Bluetooth dongle stop response with timeout error

2018-10-30 Thread Morikazu Fumita
On 30/10/2018 5:15 PM, Oliver Neukum wrote: On Sa, 2018-10-27 at 22:56 +0800, Morikazu Fumita wrote: I always found error messages of "Bluetooth: hci0: command 0x0406 tx timeout" and The problem is likely shortly before that. "dwc2 ffb4.usb: --Host Channel x Interrupt: Frame Overrun--" wh

RE: scsi_set_medium_removal timeout issue

2018-10-30 Thread Zengtao (B)
Hi: >-Original Message- >From: Alan Stern [mailto:st...@rowland.harvard.edu] >Sent: Tuesday, October 30, 2018 10:08 PM >To: Zengtao (B) >Cc: j...@linux.vnet.ibm.com; martin.peter...@oracle.com; >gre...@linuxfoundation.org; linux-s...@vger.kernel.org; >linux-ker...@vger.kernel.org; linux-u

Re: [RFC 2/3] USB: core: Add non-coherent buffer allocation helpers

2018-10-30 Thread Tomasz Figa
Hi Christoph and everyone, On Fri, Aug 31, 2018 at 3:51 PM Tomasz Figa wrote: > > On Fri, Aug 31, 2018 at 2:50 PM Christoph Hellwig wrote: > > > > On Thu, Aug 30, 2018 at 07:11:35PM -0300, Ezequiel Garcia wrote: > > > On Thu, 2018-08-30 at 10:58 -0700, Christoph Hellwig wrote: > > > > Please don

Re: [RFC PATCH 1/1] usb: dwc3: drd: Register a USB role switch

2018-10-30 Thread Chen Yu
Hi, On 2018/10/30 22:03, Heikki Krogerus wrote: > The Type-C drivers use USB role switch API to inform the > system about the negotiated data role, so registering a role > switch in the DRD code in order to support platforms with > USB Type-C connectors. > > Signed-off-by: Heikki Krogerus > ---

Re: [PATCH V2 4/6] usb: ohci-platform: Add support for Broadcom STB SoC's

2018-10-30 Thread Arnd Bergmann
On 10/30/18, Alan Cooper wrote: >> On 10/24/18 3:11 AM, Arnd Bergmann wrote: >> >> On Wed, Oct 17, 2018 at 11:30 PM Al Cooper wrote: >> >> Add support for Broadcom STB SoC's to the ohci platform driver. >> >> Signed-off-by: Al Cooper >> --- >> drivers/usb/host/ohci-platform.c | 35 >> ++

Re: [PATCH 1/2] usb: gadget: uvc: constify vb2_ops structure

2018-10-30 Thread Laurent Pinchart
Hello Julia, Thank you for the patch. On Tuesday, 30 October 2018 17:31:21 EET Julia Lawall wrote: > The vb2_ops structure can be const as it is only stored in the ops > field of a vb2_queue structure and this field is const. > > Done with the help of Coccinelle. > > Signed-off-by: Julia Lawall

[PATCH] usb: gadget: aspeed-vhub: constify usb_gadget_ops structure

2018-10-30 Thread Julia Lawall
The usb_gadget_ops structure can be const as it is only stored in the ops field of a usb_gadget structure and this field is const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/usb/gadget/udc/aspeed-vhub/dev.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH 1/2] usb: gadget: uvc: constify vb2_ops structure

2018-10-30 Thread Julia Lawall
The vb2_ops structure can be const as it is only stored in the ops field of a vb2_queue structure and this field is const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/usb/gadget/function/uvc_queue.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

[PATCH 0/2] constify vb2_ops structures

2018-10-30 Thread Julia Lawall
The vb2_ops structures can be const as they are only stored in the ops field of a vb2_queue structure and this field is const. Done with the help of Coccinelle. --- drivers/media/i2c/video-i2c.c |2 +- drivers/usb/gadget/function/uvc_queue.c |2 +- 2 files changed, 2 insertion

Re: [PATCH 2/4 v5] memstick: Prevent memstick host from getting runtime suspended during card detection

2018-10-30 Thread Ulf Hansson
On 30 October 2018 at 16:23, Kai Heng Feng wrote: > > >> On Oct 30, 2018, at 21:03, Ulf Hansson wrote: >> >> On 29 October 2018 at 17:31, Kai Heng Feng >> wrote: >>> >>> On Oct 29, 2018, at 20:25, Ulf Hansson wrote: On 24 October 2018 at 10:49, Kai-Heng Feng wrote: >

Re: [PATCH 2/4 v5] memstick: Prevent memstick host from getting runtime suspended during card detection

2018-10-30 Thread Kai Heng Feng
> On Oct 30, 2018, at 21:03, Ulf Hansson wrote: > > On 29 October 2018 at 17:31, Kai Heng Feng > wrote: >> >> >>> On Oct 29, 2018, at 20:25, Ulf Hansson wrote: >>> >>> On 24 October 2018 at 10:49, Kai-Heng Feng >>> wrote: We can use MEMSTICK_POWER_{ON,OFF} along with pm_runtime_{g

Re: [PATCH] USB: Don't enable LPM if it's already enabled

2018-10-30 Thread Kai Heng Feng
> On Oct 30, 2018, at 23:00, Alan Stern wrote: > > On Tue, 30 Oct 2018, Mathias Nyman wrote: > >> On 30.10.2018 07:54, Kai-Heng Feng wrote: >>> USB Bluetooth controller QCA ROME (0cf3:e007) sometimes stops working >>> after S3: >>> [ 165.110742] Bluetooth: hci0: using NVM file: qca/nvm_usb_00

Re: [PATCH 2/2] usb: dwc2: gadget: Accept LPM token when TxFIFO is not empty

2018-10-30 Thread Sergei Shtylyov
Hello! On 10/30/2018 03:26 PM, Artur Petrosyan wrote: > To accept LPM token during ISOC transfers when TxFIFO > is not empty. > > Signed-off-by: Artur Petrosyan > Signed-off-by: Minas Harutyunyan > --- > drivers/usb/dwc2/gadget.c | 1 + > drivers/usb/dwc2/hw.h | 3 +++ > 2 files changed,

Re: [PATCH] USB: Don't enable LPM if it's already enabled

2018-10-30 Thread Alan Stern
On Tue, 30 Oct 2018, Mathias Nyman wrote: > On 30.10.2018 07:54, Kai-Heng Feng wrote: > > USB Bluetooth controller QCA ROME (0cf3:e007) sometimes stops working > > after S3: > > [ 165.110742] Bluetooth: hci0: using NVM file: qca/nvm_usb_0302.bin > > [ 168.432065] Bluetooth: hci0: Failed to sen

Re: [PATCH 0/2] usb: dwc2: gadget: Fix Service Interval support.

2018-10-30 Thread Artur Petrosyan
Hi Balbi, On 10/30/2018 16:33, Felipe Balbi wrote: > > Hi, > > Artur Petrosyan writes: > >> 1. This patch set fixes WkupAlert interrupt handler. >> 2. Adds support to accept LPM token when TxFIFO >> is not empty. >> >> NOTE: Request to add this patch set on "tag: usb-for-v4.20" > > now th

Re: [PATCH] USB: Don't enable LPM if it's already enabled

2018-10-30 Thread Mathias Nyman
On 30.10.2018 07:54, Kai-Heng Feng wrote: USB Bluetooth controller QCA ROME (0cf3:e007) sometimes stops working after S3: [ 165.110742] Bluetooth: hci0: using NVM file: qca/nvm_usb_0302.bin [ 168.432065] Bluetooth: hci0: Failed to send body at 4 of 1953 (-110) After some experiments, I found

[PATCH] uwb: clean an indentation issue, remove extraneous tab

2018-10-30 Thread Colin King
From: Colin Ian King Trivial fix to clean up an indentation issue, remove tab Signed-off-by: Colin Ian King --- drivers/uwb/i1480/dfu/usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/uwb/i1480/dfu/usb.c b/drivers/uwb/i1480/dfu/usb.c index c0430a41e24b..b1b466cb

Re: [PATCH 2/2] usb: dwc2: gadget: Accept LPM token when TxFIFO is not empty

2018-10-30 Thread Artur Petrosyan
Hi Balbi, On 10/30/2018 16:35, Felipe Balbi wrote: > > Hi, > > Artur Petrosyan writes: >> To accept LPM token during ISOC transfers when TxFIFO >> is not empty. > > this commit log tells me nothing. Why do you need this patch? Why CNT1 > and not CNT0 or CNT2? > Thanks for the quick reply and

Re: [PATCH 1/2] usb: dwc2: gadget: Fix WkupAlert interrupt handler.

2018-10-30 Thread Artur Petrosyan
Hi Balbi, On 10/30/2018 16:34, Felipe Balbi wrote: > > Hi, > > Artur Petrosyan writes: >> According to the databook DCTL_RMTWKUPSIG bit >> is defined in DCTL register not in DCFG. >> >> Updated setting DCTL_RMTWKUPSIG bit to DCTL >> register. >> > > looks like this needs a Cc stable and Fixes

Re: scsi_set_medium_removal timeout issue

2018-10-30 Thread Alan Stern
On Tue, 30 Oct 2018, Zengtao (B) wrote: > Hi > > I have recently met a scsi_set_medium_removal timeout issue, and it's related > to both SCSI and USB MASS storage. > Since i am not an expert in either scsi or usb mass storage, i am writing to > report > the issue and ask for a solution from y

[RFC PATCH 1/1] usb: dwc3: drd: Register a USB role switch

2018-10-30 Thread Heikki Krogerus
The Type-C drivers use USB role switch API to inform the system about the negotiated data role, so registering a role switch in the DRD code in order to support platforms with USB Type-C connectors. Signed-off-by: Heikki Krogerus --- Hi Chen Yu, This is related to your Hikey960 USB patches serie

Re: [PATCH] usb: dwc3: core: Clean up ULPI device

2018-10-30 Thread Felipe Balbi
Hi, Felipe Balbi writes: > From: Andy Shevchenko > > If dwc3_core_init_mode() fails with deferred probe, > next probe fails on sysfs with > > sysfs: cannot create duplicate filename > '/devices/pci:00/:00:11.0/dwc3.0.auto/dwc3.0.auto.ulpi' > > To avoid this failure, clean up ULPI devic

Re: EPROTO when USB 3 GbE adapters are under load

2018-10-30 Thread Hao Wei Tee
On 25/10/18 11:04 PM, Mathias Nyman wrote: There is a patch in usb-next that might help. f8f80be xhci: Use soft retry to recover faster from transaction errors It soft resets the halted host side endpoint, clears the halt without clearing the sequence number. FWIW, although I guess you might'

[PATCH] usb: dwc3: core: Clean up ULPI device

2018-10-30 Thread Felipe Balbi
From: Andy Shevchenko If dwc3_core_init_mode() fails with deferred probe, next probe fails on sysfs with sysfs: cannot create duplicate filename '/devices/pci:00/:00:11.0/dwc3.0.auto/dwc3.0.auto.ulpi' To avoid this failure, clean up ULPI device. Cc: Signed-off-by: Andy Shevchenko Si

Re: [PATCH 2/4 v5] memstick: Prevent memstick host from getting runtime suspended during card detection

2018-10-30 Thread Ulf Hansson
On 29 October 2018 at 17:31, Kai Heng Feng wrote: > > >> On Oct 29, 2018, at 20:25, Ulf Hansson wrote: >> >> On 24 October 2018 at 10:49, Kai-Heng Feng >> wrote: >>> We can use MEMSTICK_POWER_{ON,OFF} along with pm_runtime_{get,put} >>> helpers to let memstick host support runtime pm. >>> >>> T

Re: [PATCH 2/2] usb: dwc2: gadget: Accept LPM token when TxFIFO is not empty

2018-10-30 Thread Felipe Balbi
Hi, Artur Petrosyan writes: > To accept LPM token during ISOC transfers when TxFIFO > is not empty. this commit log tells me nothing. Why do you need this patch? Why CNT1 and not CNT0 or CNT2? -- balbi signature.asc Description: PGP signature

Re: [PATCH 1/2] usb: dwc2: gadget: Fix WkupAlert interrupt handler.

2018-10-30 Thread Felipe Balbi
Hi, Artur Petrosyan writes: > According to the databook DCTL_RMTWKUPSIG bit > is defined in DCTL register not in DCFG. > > Updated setting DCTL_RMTWKUPSIG bit to DCTL > register. > looks like this needs a Cc stable and Fixes tag. Care to add? -- balbi signature.asc Description: PGP signatu

Re: [PATCH 0/2] usb: dwc2: gadget: Fix Service Interval support.

2018-10-30 Thread Felipe Balbi
Hi, Artur Petrosyan writes: > 1. This patch set fixes WkupAlert interrupt handler. > 2. Adds support to accept LPM token when TxFIFO >is not empty. > > NOTE: Request to add this patch set on "tag: usb-for-v4.20" now that the merge window is already open? patch 1 seems like a fix, so it may

Re: [PATCH v3] xhci: Add quirk to workaround the errata seen on Cavium Thunder-X2 Soc

2018-10-30 Thread George Cherian
On 10/30/2018 04:56 PM, Mathias Nyman wrote: > > On 30.10.2018 12:48, Cherian, George wrote: >> Implement workaround for ThunderX2 Errata-129 (documented in >> CN99XX Known Issues" available at Cavium support site). >> As per ThunderX2errata-129, USB 2 device may come up as USB 1 >> if a connect

[PATCH 2/2] usb: dwc2: gadget: Accept LPM token when TxFIFO is not empty

2018-10-30 Thread Artur Petrosyan
To accept LPM token during ISOC transfers when TxFIFO is not empty. Signed-off-by: Artur Petrosyan Signed-off-by: Minas Harutyunyan --- drivers/usb/dwc2/gadget.c | 1 + drivers/usb/dwc2/hw.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2

[PATCH 0/2] usb: dwc2: gadget: Fix Service Interval support.

2018-10-30 Thread Artur Petrosyan
1. This patch set fixes WkupAlert interrupt handler. 2. Adds support to accept LPM token when TxFIFO is not empty. NOTE: Request to add this patch set on "tag: usb-for-v4.20" Artur Petrosyan (2): usb: dwc2: gadget: Fix WkupAlert interrupt handler. usb: dwc2: gadget: Accept LPM token when

[PATCH 1/2] usb: dwc2: gadget: Fix WkupAlert interrupt handler.

2018-10-30 Thread Artur Petrosyan
According to the databook DCTL_RMTWKUPSIG bit is defined in DCTL register not in DCFG. Updated setting DCTL_RMTWKUPSIG bit to DCTL register. Signed-off-by: Artur Petrosyan Signed-off-by: Minas Harutyunyan --- drivers/usb/dwc2/gadget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

Re: [PATCH v3] xhci: Add quirk to workaround the errata seen on Cavium Thunder-X2 Soc

2018-10-30 Thread Mathias Nyman
On 30.10.2018 12:48, Cherian, George wrote: Implement workaround for ThunderX2 Errata-129 (documented in CN99XX Known Issues" available at Cavium support site). As per ThunderX2errata-129, USB 2 device may come up as USB 1 if a connection to a USB 1 device is followed by another connection to a U

[PATCH v3] xhci: Add quirk to workaround the errata seen on Cavium Thunder-X2 Soc

2018-10-30 Thread Cherian, George
Implement workaround for ThunderX2 Errata-129 (documented in CN99XX Known Issues" available at Cavium support site). As per ThunderX2errata-129, USB 2 device may come up as USB 1 if a connection to a USB 1 device is followed by another connection to a USB 2 device, the link will come up as USB 1 fo

Re: [PATCH 07/10] hikey960: Support usb functionality of Hikey960

2018-10-30 Thread Heikki Krogerus
On Tue, Oct 30, 2018 at 10:50:22AM +0800, Chen Yu wrote: > > I think you have too many things integrated into this one driver. IMO > > it would at least be better to just let the Type-C port driver take > > care of VBUS like I mentioned above. I'm also wondering if it would > > make sense to handle

Re: [PATCH v2] xhci: Add quirk to workaround the errata seen on Cavium Thunder-X2 Soc

2018-10-30 Thread George Cherian
Hi Mathias, Thanks for the review. On 10/30/2018 03:20 PM, Mathias Nyman wrote: > > On 29.10.2018 18:54, Cherian, George wrote: >> Implement workaround for ThunderX2 Errata-129 (documented in >> CN99XX Known Issues" available at Cavium support site). >> As per ThunderX2errata-129, USB 2 device m

Re: [PATCH v2] xhci: Add quirk to workaround the errata seen on Cavium Thunder-X2 Soc

2018-10-30 Thread Mathias Nyman
On 29.10.2018 18:54, Cherian, George wrote: Implement workaround for ThunderX2 Errata-129 (documented in CN99XX Known Issues" available at Cavium support site). As per ThunderX2errata-129, USB 2 device may come up as USB 1 if a connection to a USB 1 device is followed by another connection to a U

RE: scsi_set_medium_removal timeout issue

2018-10-30 Thread Zengtao (B)
Hi: >-Original Message- >From: Oliver Neukum [mailto:oneu...@suse.com] >Sent: Tuesday, October 30, 2018 4:56 PM >To: Zengtao (B) ; j...@linux.vnet.ibm.com; >gre...@linuxfoundation.org; martin.peter...@oracle.com; >st...@rowland.harvard.edu >Cc: usb-stor...@lists.one-eyed-alien.net; linux-k

Re: USB Bluetooth dongle stop response with timeout error

2018-10-30 Thread Oliver Neukum
On Sa, 2018-10-27 at 22:56 +0800, Morikazu Fumita wrote: > I always found error messages of > "Bluetooth: hci0: command 0x0406 tx timeout" and The problem is likely shortly before that. > "dwc2 ffb4.usb: --Host Channel x Interrupt: Frame Overrun--" > when this problem is happening. > > Here'

Re: scsi_set_medium_removal timeout issue

2018-10-30 Thread Oliver Neukum
On Di, 2018-10-30 at 08:28 +, Zengtao (B) wrote: > Hi > For the issue itself, there is my observation: > In the step 4, the Host will issue an PREVENT_ALLOW_MEDIUM_REMOVAL scsi > command. > and and timeout happens due to the device 's very slow fsg_lun_fsync_sub. > I found there are two me

scsi_set_medium_removal timeout issue

2018-10-30 Thread Zengtao (B)
Hi I have recently met a scsi_set_medium_removal timeout issue, and it's related to both SCSI and USB MASS storage. Since i am not an expert in either scsi or usb mass storage, i am writing to report the issue and ask for a solution from you guys. My test scenario is as follow: 1.Linux HOST--