Re: [PATCH]generic usb serial driver
Alan Stern <[email protected]>
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 30 Mar 2007, Greg KH wrote: > I think it really comes down to the problem of checking the urb status > flag. > > I _REALLY_ want to get rid of that field and not have drivers us it at > all. I would like to pass the value of the status flag to the urb > callback directly, and only have the status field be used by the host > controllers. > > The last time I looked into implementing this, I think the UHCI driver > had some 'issues' with how it would work, or maybe it was EHCI, sorry it > was a few years ago. One simple possibility is this: Change the kerneldoc to explain that urb->status is private. Maybe also rename it to urb->private_status, to avoid possible misuses. Then change the giveback_urb routine pass urb->private_status as an argument, and change all the completion handlers to accept it. Tedious yes, but it shouldn't break anything. Alternatively: Define a new private_status field, to be used by usbcore and the HCDs. Then do urb->status = urb->private_status; just before passing urb to its completion handler. This is a little less robust and less elegant than the first approach. Alan Stern ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel