Re: [PATCH] [PATCH v6] USB: serial: pl2303: Add new PID to support PL2303HXN (TYPE_HXN)

2019-08-27 Thread Charles Yeh
Johan Hovold 於 2019年7月16日 週二 下午4:33寫道: > > Ok, thanks for confirming. Note that I asked you about this back in > April (15 April). > > In that very same mail thread I also pointed out that you must not > ignore review feedback. Even if for some reason disagree with it you > should at least explain

Re: Ryzen7 3700U xhci fails on resume from sleep

2019-08-27 Thread Rafael J. Wysocki
On Tue, Aug 27, 2019 at 4:50 AM Daniel Drake wrote: > > On Mon, Aug 26, 2019 at 9:32 PM Mathias Nyman > wrote: > > On 26.8.2019 12.29, Rafael J. Wysocki wrote: > > > I wonder if you can reproduce this with the pm-s2idle-rework branch > > > from linux-pm.git merged in. > > > > Root cause looks sim

5.3.0-rc6: DELL Latitude 7400 2-in-1 (Whiskey Lake) unable to `s2idle`, XHC causes wakeups

2019-08-27 Thread Leho Kraav
Hi all [0.00] DMI: Dell Inc. Latitude 7400 2-in-1/0HCNR3, BIOS 1.4.0 06/10/2019 [0.225802] smpboot: CPU0: Intel(R) Core(TM) i5-8365U CPU @ 1.60GHz (family: 0x6, model: 0x8e, stepping: 0xc) For some reason this machine out of the box can't suspend on latest Linux, because XHC wakeup

Re: [PATCH] [PATCH v7] USB: serial: pl2303: Add new PID to support PL2303HXN (TYPE_HXN)

2019-08-27 Thread Charles Yeh
Johan Hovold 於 2019年7月16日 週二 下午4:49寫道: > > #define PL2303_FLOWCTRL_MASK 0xf0 > > +#define PL2303_HXN_FLOWCTRL_MASK 0x1C > > +#define PL2303_HXN_FLOWCTRL 0x0A > > I asked you to keep related defines together (and to move the mask where > the register define was, not the other

[PATCH 0/4] usb: host: xhci-{plat,rcar}: clean up and add a workaround

2019-08-27 Thread Yoshihiro Shimoda
This patch series is based on the latest Greg's linux-usb.git / usb-next branch. >From patch 1 to 3 are clean-up patches and patch 4 is adding a workaround code for a specific condition. So, I don't think the patch 4 is not a fixed patch. Yoshihiro Shimoda (4): usb: host: xhci-plat: add quirks

[PATCH 3/4] usb: host: xhci-rcar: Use xhci_plat_priv.quirks instead of code settings

2019-08-27 Thread Yoshihiro Shimoda
This patch uses xhci_plat_priv.quirks to simplify. The previous code had conditions to set some quirks in xhci_rcar_init_quirk(). But, the xhci_rcar_init_quirk() is called at the same conditions. So, no behavior change. Signed-off-by: Yoshihiro Shimoda --- drivers/usb/host/xhci-rcar.c | 28 -

[PATCH 2/4] usb: host: xhci-rcar: Add a helper macro to set xhci_plat_priv

2019-08-27 Thread Yoshihiro Shimoda
To avoid copy-and-paste setting of xhci_plat_priv for R-Car SoCs, this patch add a helper macro SET_XHCI_PLAT_PRIV_FOR_RCAR. Signed-off-by: Yoshihiro Shimoda --- drivers/usb/host/xhci-plat.c | 10 ++ drivers/usb/host/xhci-rcar.h | 7 +++ 2 files changed, 9 insertions(+), 8 deletions

[PATCH 1/4] usb: host: xhci-plat: add quirks member into struct xhci_plat_priv

2019-08-27 Thread Yoshihiro Shimoda
To simplify adding xhci->quirks instead of the .init_quirk() function, this patch adds a new parameter "quirks" into the struct xhci_plat_priv. Signed-off-by: Yoshihiro Shimoda --- drivers/usb/host/xhci-plat.c | 4 +++- drivers/usb/host/xhci-plat.h | 2 ++ 2 files changed, 5 insertions(+), 1 del

