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

2019-08-23 Thread Greg KH
On Fri, Aug 23, 2019 at 10:28:24PM +, charles.h...@dellteam.com wrote: > --- /dev/null > +++ b/lib/acpi_mac_passthru.c > @@ -0,0 +1,61 @@ > +/* > + * Copyright (c) 2019 Dell Technology. All rights reserved. > + * > + * This program is free software; you can redistribute it and/or > + * modify

RE: [PATCH] HID: USB: Fix general protection fault caused by Logitech driver

2019-08-23 Thread Roderick.Colenbrander
On Thu, 22 Aug 2019, Alan Stern wrote: > > > > > I've ran the fuzzer with your patches applied overnight and noticed > > > > > another fallout of similar bugs. I think they are caused by a similar > > > > > issue in the sony HID driver. There's no hid_hw_stop() call in the "if > > > > > (!(hdev->c

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

2019-08-23 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 it in support of Dell's enterpri

[RFC 1/3] net: cdc_ncm: add get/set ethernet address functions

2019-08-23 Thread Charles.Hyde
This patch adds support for pushing a MAC address out to USB based ethernet controllers driven by cdc_ncm. With this change, ifconfig can now set the device's MAC address. For example, the Dell Universal Dock D6000 is driven by cdc_ncm. The D6000 can now have its MAC address set by ifconfig, as

[RFC 0/3] Add support into cdc_ncm for MAC address pass through

2019-08-23 Thread Charles.Hyde
This is my second iteration of proposed code changes, based on feedback from the first iteration. I dropped my original changes to usb/core and usbnet, in favor of keeping the needed get/set ethernet address functions in cdc_ncm driver. The changes in cdc_ncm driver reflect similar code in at

Re: Lacie Rugged USB3-FW does not work with UAS

2019-08-23 Thread Oliver Neukum
Am Freitag, den 23.08.2019, 16:21 +0200 schrieb Julian Sikorski: > > I did some further digging regarding whether this is a regression: the > quirk file on the laptop is from 15 July 2014. The machine is from ca. > May 2011. Looking through my earlier posts to linux-usb it appears that > the addit

Re: Slow I/O on USB media after commit f664a3cc17b7d0a2bc3b3ab96181e1029b0ec0e6

2019-08-23 Thread Alan Stern
On Fri, 23 Aug 2019, Andrea Vai wrote: > Il giorno mar, 20/08/2019 alle 13.13 -0400, Alan Stern ha scritto: > > On Mon, 19 Aug 2019, Andrea Vai wrote: > > > > > Hi Alan, > > > I attach the two traces, collected as follows: > > > > > > - start the trace; > > > - wait 10 seconds; > > > - plug th

Re: [RFC 3/4] Move ACPI functionality out of r8152 driver

2019-08-23 Thread Bjørn Mork
writes: > 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 it in support

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

2019-08-23 Thread Alan Stern
On Fri, 23 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: problems with Edgeport/416

2019-08-23 Thread walter harms
Am 21.08.2019 16:24, schrieb Schmid, Carsten: >> >> this should it be, >> > Suspicious: line 141 of the log: > [765647.193393] usb 7-1.1.2: reset full-speed USB device number 15 using > uhci_hcd > > Can you please collect another log around reset, additionally enabling uhci > dyndbg using > e

Re: f_mass_storage vs drivers/target

2019-08-23 Thread Alan Stern
On Fri, 23 Aug 2019, Benjamin Herrenschmidt wrote: > On Thu, 2019-08-22 at 13:30 -0400, Alan Stern wrote: > > On Thu, 22 Aug 2019, Benjamin Herrenschmidt wrote: > > > > > On Thu, 2019-08-22 at 14:58 +1000, Benjamin Herrenschmidt wrote: > > > > > > > > Ah lovely ... the 338x fails in EP autoconf

Re: Lacie Rugged USB3-FW does not work with UAS

2019-08-23 Thread Julian Sikorski
W dniu 23.08.2019 o 15:43, Julian Sikorski pisze: > W dniu 23.08.2019 o 15:39, Oliver Neukum pisze: >> Am Freitag, den 23.08.2019, 15:31 +0200 schrieb Julian Sikorski: >>> it appears that lacie rugged usb3-fw is not compatible with UAS. >>> I have just connected my few years old Lacie Rugged USB3-F

[Patch v5] usb: hcd: use managed device resources

2019-08-23 Thread Schmid, Carsten
Using managed device resources in usb_hcd_pci_probe() allows devm usage for resource subranges, such as the mmio resource for the platform device created to control host/device mode mux, which is a xhci extended capability, and sits inside the xhci mmio region. If managed device resources are not

Re: Lacie Rugged USB3-FW does not work with UAS

2019-08-23 Thread Julian Sikorski
W dniu 23.08.2019 o 15:39, Oliver Neukum pisze: > Am Freitag, den 23.08.2019, 15:31 +0200 schrieb Julian Sikorski: >> it appears that lacie rugged usb3-fw is not compatible with UAS. >> I have just connected my few years old Lacie Rugged USB3-FW to my new >> desktop PC to see if the backups I have

AW: [Patch v4] usb: hcd: fix use-after-free on driver removal

2019-08-23 Thread Schmid, Carsten
> > On driver removal, the platform_device_unregister call > > attached through devm_add_action_or_reset was executed > > after usb_hcd_pci_remove. > > This lead to a use-after-free for the iomem resource of > > the xhci-ext-caps driver in the platform removal > > because the parent of the resource

Re: Lacie Rugged USB3-FW does not work with UAS

2019-08-23 Thread Oliver Neukum
Am Freitag, den 23.08.2019, 15:31 +0200 schrieb Julian Sikorski: > it appears that lacie rugged usb3-fw is not compatible with UAS. > I have just connected my few years old Lacie Rugged USB3-FW to my new > desktop PC to see if the backups I have been creating on the laptop can > actually be restore

Re: [Patch v4] usb: hcd: fix use-after-free on driver removal

2019-08-23 Thread Mathias Nyman
On 23.8.2019 13.06, Schmid, Carsten wrote: On driver removal, the platform_device_unregister call attached through devm_add_action_or_reset was executed after usb_hcd_pci_remove. This lead to a use-after-free for the iomem resource of the xhci-ext-caps driver in the platform removal because the p

Lacie Rugged USB3-FW does not work with UAS

2019-08-23 Thread Julian Sikorski
Dear list, it appears that lacie rugged usb3-fw is not compatible with UAS. I have just connected my few years old Lacie Rugged USB3-FW to my new desktop PC to see if the backups I have been creating on the laptop can actually be restored. I have then noticed that the drive does not work in the de

Re: Slow I/O on USB media after commit f664a3cc17b7d0a2bc3b3ab96181e1029b0ec0e6

2019-08-23 Thread Andrea Vai
Il giorno mar, 20/08/2019 alle 13.13 -0400, Alan Stern ha scritto: > On Mon, 19 Aug 2019, Andrea Vai wrote: > > > Hi Alan, > > I attach the two traces, collected as follows: > > > > - start the trace; > > - wait 10 seconds; > > - plug the drive; > > - wait 5 seconds; > > - mount the drive; > >

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

2019-08-23 Thread Yoshihiro Shimoda
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 156: nobody cared (try booting with the "irqpoll" option)

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

2019-08-23 Thread Linus Walleij
On Fri, Aug 23, 2019 at 9:58 AM 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. > > Signed-off

[Patch v4] usb: hcd: fix use-after-free on driver removal

2019-08-23 Thread Schmid, Carsten
On driver removal, the platform_device_unregister call attached through devm_add_action_or_reset was executed after usb_hcd_pci_remove. This lead to a use-after-free for the iomem resource of the xhci-ext-caps driver in the platform removal because the parent of the resource was freed earlier. Fix

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

2019-08-23 Thread Nagarjuna Kristam
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 Kristam Acked-by: Thierry Reding --- drivers/usb/gadget/udc/Kconfig | 12 +

[Patch V7 8/8] arm64: defconfig: Enable tegra XUDC driver

2019-08-23 Thread Nagarjuna Kristam
Enable support for Nvidia XUSB device mode controller driver. Signed-off-by: Nagarjuna Kristam --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 358b163..e9233df 100644 --- a/arch/arm64/configs/d

[Patch V7 5/8] arm64: tegra: Add xudc node for Tegra210

2019-08-23 Thread Nagarjuna Kristam
Tegra210 has one XUSB device mode controller, which can be operated HS and SS modes. Add DT support for XUSB device mode controller. Signed-off-by: Nagarjuna Kristam Reviewed-by: JC Kuo --- arch/arm64/boot/dts/nvidia/tegra210.dtsi | 19 +++ 1 file changed, 19 insertions(+) diff

[Patch V7 6/8] arm64: tegra: Enable xudc on Jetson TX1

2019-08-23 Thread Nagarjuna Kristam
Enable XUSB device mode driver for USB0 slot on Jetson TX1. Signed-off-by: Nagarjuna Kristam Reviewed-by: JC Kuo --- arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi | 31 +- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/nvidia/tegra210-

[Patch V7 1/8] phy: tegra: xusb: Add XUSB dual mode support on Tegra210

2019-08-23 Thread Nagarjuna Kristam
Configure the port capabilities based on usb_dr_mode settings. Based on work by JC Kuo . Signed-off-by: Nagarjuna Kristam Reviewed-by: JC Kuo Acked-by: Thierry Reding --- drivers/phy/tegra/xusb-tegra210.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git

[Patch V7 4/8] dt-bindings: usb: Add NVIDIA Tegra XUSB device mode controller binding

2019-08-23 Thread Nagarjuna Kristam
Add device-tree binding documentation for the XUSB device mode controller present on Tegra210 SoC. This controller supports the USB 3.0 specification. Signed-off-by: Nagarjuna Kristam Reviewed-by: JC Kuo Reviewed-by: Rob Herring Acked-by: Thierry Reding --- .../devicetree/bindings/usb/nvidia,

[Patch V7 3/8] phy: tegra: xusb: Add vbus override support on Tegra210

2019-08-23 Thread Nagarjuna Kristam
Tegra XUSB device control driver needs to control vbus override during its operations, add API for the support. Signed-off-by: Nagarjuna Kristam Acked-by: Thierry Reding --- drivers/phy/tegra/xusb-tegra210.c | 57 +++ drivers/phy/tegra/xusb.c | 22 ++

[Patch V7 2/8] phy: tegra: xusb: Add usb3 port fake support on Tegra210

2019-08-23 Thread Nagarjuna Kristam
On Tegra210, usb2 only otg/peripheral ports dont work in device mode. They need an assosciated usb3 port to work in device mode. Identify an unused usb3 port and assign it as a fake USB3 port to USB2 only port whose mode is otg/peripheral. Based on work by BH Hsieh . Signed-off-by: Nagarjuna Kris

[Patch V7 0/8] Tegra XUSB gadget driver support

2019-08-23 Thread Nagarjuna Kristam
This is the seventh version of series "Tegra XUSB gadget driver support" Patches 1-3 are phy driver changes to add support for device mode. Patches 4-7 are changes related to XUSB device mode controller driver. Patch 8 is to enable XUDC driver in defconfig Test Steps(USB 2.0): - Enable "USB Gadge

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

2019-08-23 Thread Pawel Laszczak
Hi, >Hi, > >On 22/07/19 12:02 AM, Pawel Laszczak wrote: >> + >> +/** >> + * cdns3_req_ep0_get_status - Handling of GET_STATUS standard USB request >> + * @priv_dev: extended gadget object >> + * @ctrl_req: pointer to received setup packet >> + * >> + * Returns 0 if success, error code on error >>

Re: [PATCH] HID: USB: Fix general protection fault caused by Logitech driver

2019-08-23 Thread Jiri Kosina
On Thu, 22 Aug 2019, Alan Stern wrote: > > > > I've ran the fuzzer with your patches applied overnight and noticed > > > > another fallout of similar bugs. I think they are caused by a similar > > > > issue in the sony HID driver. There's no hid_hw_stop() call in the "if > > > > (!(hdev->claimed &

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

2019-08-23 Thread Vignesh Raghavendra
Hi, On 22/07/19 12:02 AM, Pawel Laszczak wrote: > + > +/** > + * cdns3_req_ep0_get_status - Handling of GET_STATUS standard USB request > + * @priv_dev: extended gadget object > + * @ctrl_req: pointer to received setup packet > + * > + * Returns 0 if success, error code on error > + */ > +static i

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

