Re: [PATCH] USB: serial: mos7840: Prefer 'unsigned int' to bare use of 'unsigned'

2019-05-17 Thread Johan Hovold
On Thu, May 16, 2019 at 06:37:59PM +0530, parna.naveenku...@gmail.com wrote: > From: Naveen Kumar Parna > > This fixes checkpatch.pl warning "WARNING: Prefer 'unsigned int' to > bare use of 'unsigned'". Please don't run checkpatch.pl on code that already in the kernel (possibly with the exceptio

Re: [PATCH v5 4/6] usb: roles: add API to get usb_role_switch by node

2019-05-17 Thread Heikki Krogerus
On Tue, May 14, 2019 at 04:47:21PM +0800, Chunfeng Yun wrote: > Add fwnode_usb_role_switch_get() to make easier to get > usb_role_switch by fwnode which register it. > It's useful when there is not device_connection registered > between two drivers and only knows the fwnode which register > usb_rol

Re: [RFC PATCH v2 0/3] prerequisites for device reserved local mem rework

2019-05-17 Thread Laurentiu Tudor
Hi Fredrik, On 16.05.2019 18:15, Fredrik Noring wrote: > Hi Laurentiu, > >> I took your code, added the missing mapping and placed it in a patch. >> Please see attached (compile tested only). > > Thanks! Unfortunately, the OHCI fails with errors such as > > usb 1-1: device descriptor read

[PATCH v4] usb: exynos: add workaround for the USB device bindings conflict

2019-05-17 Thread Marek Szyprowski
Commit 69bec7259853 ("USB: core: let USB device know device node") added support for attaching devicetree node for USB devices. Those nodes are children of their USB host controller. However Exynos EHCI and OHCI driver bindings already define child-nodes for each physical root hub port and assigns

Re: [PATCH v3] usb: core: verify devicetree nodes for USB devices