[PATCH 4/4] usb: host: xhci-rcar: avoid 60s wait by request_firmware() in system booting

2019-08-27 Thread Yoshihiro Shimoda
If CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y and CONFIG_USB_XHCI_RCAR=y, request_firmware() in xhci_rcar_download_firmware() waits for 60s to sysfs fallback for the firmware like below. [1.599701] xhci-hcd ee00.usb: xHCI Host Controller [1.604948] xhci-hcd ee00.usb: new USB bus regis

[PATCH] USB: cdc-wdm: fix race between write and disconnect due to flag abuse

2019-08-27 Thread Oliver Neukum
In case of a disconnect an ongoing flush() has to be made fail. Nevertheless we cannot be sure that any pending URB has already finished, so although they will never succeed, they still must not be touched. The clean solution for this is to check for WDM_IN_USE and WDM_DISCONNECTED in flush(). Ther

Re: [PATCH 2/2] usb: gadget: net2280: Add workaround for AB chip Errata 11

2019-08-27 Thread guido
Zitat von Benjamin Herrenschmidt : The errata description is: Workaround for Default Duration of LFPS Handshake Signaling for Device-Initiated U1 Exit is too short. The default duration of the LFPS handshake generated by USB3380 for a device-initiated U1-exit may not be long enough for cer

Re: [PATCH] usb: dwc3: Add shutdown to platform_driver

2019-08-27 Thread Vicente Bergas
On Saturday, August 17, 2019 7:41:40 PM CEST, Vicente Bergas wrote: Otherwise the device keeps writing to memory after kexec and disturbs the next kernel. Signed-off-by: Vicente Bergas --- drivers/usb/dwc3/dwc3-of-simple.c | 6 ++ 1 file changed, 6 insertions(+) Hi Felipe, Robin, this ver

Re: [PATCH] usb: dwc3: Add shutdown to platform_driver

2019-08-27 Thread Felipe Balbi
Hi, Vicente Bergas writes: > On Saturday, August 17, 2019 7:41:40 PM CEST, Vicente Bergas wrote: >> Otherwise the device keeps writing to memory after kexec and disturbs >> the next kernel. >> >> Signed-off-by: Vicente Bergas >> --- >> drivers/usb/dwc3/dwc3-of-simple.c | 6 ++ >> 1 file ch

RE: [EXT] Re: [PATCH v1] usb: dwc3: remove the call trace of USBx_GFLADJ

2019-08-27 Thread Felipe Balbi
Hi, Ran Wang writes: >> Yinbo Zhu writes: >> >> Yinbo Zhu writes: >> >> >> > diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c >> >> >> > index >> >> >> > 98bce85c29d0..a133d8490322 100644 >> >> >> > --- a/drivers/usb/dwc3/core.c >> >> >> > +++ b/drivers/usb/dwc3/core.c >> >> >> >

Re: [PATCH] usb: dwc3: Add shutdown to platform_driver

2019-08-27 Thread Vicente Bergas
On Tuesday, August 27, 2019 1:53:04 PM CEST, Felipe Balbi wrote: Hi, Vicente Bergas writes: On Saturday, August 17, 2019 7:41:40 PM CEST, Vicente Bergas wrote: Otherwise the device keeps writing to memory after kexec and disturbs the next kernel. ... why don't you just have shutdown use th

Re: [PATCH 1/4] usb: host: xhci-plat: add quirks member into struct xhci_plat_priv

2019-08-27 Thread Geert Uytterhoeven
Hi Shimoda-san, On Tue, Aug 27, 2019 at 12:05 PM Yoshihiro Shimoda wrote: > To simplify adding xhci->quirks instead of the .init_quirk() > function, this patch adds a new parameter "quirks" into > the struct xhci_plat_priv. > > Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven

Re: [PATCH 2/4] usb: host: xhci-rcar: Add a helper macro to set xhci_plat_priv

2019-08-27 Thread Geert Uytterhoeven
On Tue, Aug 27, 2019 at 12:06 PM Yoshihiro Shimoda wrote: > To avoid copy-and-paste setting of xhci_plat_priv for R-Car SoCs, > this patch add a helper macro SET_XHCI_PLAT_PRIV_FOR_RCAR. > > Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Gr{oetje,eeting}s,

