Re: [PATCH] usb: usbtest: update wait routine to set a timeout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Alan,

On Fri, May 30, 2014 at 12:04:01PM -0400, Alan Stern wrote:
> On Fri, 30 May 2014, Huang Rui wrote:
> 
> > On Fri, May 30, 2014 at 10:25:40AM -0400, Alan Stern wrote:
> > > On Fri, 30 May 2014, Huang Rui wrote:
> > > 
> > > 
> > > Ugh, don't make a copy of the existing code.  Use the facilities the 
> > > way they are meant to be used.  Like the patch below.
> > > 
> > 
> > Looks good to me, thank you to improve it. Will you send this format
> > patch later or I would update it as you refined?
> 
> Can you test it to make sure that it works?  If it does, I will submit 
> it with your Tested-by.
> 

I have tested this patch in my side and it works well except doesn't
report an -ETIMEOUT error status to system. Can you do below change?

Thanks,
Rui

8<---- cut here ----

diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c
index 655c779..86ad239 100644
--- a/drivers/usb/misc/usbtest.c
+++ b/drivers/usb/misc/usbtest.c
@@ -527,6 +527,7 @@ static void sg_timeout(unsigned long _req)
 	struct usb_sg_request	*req = (struct usb_sg_request *) _req;
 
 	usb_sg_cancel(req);
+	req->status = -ETIMEDOUT;
 }
 
 static int perform_sglist(
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]