On Thu, 14 Jun 2007, Olav Kongas wrote:

> Hi Alan,
> 
> > Index: usb-2.6/drivers/usb/host/isp116x-hcd.c
> > ===================================================================
> > --- usb-2.6.orig/drivers/usb/host/isp116x-hcd.c
> > +++ usb-2.6/drivers/usb/host/isp116x-hcd.c
> > @@ -583,12 +583,15 @@ static void 
> > finish_atl_transfers(struct
> >        unpack_fifo(isp116x);
> >        postproc_atl_queue(isp116x);
> 
> I think it is guaranteed that at this point all the ep's in 
> active ATL queue have their urb_list non-empty. There's a 
> relevant BUG_ON() in postproc_atl_queue(). The list_empty() 
> check below would be unnecessary.

Olav,

What would be involved in refactoring isp116x-hcd so that the driver
called usb_hcd_giveback_urb() as soon as the URB was completed?  If I
understand the current code correctly, postproc_atl_queue() goes
through all the active endpoints and stores the status for the
completed URBs, and then later finish_atl_transfers() gives them back.

It looks like this shouldn't present any difficulty except for one 
thing: When you get a short Control-IN transfer with URB_SHORT_NOT_OK 
set, the error status gets stored while the URB's status stage 
executes.  That would have to be changed so that the status stage was 
skipped entirely.  Doing this shouldn't cause any problems in practice; 
the other HCDs skip the status stage when this sort of error occurs.

The point of making this change is that it would allow the driver to 
avoid saving values in urb->status, leading eventually to the 
possibility of removing the status field from struct urb.

Alan Stern


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to