Re: [PATCH 3/4] usb: host: xhci-rcar: Use xhci_plat_priv.quirks instead of code settings

2019-08-27 Thread Geert Uytterhoeven
On Tue, Aug 27, 2019 at 12:04 PM Yoshihiro Shimoda wrote: > This patch uses xhci_plat_priv.quirks to simplify. The previous > code had conditions to set some quirks in xhci_rcar_init_quirk(). > But, the xhci_rcar_init_quirk() is called at the same conditions. > So, no behavior change. > > Signed-o

[PATCH] usb: host: xhci: rcar: Fix typo in compatible string matching

2019-08-27 Thread Geert Uytterhoeven
It's spelled "renesas", not "renensas". Due to this typo, RZ/G1M and RZ/G1N were not covered by the check. Fixes: 2dc240a3308b269a ("usb: host: xhci: rcar: retire use of xhci_plat_type_is()") Signed-off-by: Geert Uytterhoeven --- drivers/usb/host/xhci-rcar.c | 2 +- 1 file changed, 1 insertion

Re: [PATCH 0/2] usb: roles: intel: Use static mode by default

2019-08-27 Thread Hans de Goede
Hi Heikki, On 26-08-19 16:32, Heikki Krogerus wrote: Hi Hans, These have been in my queue for a while now. For some reason I've been under the impression that there was still an issue with them, but that was a misunderstanding. Saranya and Balaji, I'm really sorry about that. Hans, I don't kno

Re: [PATCH 2/2] usb: roles: intel: Enable static DRD mode for role switch

2019-08-27 Thread Hans de Goede
Hi, On 26-08-19 16:32, Heikki Krogerus wrote: From: Saranya Gopal Enable static DRD mode in Intel platforms which guarantees successful role switch all the time. This fixes issues like software role switch failure after cold boot and issue with role switch when USB 3.0 cable is used. But, do n

Re: [PATCH v3] usb: host: ohci: fix a race condition between shutdown and irq

2019-08-27 Thread Alan Stern
On Tue, 27 Aug 2019, Yoshihiro Shimoda wrote: > This patch fixes an issue that the following error is > possible to happen when ohci hardware causes an interruption > and the system is shutting down at the same time. > > [ 34.851754] usb 2-1: USB disconnect, device number 2 > [ 35.166658] irq

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

2019-08-27 Thread shuah
On 8/26/19 11:23 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 n

Re: [PATCH v3 04/11] modpost: add support for symbol namespaces

2019-08-27 Thread Matthias Maennich
On Mon, Aug 26, 2019 at 06:21:38PM +0200, Jessica Yu wrote: +++ Matthias Maennich [21/08/19 12:49 +0100]: Add support for symbols that are exported into namespaces. For that, extract any namespace suffix from the symbol name. In addition, emit a warning whenever a module refers to an exported sy

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

2019-08-27 Thread shuah
On 8/27/19 8:38 AM, shuah wrote: On 8/26/19 11:23 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 a

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

2019-08-27 Thread Enric Balletbo i Serra
Hi, On 16/8/19 19:02, Duncan Laurie wrote: > On Fri, Aug 16, 2019 at 2:12 AM Greg Kroah-Hartman > wrote: >> >> On Thu, Aug 15, 2019 at 05:42:05PM -0600, Duncan Laurie wrote: >>> On Wed, Aug 14, 2019 at 6:08 PM Nick Crews wrote: Adding Duncan Laurie who I think has some more intimate kn

Re: [PATCH v3 03/11] module: add support for symbol namespaces.

2019-08-27 Thread Jessica Yu
+++ Matthias Maennich [21/08/19 12:49 +0100]: The EXPORT_SYMBOL_NS() and EXPORT_SYMBOL_NS_GPL() macros can be used to export a symbol to a specific namespace. There are no _GPL_FUTURE and _UNUSED variants because these are currently unused, and I'm not sure they are necessary. I didn't add EXPO

Re: [PATCH v3 03/11] module: add support for symbol namespaces.

2019-08-27 Thread Matthias Maennich
On Tue, Aug 27, 2019 at 05:37:18PM +0200, Jessica Yu wrote: +++ Matthias Maennich [21/08/19 12:49 +0100]: The EXPORT_SYMBOL_NS() and EXPORT_SYMBOL_NS_GPL() macros can be used to export a symbol to a specific namespace. There are no _GPL_FUTURE and _UNUSED variants because these are currently un

