[PATCH] cdc-acm: put delayed_wb to list

2013-10-08 Thread Xiao Jin
From: xiao jin Date: Tue, 8 Oct 2013 16:57:29 +0800 Subject: [PATCH] cdc-acm: put delayed_wb to list If acm_write_start during acm suspend, write acm_wb is backuped to delayed_wb. When acm resume, the delayed_wb will be started. This mechanism can only record one write during acm suspend. More

[PATCH] xhci: correct the usage of USB_CTRL_SET_TIMEOUT

2013-10-08 Thread Xiao Jin
From: xiao jin Date: Wed, 9 Oct 2013 09:09:46 +0800 Subject: [PATCH] xhci: correct the usage of USB_CTRL_SET_TIMEOUT The usage of USB_CTRL_SET_TIMEOUT is incorrect. The definition of USB_CTRL_SET_TIMEOUT is 5000ms. The input timeout to wait_for_completion_interruptible_timeout is jiffies. That

[PATCH] xhci-hub.c: handle command_trb that may be link TRB

2013-10-08 Thread Xiao Jin
From: xiao jin Date: Wed, 9 Oct 2013 09:38:45 +0800 Subject: [PATCH] xhci-hub.c: handle command_trb that may be link TRB When xhci stop device, it's possible cmd_ring enqueue point to link TRB after queue the last but one stop endpoint. We must handle the command_trb point to the next se

Re: [PATCH] xhci-hub.c: handle command_trb that may be link TRB

2013-10-09 Thread Xiao Jin
cause are what the patch aimed to solve. FYI. On Wed, 2013-10-09 at 13:18 -0700, Sarah Sharp wrote: > Hi Xiao, > > Thanks for taking the time to submit this patch. Comments below. > > On Wed, Oct 09, 2013 at 09:42:36AM +0800, Xiao Jin wrote: > > From: xiao jin > > Date

[PATCH] xhci: Ensure a command structure points to the correct trb on the command ring

2013-10-10 Thread xiao jin
From: Mathias Nyman If a command on the command ring needs to be cancelled before it is handled it can be turned to a no-op operation when the ring is stopped. We want to store the command ring enqueue pointer in the command structure when the command in enqueued for the cancellation case. Some

[PATCH v2] xhci: correct the usage of USB_CTRL_SET_TIMEOUT

2013-10-10 Thread xiao jin
XHCI_CMD_DEFAULT_TIMEOUT instead of USB_CTRL_SET_TIMEOUT as command completion event timeout. Signed-off-by: xiao jin --- drivers/usb/host/xhci-hub.c |2 +- drivers/usb/host/xhci.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host

Re: [PATCH] xhci: Ensure a command structure points to the correct trb on the command ring

2013-10-11 Thread Xiao Jin
t later. > > Sarah > > > On Fri, Oct 11, 2013 at 08:47:54AM +0800, xiao jin wrote: > > > From: Mathias Nyman > > > > > > If a command on the command ring needs to be cancelled before it is > > > handled > > > it can be turned

Re: [PATCH] USB: cdc-acm: put delayed_wb to list

2013-10-14 Thread Xiao Jin
Hi, Greg, I am sorry for the inconvenience. I will the patch format with the title v2. Thanks for the review. On Mon, 2013-10-14 at 11:10 -0700, Greg KH wrote: > On Tue, Oct 08, 2013 at 05:08:48PM +0800, Xiao Jin wrote: > > > > From: xiao jin > > > > If acm_wri

[PATCH v2] cdc-acm: put delayed_wb to list

2013-10-14 Thread xiao jin
suspend. It can ensure no acm write abandoned. Signed-off-by: xiao jin --- drivers/usb/class/cdc-acm.c | 30 -- drivers/usb/class/cdc-acm.h |7 ++- 2 files changed, 26 insertions(+), 11 deletions(-) diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc

Re: [PATCH v2] USB: cdc-acm: put delayed_wb to list

2013-10-16 Thread Xiao Jin
Hi, Greg, I am sorry for the inconvenience again. I will do as what you point to make sure the thing won't happen again in future. On Wed, 2013-10-16 at 13:44 -0700, Greg KH wrote: > On Tue, Oct 15, 2013 at 09:01:35AM +0800, xiao jin wrote: > > If acm_write_start during acm suspend

[PATCH] xhci-ring: process bulk set actual_length only when not COMP_STOP_INVAL