2019-08-23 Thread Mathias Nyman
On 23.8.2019 9.40, Chunfeng Yun wrote: Some SoCs may have an optional clock xhci_ck (125M or 200M), it usually uses the same PLL as sys_ck, so support it. Signed-off-by: Chunfeng Yun Acked-by: Mathias Nyman

[PATCH next v10 05/11] usb: roles: Introduce stubs for the exiting functions in role.h

2019-08-23 Thread Chunfeng Yun
From: Yu Chen This patch adds stubs for the exiting functions while CONFIG_USB_ROLE_SWITCH does not enabled. Cc: Greg Kroah-Hartman Cc: Heikki Krogerus Cc: Hans de Goede Cc: Andy Shevchenko Cc: John Stultz Reviewed-by: Heikki Krogerus Signed-off-by: Yu Chen Signed-off-by: Chunfeng Yun --

[PATCH next v10 02/11] dt-bindings: connector: add optional properties for Type-B

2019-08-23 Thread Chunfeng Yun
Add id-gpios, vbus-gpios, vbus-supply and pinctrl properties for usb-b-connector Signed-off-by: Chunfeng Yun Reviewed-by: Rob Herring --- v6~v10 no changes v5 changes: 1. add reviewed by Rob v4 no changes v3 changes: 1. add GPIO direction, and use fixed-regulator for GPIO controlled VBU