Re: fsck on ext4: "WARN Wrong bounce buffer write length: 1024 != 0"

2019-08-27 Thread Theodore Y. Ts'o
On Tue, Aug 27, 2019 at 08:00:14AM +0200, Harald Dunkel wrote: > FYI: "fsck -y" on an external USB drive (USB-C, ext4) gave > me a ton of messages > > : > [ 191.261939] xhci_hcd :05:00.0: WARN Wrong bounce buffer write length: > 1024 != 0 > [ 191.263743] xhci_hcd :05:00.0: WARN Wrong bo

Re: [PATCH v2 2/2] USB: storage: ums-realtek: Make auto-delink support optionally

2019-08-27 Thread Kai-Heng Feng
at 23:55, Alan Stern wrote: On Mon, 26 Aug 2019, Kai-Heng Feng wrote: Auto-delink requires writing special registers to ums-realtek device. Unconditionally enable auto-delink may break newer devices. So only enable auto-delink by default for the original three IDs, 0x0138, 0x0158 and 0x0159.

[PATCH v3 1/2] USB: storage: ums-realtek: Update module parameter description for auto_delink_en

2019-08-27 Thread Kai-Heng Feng
The option named "auto_delink_en" is a bit misleading, as setting it to false doesn't really disable auto-delink but let auto-delink be firmware controlled. Update the description to reflect the real usage of this parameter. Signed-off-by: Kai-Heng Feng --- v2: - Only update module parameter des

[PATCH v3 2/2] USB: storage: ums-realtek: Whitelist auto-delink support

2019-08-27 Thread Kai-Heng Feng
Auto-delink requires writing special registers to ums-realtek devices. Unconditionally enable auto-delink may break newer devices. So only enable auto-delink by default for the original three IDs, 0x0138, 0x0158 and 0x0159. Realtek is working on a patch to properly support auto-delink for other I

Re: [PATCH next v10 03/11] dt-bindings: usb: add binding for USB GPIO based connection detection driver

2019-08-27 Thread Rob Herring
On Fri, Aug 23, 2019 at 03:57:13PM +0800, Chunfeng Yun wrote: > It's used to support dual role switch via GPIO when use Type-B > receptacle, typically the USB ID pin is connected to an input > GPIO, and also used to enable/disable device when the USB Vbus > pin is connected to an input GPIO. > > S

Re: [PATCH v3 2/2] USB: storage: ums-realtek: Whitelist auto-delink support

2019-08-27 Thread Alan Stern
On Wed, 28 Aug 2019, Kai-Heng Feng wrote: > Auto-delink requires writing special registers to ums-realtek devices. > Unconditionally enable auto-delink may break newer devices. > > So only enable auto-delink by default for the original three IDs, > 0x0138, 0x0158 and 0x0159. > > Realtek is worki

Re: [PATCH v3 2/2] USB: storage: ums-realtek: Whitelist auto-delink support

2019-08-27 Thread Greg KH
On Tue, Aug 27, 2019 at 02:56:36PM -0400, Alan Stern wrote: > On Wed, 28 Aug 2019, Kai-Heng Feng wrote: > > > Auto-delink requires writing special registers to ums-realtek devices. > > Unconditionally enable auto-delink may break newer devices. > > > > So only enable auto-delink by default for th

RE: [RFC 2/3] ACPI: move ACPI functionality out of r8152 driver

2019-08-27 Thread Charles.Hyde
> > > This change moves ACPI functionality out of the Realtek r8152 driver > > > to its own source and header file, making it available to other > > > drivers as needed now and into the future. At the time this ACPI > > > snippet was introduced in 2016, only the Realtek driver made use of > > > i

RE: [RFC 2/3] ACPI: move ACPI functionality out of r8152 driver

2019-08-27 Thread Mario.Limonciello
> -Original Message- > From: Hyde, Charles - Dell Team > Sent: Tuesday, August 27, 2019 5:08 PM > To: Limonciello, Mario; Bjørn Mork > Cc: linux-a...@vger.kernel.org; oli...@neukum.org; nic_s...@realtek.com; > linux-usb@vger.kernel.org > Subject: RE: [RFC 2/3] ACPI: move ACPI functionalit

