Re: [PATCH] dma: cppi41: delete channel from pending list when stop channel

2018-11-28 Thread Peter Ujfalusi
On 12/11/2018 17.40, Bin Liu wrote: Can you fix up the subject line to: dmaengine: ti: cppi4: delete channel from pending list when stop channel > The driver defines three states for a cppi channel. > - idle: .chan_busy == 0 && not in .pending list > - pending: .chan_busy == 0 && in .pending l

Re: [PATCH] dma: cppi41: delete channel from pending list when stop channel

2018-11-28 Thread Peter Ujfalusi
Hi, On 28/11/2018 13.15, Peter Ujfalusi wrote: forgot to fix up Vinod's email address. > > > On 12/11/2018 17.40, Bin Liu wrote: > > Can you fix up the subject line to: > dmaengine: ti: cppi4: delete channel from pending list when stop channel > >> The driver defines three states for a cppi

[PATCH] usb: hub: delay hub autosuspend if USB3 port is still link training

2018-11-28 Thread Mathias Nyman
When initializing a hub we want to give a USB3 port in link training the same debounce delay time before autosuspening the hub as already trained, connected enabled ports. USB3 ports won't reach the enabled state with "current connect status" and "connect status change" bits set until the USB3 lin

Re: [PATCH] usb: hub: delay hub autosuspend if USB3 port is still link training

2018-11-28 Thread Alan Stern
On Wed, 28 Nov 2018, Mathias Nyman wrote: > When initializing a hub we want to give a USB3 port in link training > the same debounce delay time before autosuspening the hub as already > trained, connected enabled ports. > > USB3 ports won't reach the enabled state with "current connect status" an

Re: [PATCH] usb: dwc3: debug: Print register name

2018-11-28 Thread Thinh Nguyen
Hi Felipe, On 11/27/2018 11:16 PM, Felipe Balbi wrote: > Hi, > > Tejas Joglekar writes: >> From: Thinh Nguyen >> >> This commit adds a new debugging option CONFIG_USB_DWC3_DEBUG_REG_PRINT >> to enable printing of register names to tracepoints for >> register read/write. >> >> Sample trace: >> --

Re: [PATCH v2 2/3] spi: add FTDI MPSSE SPI controller driver