2013-11-06 Thread xiao jin
upper layer process wrong buffer. This patch is to set actual_length as transfer_buffer_length only if trb_comp_code is not COMP_STOP_INVAL when process_bulk_intr_td. Signed-off-by: xiao jin --- drivers/usb/host/xhci-ring.c |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff

[PATCH] cdc-acm: some enhancement on acm delayed write

2014-04-07 Thread Xiao Jin
From: xiao jin Date: Tue, 25 Mar 2014 15:54:36 +0800 Subject: [PATCH] cdc-acm: some enhancement on acm delayed write We find two problems on acm tty write delayed mechanism. (1) When acm resume, the delayed wb will be started. But now only one write can be saved during acm suspend. More acm

Re: [PATCH] cdc-acm: some enhancement on acm delayed write

2014-04-09 Thread Xiao Jin
Thanks all for the review. We meet with the problems when developing product. I would like to explain my understanding. On 04/08/2014 11:05 AM, Xiao Jin wrote: We find two problems on acm tty write delayed mechanism. (1) When acm resume, the delayed wb will be started. But now only one write

Re: [PATCH] cdc-acm: some enhancement on acm delayed write

2014-04-10 Thread Xiao Jin
Hi, Oliver, On 04/10/2014 04:02 PM, Oliver Neukum wrote: On Wed, 2014-04-09 at 22:57 +0800, Xiao Jin wrote: Thanks all for the review. We meet with the problems when developing product. I would like to explain my understanding. On 04/08/2014 11:05 AM, Xiao Jin wrote: We find two problems on

Re: [PATCH] USB: cdc-acm: fix broken runtime suspend

2014-04-15 Thread Xiao Jin
-write queue using urb anchors and making sure to discard the queue properly at shutdown. Reported-by: Xiao Jin Signed-off-by: Johan Hovold --- Let's fix the current runtime-suspend implementation before considering adding a write fifo. Since this has never really worked, I'll let so

[PATCH] usb_wwan: some improvement on write and resume

2014-04-24 Thread xiao jin
_write try autopm async with error. 2. put play_Delayed and intfdata->suspended together in the spinlock, it's to avoid the write race during resume. Signed-off-by: xiao jin Signed-off-by: Zhang, Qi1 Reviewed-by: David Cohen --- drivers/usb/serial/usb_wwan.c | 12 +--- 1 f

Re: [PATCH] usb_wwan: some improvement on write and resume

2014-04-26 Thread Xiao Jin
They are however two distinct bugs and should be fixed separately. Could you split the fixes into two patches and resubmit? Please also include a more descriptive subject line for each patch, for example: "USB: usb_wwan: fix urb leak in write error path" "USB: usb_wwan: fix ra

[PATCH 2/2] USB: usb_wwan: fix race between write and resume

2014-04-26 Thread xiao jin
ext resume. If the time of next resume is far away, tty will be blocked in tty_wait_until_sent during time. The race also can lead to writes being reordered. This patch put play_Delayed and intfdata->suspended together in the spinlock, it's to avoid the write race during resume. Signed-o

[PATCH] USB: ehci-hub: wait for RESUME finished when hub try to clear SUSPEND

2014-05-02 Thread xiao jin
el should wait for the wakeup finished, then judge what should do next step. We have some thought and give a patch. This patch is to wait for controller RESUME finished when hub try to clear port SUSPEND feature. Signed-off-by: xiao jin Reviewed-by: David Cohen --- drivers/usb/host/ehci-hub.c

Re: [PATCH] USB: ehci-hub: wait for RESUME finished when hub try to clear SUSPEND

2014-05-04 Thread Xiao Jin
On 05/03/2014 11:20 PM, Alan Stern wrote: On Sat, 3 May 2014, xiao jin wrote: We use usb ehci to connect with modem and run stress test on ehci remote wake. Sometimes usb disconnect. We add more debug ftrace (Kernel version: 3.10) and list the key log to show how problem happened. -0

Re: [PATCH] USB: ehci-hub: wait for RESUME finished when hub try to clear SUSPEND

2014-05-04 Thread Xiao Jin
On 05/04/2014 08:26 AM, Peter Chen wrote: On Sat, May 03, 2014 at 11:52:25AM +0800, xiao jin wrote: We use usb ehci to connect with modem and run stress test on ehci remote wake. Sometimes usb disconnect. We add more debug ftrace (Kernel version: 3.10) and list the key log to show how problem