[PATCH next v10 00/11] add USB GPIO based connection detection driver

2019-08-23 Thread Chunfeng Yun
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, meanwhile there is no available common driver when use Type-B connector, typically using an input GPIO to detect USB ID pin. This pat

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

2019-08-23 Thread Chunfeng Yun
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. Signed-off-by: Chunfeng Yun --- v9~v10 no changes v8 changes: 1. rename

[PATCH next v10 06/11] device connection: Add fwnode_connection_find_match()

2019-08-23 Thread Chunfeng Yun
From: Heikki Krogerus The fwnode_connection_find_match() function is exactly the same as device_connection_find_match(), except it takes struct fwnode_handle as parameter instead of struct device. That allows locating device connections before the device entries have been created. Signed-off-by:

[PATCH next v10 10/11] usb: common: add USB GPIO based connection detection driver

2019-08-23 Thread Chunfeng Yun
Due to the requirement of usb-connector.txt binding, the old way using extcon to support USB Dual-Role switch is now deprecated when use Type-B connector. This patch introduces a USB GPIO based connection detection driver, used to support Type-B connector which typically uses an input GPIO to detec

[PATCH next v10 04/11] dt-bindings: usb: mtu3: add properties about USB Role Switch

2019-08-23 Thread Chunfeng Yun
Now the USB Role Switch is supported, so add properties about it, and modify some description related. Signed-off-by: Chunfeng Yun Reviewed-by: Rob Herring --- v6~v10 no changes v5 changes: 1. modify decription about extcon and vbus-supply properties 2. make this patch depend on [1] [1]: [v

[PATCH next v10 08/11] usb: roles: get usb-role-switch from parent

2019-08-23 Thread Chunfeng Yun
when the USB host controller is the parent of the connector, usually type-B, sometimes don't need the graph, so we should check whether it's parent registers usb-role-switch or not firstly, and get it if exists. Suggested-by: Heikki Krogerus Signed-off-by: Chunfeng Yun --- v10: no changes v9:

[PATCH next v10 07/11] usb: roles: Add fwnode_usb_role_switch_get() function

2019-08-23 Thread Chunfeng Yun
From: Heikki Krogerus The fwnode_usb_role_switch_get() function is exactly the same as usb_role_switch_get(), except that it takes struct fwnode_handle as parameter instead of struct device. Signed-off-by: Heikki Krogerus Signed-off-by: Chunfeng Yun Tested-by: Biju Das --- v10: revert chang

[PATCH next v10 01/11] dt-binding: usb: add usb-role-switch property

2019-08-23 Thread Chunfeng Yun
Add a property usb-role-switch to tell the driver that use USB Role Switch framework to handle the role switch, it's useful when the driver has already supported other ways, such as extcon framework etc. Cc: Biju Das Cc: Yu Chen Signed-off-by: Chunfeng Yun Reviewed-by: Rob Herring Reviewed-by:

[PATCH next v10 09/11] usb: common: create Kconfig file

2019-08-23 Thread Chunfeng Yun
Create Kconfig file for USB common core, and move USB_LED_TRIG and USB_ULPI_BUS configs into the new file from the parent Kconfig, it will help to add new configs later. Signed-off-by: Chunfeng Yun --- v9~v10: no changes v8: new patch --- drivers/usb/Kconfig| 35 +-

[PATCH next v10 11/11] usb: mtu3: register a USB Role Switch for dual role mode

2019-08-23 Thread Chunfeng Yun
Because extcon is not allowed for new bindings, and the dual role switch is supported by USB Role Switch, especially for Type-C drivers, so register a USB Role Switch to support the new way Signed-off-by: Chunfeng Yun --- v5~v10 no changes v4 changes: 1. assign fwnode member of usb_role_switch

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

2019-08-23 Thread Matthias Brugger
On 23/08/2019 08:40, Chunfeng Yun wrote: > Some SoCs may have an optional clock xhci_ck (125M or 200M), it > usually uses the same PLL as sys_ck, so support it. > > Signed-off-by: Chunfeng Yun Reviewed-by: Matthias Brugger > --- > v2 no changes > --- > drivers/usb/host/xhci-mtk.c | 13