2018-11-28 Thread Mark Brown
On Tue, Nov 27, 2018 at 01:21:27AM +0100, Anatolij Gustschin wrote: > Mark Brown broo...@kernel.org wrote: > >> + if (max_cs > 12) { > >> + dev_err(dev, "Invalid max CS in platform data: %d\n", max_cs); > >> + return -EINVAL; > >> + } > >> + dev_dbg(dev, "CS count %d, max CS %

[V2] usb/mtu3: power down device ip at setup

2018-11-28 Thread Hsin-Yi, Wang
Originally, when dr_mode is USB_DR_MODE_HOST, it didn't power down device ip, so host ip sleep will fail at ssusb_host_disable. Power down device ip at ssusb_host_setup. Signed-off-by: Hsin-Yi, Wang --- drivers/usb/mtu3/mtu3_plat.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/driv

Re: [V2] usb/mtu3: power down device ip at setup

2018-11-28 Thread Chunfeng Yun
Hi Hsin-Yi, On Wed, 2018-11-28 at 17:29 +0800, Hsin-Yi, Wang wrote: > Originally, when dr_mode is USB_DR_MODE_HOST, it didn't power down device ip, > so host ip sleep will fail at ssusb_host_disable. > > Power down device ip at ssusb_host_setup. need modify it, not in ssusb_host_setup now > > >

[V3] usb/mtu3: power down device ip at setup

2018-11-28 Thread Hsin-Yi, Wang
Originally, when dr_mode is USB_DR_MODE_HOST, it didn't power down device ip, so host ip sleep will fail at ssusb_host_disable. Power down device ip at ssusb_host_setup. Signed-off-by: Hsin-Yi, Wang --- drivers/usb/mtu3/mtu3_plat.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/driv

Re: [RFC PATCH v2 07/15] usb:cdns3: Adds Device mode support - initialization.

2018-11-28 Thread Roger Quadros
+Felipe. Pawel, Please copy Felipe Balbi as he maintains the USB gadget stack. On 18/11/18 12:09, Pawel Laszczak wrote: > Patch implements a set of functions responsible for initialization, > configuration, starting and stopping device mode. > This patch also adds new ep0.c that holds all functi

Re: [RFC PATCH v2 07/15] usb:cdns3: Adds Device mode support - initialization.

2018-11-28 Thread Felipe Balbi
Hi, Roger Quadros writes: >> +static void cdns3_gadget_config(struct cdns3_device *priv_dev) >> +{ >> +struct cdns3_usb_regs __iomem *regs = priv_dev->regs; >> + >> +cdns3_ep0_config(priv_dev); >> + >> +/* enable interrupts for endpoint 0 (in and out) */ >> +writel(EP_IEN_EP_OUT0

Re: [RFC PATCH v2 08/15] usb:cdns3: Implements device operations part of the API

2018-11-28 Thread Roger Quadros
On 18/11/18 12:09, Pawel Laszczak wrote: > Patch adds implementation callback function defined in > usb_gadget_ops object. > > Signed-off-by: Pawel Laszczak > --- > drivers/usb/cdns3/gadget.c | 249 - > 1 file changed, 247 insertions(+), 2 deletions(-) > >

Re: [RFC PATCH v2 09/15] usb:cdns3: EpX operations part of the API

2018-11-28 Thread Roger Quadros
On 18/11/18 12:09, Pawel Laszczak wrote: > Patch implements callback functions for non-default endpoints > defined in usb_ep_ops object. > > Signed-off-by: Pawel Laszczak > --- > drivers/usb/cdns3/ep0.c| 18 ++ > drivers/usb/cdns3/gadget.c | 442 - > d

Re: [RFC PATCH v2 10/15] usb:cdns3: Ep0 operations part of the API

2018-11-28 Thread Roger Quadros
On 18/11/18 12:09, Pawel Laszczak wrote: > Patch implements related to default endpoint callback functions > defined in usb_ep_ops object > > Signed-off-by: Pawel Laszczak > --- > drivers/usb/cdns3/ep0.c| 191 - > drivers/usb/cdns3/gadget.c | 8 ++ >

Re: [RFC PATCH v2 11/15] usb:cdns3: Implements ISR functionality.

2018-11-28 Thread Roger Quadros
On 18/11/18 12:09, Pawel Laszczak wrote: > Patch adds set of generic functions used for handling interrupts > generated by controller. Interrupt related functions are divided > into three groups. The first is related to ep0 and is placed in ep0.c. > The second is responsible for non-default endp

Re: [RFC PATCH v2 12/15] usb:cdns3: Adds enumeration related function.

2018-11-28 Thread Roger Quadros
On 18/11/18 12:09, Pawel Laszczak wrote: > Patch implements a set of function related to enumeration process. > Some standard requests are handled on controller driver level and > other are delegated to gadget core driver. > All class requests are delegated to gadget core driver. > > Signed-off

RE: [PATCH V6 01/10] usb: gadget: udc: Add timer for stream capable endpoints

2018-11-28 Thread Anurag Kumar Vulisha
Hi Felipe, Thanks a lot for spending your time in reviewing this patch. Please find my comments inline >-Original Message- >From: Felipe Balbi [mailto:ba...@kernel.org] >Sent: Wednesday, November 14, 2018 7:28 PM >To: Anurag Kumar Vulisha ; Greg Kroah-Hartman >; Alan Stern ; Johan >Hovold

[PATCH] USB: Fix invalid-free bug in port_over_current_notify()

2018-11-28 Thread Alan Stern
Syzbot and KASAN found the following invalid-free bug in port_over_current_notify(): -- BUG: KASAN: double-free or invalid-free in port_over_current_notify drivers/usb/core/hub.c:5192 [inline] BUG: KASAN: double-free or inva

[PATCH] usb: quirk: add no-LPM quirk on SanDisk Ultra Flair device

2018-11-28 Thread Harry Pan
Some lower volume SanDisk Ultra Flair in 16GB, which the VID:PID is in 0781:5591, will aggressively request LPM of U1/U2 during runtime, when using this thumb drive as the OS installation key we found the device will generate failure during U1 exit path making it dropped from the USB bus, this caus

Re: [V3] usb/mtu3: power down device ip at setup

2018-11-28 Thread Nicolas Boichat
FYI, the subject line should be [PATCH v3] (not just [V3]) On Wed, Nov 28, 2018 at 5:54 PM Hsin-Yi, Wang wrote: > > Originally, when dr_mode is USB_DR_MODE_HOST, it didn't power down device ip, > so host ip sleep will fail at ssusb_host_disable. > > Power down device ip at ssusb_host_setup. > > S

[PATCH 3/5] usb: mtu3: fix the issue about SetFeature(U1/U2_Enable)

2018-11-28 Thread Chunfeng Yun
Fix the issue: device doesn't accept LGO_U1/U2: 1. set SW_U1/U2_ACCEPT_ENABLE to eanble controller to accept LGO_U1/U2 by default; 2. enable/disable controller to initiate requests for transition into U1/U2 by SW_U1/U2_REQUEST_ENABLE instead of SW_U1/U2_ACCEPT_ENABLE; Signed-off-by: Chunfe

[PATCH 1/5] usb: mtu3: remove QMU checksum

2018-11-28 Thread Chunfeng Yun
The QMU checksum calculation is redundant, mostly used by debug, so remove it here. Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3_core.c | 2 -- drivers/usb/mtu3/mtu3_qmu.c | 26 -- 2 files changed, 28 deletions(-) diff --git a/drivers/usb/mtu3/mtu3_core.c b/dr

[PATCH 2/5] usb: mtu3: enable hardware remote wakeup from L1 automatically

2018-11-28 Thread Chunfeng Yun
Enable hardware remote wakeup from L1 automatically based on the FIFO status, instead of manual way. Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3_core.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/usb/mtu3/mtu3_core.c b/drivers/usb/mtu3/mtu3_co

[PATCH 4/5] usb: mtu3: enable SETUPENDISR interrupt

2018-11-28 Thread Chunfeng Yun
If the controller receives a new SETUP during SETUP data stage, and will generate SETUPENDISR interrupt, the driver should abort the current SETUP command and process the new one. Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3_core.c | 2 +- drivers/usb/mtu3/mtu3_gadget_ep0.c | 6 ++

[PATCH 5/5] usb: mtu3: clear SOFTCONN when clear USB3_EN if work as HS mode

2018-11-28 Thread Chunfeng Yun
When the controller supports SS mode, but works as HS mode, the SOFTCONN will not be cleared automatically when clear USB3_EN by default, this cause an issue that can't disconnect from host, so clear SOFTCONN when clear USB3_EN when the class driver want to disable the D+ pullup. Signed-off-by: Ch

RE: scsi_set_medium_removal timeout issue

2018-11-28 Thread Zengtao (B)
Ping? >-Original Message- >From: Alan Stern [mailto:st...@rowland.harvard.edu] >Sent: Wednesday, November 14, 2018 11:35 PM >To: Martin Petersen ; Zengtao (B) > >Cc: j...@linux.vnet.ibm.com; gre...@linuxfoundation.org; >linux-s...@vger.kernel.org; linux-ker...@vger.kernel.org; >linux-usb@v

[PATCH v4] usb/mtu3: power down device ip at setup

2018-11-28 Thread Hsin-Yi, Wang
Originally, when dr_mode is USB_DR_MODE_HOST, it didn't power down device ip, so host ip sleep will fail at ssusb_host_disable. Power down device ip at ssusb_host_setup. Signed-off-by: Hsin-Yi, Wang --- ChangeLog: V3->V4: *update comment --- drivers/usb/mtu3/mtu3_plat.c | 8 1 file c

[PATCH AUTOSEL 4.19 23/68] Revert "usb: gadget: ffs: Fix BUG when userland exits with submitted AIO transfers"

2018-11-28 Thread Sasha Levin
From: Shen Jing [ Upstream commit a9c859033f6ec772f8e3228c343bb1321584ae0e ] This reverts commit b4194da3f9087dd38d91b40f9bec42d59ce589a8 since it causes list corruption followed by kernel panic: Workqueue: adb ffs_aio_cancel_worker RIP: 0010:__list_add_valid+0x4d/0x70 Call Trace: insert_work+0

[PATCH AUTOSEL 4.14 14/35] Revert "usb: gadget: ffs: Fix BUG when userland exits with submitted AIO transfers"

2018-11-28 Thread Sasha Levin
From: Shen Jing [ Upstream commit a9c859033f6ec772f8e3228c343bb1321584ae0e ] This reverts commit b4194da3f9087dd38d91b40f9bec42d59ce589a8 since it causes list corruption followed by kernel panic: Workqueue: adb ffs_aio_cancel_worker RIP: 0010:__list_add_valid+0x4d/0x70 Call Trace: insert_work+0

[PATCH AUTOSEL 4.19 22/68] usb: dwc2: pci: Fix an error code in probe

2018-11-28 Thread Sasha Levin
From: Dan Carpenter [ Upstream commit 3c135e8900199e3b9375c1eff808cceba2ee37de ] We added some error handling to this function but forgot to set the error code on this path. Fixes: ecd29dabb2ba ("usb: dwc2: pci: Handle error cleanup in probe") Acked-by: Minas Harutyunyan Signed-off-by: Dan Car

Re: [PATCH v4] usb/mtu3: power down device ip at setup

2018-11-28 Thread Chunfeng Yun
hi Hsin-Yi, On Thu, 2018-11-29 at 11:16 +0800, Hsin-Yi, Wang wrote: > Originally, when dr_mode is USB_DR_MODE_HOST, it didn't power down device ip, > so host ip sleep will fail at ssusb_host_disable. > > Power down device ip at ssusb_host_setup. > > Signed-off-by: Hsin-Yi, Wang > --- > ChangeLo

FW: [PATCH 2/2] USB: serial: mos7840: Add a product ID for the new product

2018-11-28 Thread JackyChou
From: JackyChou Add a new PID 0x7843 to the driver. Let the new products be able to set up 3 serial ports with the driver. Signed-off-by: JackyChou --- drivers/usb/serial/mos7840.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/usb/serial/mos7840.c b/d

[PATCH 1/2] USB: serial: mos7840: Adjust port settings for read and write registers

2018-11-28 Thread JackyChou
From: JackyChou In the read/write function, set port 2 independently in the 2-port case. When setting the offset of port registers, the offset between port 1 and other ports is different, so port 1 is set independently. Then in the rest of ports, the port 2 between 2-ports case and 4-ports cas

Re: [PATCH v4] usb/mtu3: power down device ip at setup

2018-11-28 Thread Hsin-Yi Wang
Thanks! On Thu, Nov 29, 2018 at 2:26 PM Chunfeng Yun wrote: > > hi Hsin-Yi, > > On Thu, 2018-11-29 at 11:16 +0800, Hsin-Yi, Wang wrote: > > Originally, when dr_mode is USB_DR_MODE_HOST, it didn't power down device > > ip, > > so host ip sleep will fail at ssusb_host_disable. > > > > Power down d