2019-05-17 Thread Marek Szyprowski
Hi Måns On 2019-05-13 12:06, Måns Rullgård wrote: > Marek Szyprowski writes: > >> Hi Peter, >> >> On 2019-05-13 11:23, Peter Chen wrote: On 2019-05-13 11:00, Peter Chen wrote: >> On 2019-05-10 05:10, Peter Chen wrote: Marek Szyprowski writes: > Commit 69bec7259853 ("USB

Re: [PATCH v3] usb: core: verify devicetree nodes for USB devices

2019-05-17 Thread Marek Szyprowski
Hi Måns On 2019-05-13 12:03, Måns Rullgård wrote: > Marek Szyprowski writes: >> Hi Peter, >> >> On 2019-05-10 05:10, Peter Chen wrote: >>> Marek Szyprowski writes: > Commit 69bec7259853 ("USB: core: let USB device know device node") > added support for attaching devicetree node for

Re: [PATCH v5 4/6] usb: roles: add API to get usb_role_switch by node

2019-05-17 Thread Heikki Krogerus
Hi, On Fri, May 17, 2019 at 01:37:36PM +0300, Heikki Krogerus wrote: > On Tue, May 14, 2019 at 04:47:21PM +0800, Chunfeng Yun wrote: > > Add fwnode_usb_role_switch_get() to make easier to get > > usb_role_switch by fwnode which register it. > > It's useful when there is not device_connection regis

Re: [v3 PATCH] dt-binding: usb: add usb-role-switch property

2019-05-17 Thread Heikki Krogerus
On Wed, May 08, 2019 at 05:17:44PM +0800, Chunfeng Yun wrote: > 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:

Re: [PATCH v10 1/2] usb: xhci : Add devaddr in struct usb_device

2019-05-17 Thread Jim Lin
Sorry, something went wrong. The result is not as expected in one of the tests. Abandon this series of patches. Will debug and resubmit later. Jim On 2019年05月16日 22:56, Alan Stern wrote: On Thu, 16 May 2019, Jim Lin wrote: The Clear_TT_Buffer request sent to the hub includes the address

Re: [PATCH v4] usb: exynos: add workaround for the USB device bindings conflict

2019-05-17 Thread Alan Stern
On Fri, 17 May 2019, Marek Szyprowski wrote: > Commit 69bec7259853 ("USB: core: let USB device know device node") added > support for attaching devicetree node for USB devices. Those nodes are > children of their USB host controller. However Exynos EHCI and OHCI > driver bindings already define ch

Re: [PATCH v10 2/2] usb: xhci: Add Clear_TT_Buffer

2019-05-17 Thread Mathias Nyman
On 16.5.2019 17.40, Jim Lin wrote: USB 2.0 specification chapter 11.17.5 says "as part of endpoint halt processing for full-/low-speed endpoints connected via a TT, the host software must use the Clear_TT_Buffer request to the TT to ensure that the buffer is not in the busy state". In our case,

[RFC PATCH] usb: host: xhci: allow __GFP_FS in dma allocation

2019-05-17 Thread Jaewon Kim
Hello I don't have enough knowledge on USB core but I've wondered why GFP_NOIO has been used in xhci_alloc_dev for xhci_alloc_virt_device. I found commit ("a6d940dd759b xhci: Use GFP_NOIO during device reset"). But can we just change GFP_NOIO to __GFP_RECLAIM | __GFP_FS ? Please refer to below cas

Re: [RFC PATCH] usb: host: xhci: allow __GFP_FS in dma allocation

2019-05-17 Thread Matthew Wilcox
On Sat, May 18, 2019 at 01:02:28AM +0900, Jaewon Kim wrote: > Hello I don't have enough knowledge on USB core but I've wondered > why GFP_NOIO has been used in xhci_alloc_dev for > xhci_alloc_virt_device. I found commit ("a6d940dd759b xhci: Use > GFP_NOIO during device reset"). But can we just chan

[PATCH 2/4] usb: typec: ucsi: ccg: enable runtime pm support

2019-05-17 Thread Ajay Gupta
From: Ajay Gupta The change enables runtime pm support to UCSI CCG driver. ucsi_send_command() is used in resume path and so exported ucsi_send_command() symbol in ucsi.c for modular build. Signed-off-by: Ajay Gupta --- drivers/usb/typec/ucsi/ucsi.c | 1 + drivers/usb/typec/ucsi/ucsi_ccg.

[PATCH 1/4] i2c: nvidia-gpu: add runtime pm support

2019-05-17 Thread Ajay Gupta
From: Ajay Gupta Enable runtime pm support with autosuspend delay of three second. This is to make sure I2C client device Cypress CCGx has completed all transaction. Signed-off-by: Ajay Gupta --- drivers/i2c/busses/i2c-nvidia-gpu.c | 24 +--- 1 file changed, 21 insertions(+

[PATCH 4/4] usb: typec: ucsi: ccg: add runtime pm workaround

2019-05-17 Thread Ajay Gupta
From: Ajay Gupta Cypress USB Type-C CCGx controller firmware verson 3.1.10 (which is being used in many NVIDIA GPU cards) has known issue of not triggering interrupt when a USB device is hot plugged to runtime resume the controller. Many of these cards may get latest kernel but may not get latest

[PATCH 0/4] usb: typec: ucsi: ccg: add runtime pm support

2019-05-17 Thread Ajay Gupta
Hi Heikki These patches add support for runtime power management for UCSI CCGx driver. I have tested them with NVIDIA GPU card which has i2c interface to talk to CCG controller. I have added runtime pm support for the i2c bus driver as well. First two patches add support for runtime pm in i2c bus

[PATCH 3/4] i2c: nvidia-gpu: resume ccgx i2c client

2019-05-17 Thread Ajay Gupta
From: Ajay Gupta Cypress USB Type-C CCGx controller firmware (which is being used in many NVIDIA GPU cards) has known issue of not triggering interrupt when a USB device is hot plugged to runtime resume the controller. Many of these cards may get latest kernel but may not get latest fixed firmwar

Re: [RFC PATCH v2 0/3] prerequisites for device reserved local mem rework

2019-05-17 Thread Fredrik Noring
Hi Laurentiu, > > that I tracked down to the calls > > > >hub_port_init > > -> usb_control_msg > > -> usb_internal_control_msg > > -> usb_start_wait_urb > > -> usb_submit_urb > > -> usb_hcd_submit_urb > > -> hcd->driver->urb_enqueue > > -> ohci_urb_enqueue > >

JMicron JMS578 USB-to-SATA HDD enclosure not working

2019-05-17 Thread Guido Trentalancia
Hello. I am trying to use a Digitus DA-71114 USB-to-SATA HDD enclosure. Such unit is reported to use the JMicron JMS578 chipset by the same manufacturer, although it is listed with a different USB VID/PID: 0080:a001. Immediately after plugging in the USB cable, it reports I/O errors, even though

Re: [RFC PATCH] usb: host: xhci: allow __GFP_FS in dma allocation

2019-05-17 Thread Jaewon Kim
Thank you for your comment. In ARM64 architecture, default CMA region is commonly activated and it could be used if no specific memory region is defined. The USB driver in my platform also uses the default CMA region as DMA allocation. If using the CMA to do DMA allocation is improper, then do you

Re: [CFT][PATCH] signal/usb: Replace kill_pid_info_as_cred with kill_pid_usb_asyncio

2019-05-17 Thread Eric W. Biederman
Alan Stern writes: > On Thu, 7 Feb 2019, Eric W. Biederman wrote: > >> The usb support for asyncio encoded one of it's values in the wrong >> field. It should have used si_value but instead used si_addr which is >> not present in the _rt union member of struct siginfo. >> >> The result is a POS