Re: [RESEND PATCH v2 1/2] dt-bindings: usb: mtk-xhci: add an optional xhci_ck clock

2019-08-27 Thread Rob Herring
On Fri, 23 Aug 2019 14:40:24 +0800, Chunfeng Yun wrote: > Add a new optional clock xhci_ck > > Signed-off-by: Chunfeng Yun > --- > v2 changes: > 1. add the new clock at the end, suggested by Rob > --- > Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt | 5 +++-- > 1 file changed, 3

[PATCH] usb: storage: Add ums-cros-aoa driver

2019-08-27 Thread Julius Werner
This patch adds a new "unusual" USB mass storage device driver. This driver will be used for a virtual USB storage device presented by an Android phone running the 'Chrome OS Recovery'* Android app. This app uses the Android Open Accessory (AOA) API to talk directly to a USB host attached to the ph

Re: [PATCH] usb: storage: Add ums-cros-aoa driver

2019-08-27 Thread Matthew Dharm
(Sending this again, because I forgot to switch my mail client to plain-text-only last time). Why not do the mode switch from userspace? I thought we were trying to move all the mode-switching stuff in that direction. Matt On Tue, Aug 27, 2019 at 4:14 PM Julius Werner wrote: > > This patc

Re: [PATCH] usb: storage: Add ums-cros-aoa driver

2019-08-27 Thread Julius Werner
> Why not do the mode switch from userspace? I thought we were trying to move > all the mode-switching stuff in that direction. I need to tie in to the main USB mass storage driver in a way that I think would make it too complicated to move the mode switching part to userspace. See the part

Re: [PATCH next v10 03/11] dt-bindings: usb: add binding for USB GPIO based connection detection driver

2019-08-27 Thread Chunfeng Yun
On Tue, 2019-08-27 at 13:31 -0500, Rob Herring wrote: > On Fri, Aug 23, 2019 at 03:57:13PM +0800, Chunfeng Yun wrote: > > It's used to support dual role switch via GPIO when use Type-B > > receptacle, typically the USB ID pin is connected to an input > > GPIO, and also used to enable/disable device

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

2019-08-27 Thread Suwan Kim
On Tue, Aug 27, 2019 at 08:43:55AM -0600, shuah wrote: > On 8/27/19 8:38 AM, shuah wrote: > > On 8/26/19 11:23 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 nativ

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

2019-08-27 Thread Peter Chen
On 19-07-23 11:02:07, Chuhong Yuan wrote: > 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_hd

[PATCH v9] usbip: Implement SG support to vhci-hcd and stub driver

2019-08-27 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: [PATCH 1/4] usb: host: xhci-plat: add quirks member into struct xhci_plat_priv

2019-08-27 Thread Yoshihiro Shimoda
Hi Geert-san, > From: Geert Uytterhoeven, Sent: Tuesday, August 27, 2019 9:36 PM > > Hi Shimoda-san, > > On Tue, Aug 27, 2019 at 12:05 PM Yoshihiro Shimoda > wrote: > > To simplify adding xhci->quirks instead of the .init_quirk() > > function, this patch adds a new parameter "quirks" into > > t

RE: [PATCH] usb: host: xhci: rcar: Fix typo in compatible string matching

2019-08-27 Thread Yoshihiro Shimoda
Hi Geert-san, > From: Geert Uytterhoeven, Sent: Tuesday, August 27, 2019 9:51 PM > > It's spelled "renesas", not "renensas". > > Due to this typo, RZ/G1M and RZ/G1N were not covered by the check. > > Fixes: 2dc240a3308b269a ("usb: host: xhci: rcar: retire use of > xhci_plat_type_is()") > Signe

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

2019-08-27 Thread Peter Chen
On 19-08-26 18:25:12, jun...@nxp.com wrote: > From: Li Jun > > USB role is fully controlled by usb role switch consumer(e.g. typec), > usb port can be at host mode(USB_ROLE_HOST), device mode connected to > host(USB_ROLE_DEVICE), or not connecting any partner(USB_ROLE_NONE). > > Signed-off-by: L