Re: 2.6.22-rc4-mm1

Alan Stern <[email protected]>
Newsgroups gmane.linux.usb.devel,gmane.linux.kernel
Message-ID <[email protected]>
On Thu, 7 Jun 2007, Greg KH wrote:

> On Thu, Jun 07, 2007 at 10:53:29AM -0400, Alan Stern wrote:
> > To tell you the truth, I rather think there's not much point in keeping
> > usb-try-to-debug-bug-8561.patch around.  Anything seriously wrong that
> > it could catch ought to have shown up long ago.  And it is now clear
> > that bug 8561 has nothing to do with this; it is a programming error
> > common to many of the USB serial drivers.  (Still waiting to hear back 
> > from Paulo Pereira whether the fix to the USB Option driver works...)
> 
> What error in the usb-serial drivers are you speaking about?

The one addressed by usb-option-fix-usage-of-urb-status-abuse.patch.  I 
thought it might be worthwhile to spend some time fixing all of these.
Here's a quick summary showing the extent of the problem (note that 
not all the usages are in error):

$ grep EINPROGRESS drivers/usb/serial/*.c drivers/usb/misc/*.c
drivers/usb/serial/digi_acceleport.c:*       return 256 when -EINPROGRESS is set, as the line discipline
drivers/usb/serial/digi_acceleport.c:		while( oob_port->write_urb->status == -EINPROGRESS
drivers/usb/serial/digi_acceleport.c:		while( (port->write_urb->status == -EINPROGRESS
drivers/usb/serial/digi_acceleport.c:	while( oob_port->write_urb->status == -EINPROGRESS
drivers/usb/serial/digi_acceleport.c:	if( port->write_urb->status == -EINPROGRESS
drivers/usb/serial/digi_acceleport.c:	if( port->open_count && port->write_urb->status != -EINPROGRESS
drivers/usb/serial/digi_acceleport.c:	if( port->write_urb->status == -EINPROGRESS
drivers/usb/serial/digi_acceleport.c:	if( port->write_urb->status == -EINPROGRESS
drivers/usb/serial/empeg.c:			if (write_urb_pool[i]->status != -EINPROGRESS) {
drivers/usb/serial/empeg.c:		if (write_urb_pool[i]->status != -EINPROGRESS) {
drivers/usb/serial/empeg.c:		if (write_urb_pool[i]->status == -EINPROGRESS) {
drivers/usb/serial/keyspan.c:		if (this_urb->status == -EINPROGRESS) {
drivers/usb/serial/keyspan.c:	} while (urb->status != -EINPROGRESS);
drivers/usb/serial/keyspan.c:		if (this_urb->status != -EINPROGRESS)
drivers/usb/serial/keyspan.c:			if (this_urb->status != -EINPROGRESS)
drivers/usb/serial/keyspan.c:	if (urb && urb->status == -EINPROGRESS)
drivers/usb/serial/keyspan.c:	/*while (p_priv->outcont_urb->status == -EINPROGRESS) {
drivers/usb/serial/keyspan.c:	if (this_urb->status == -EINPROGRESS) {
drivers/usb/serial/keyspan.c:	if (this_urb->status == -EINPROGRESS) {
drivers/usb/serial/keyspan.c:	if (this_urb->status == -EINPROGRESS) {
drivers/usb/serial/keyspan.c:	if (this_urb->status == -EINPROGRESS) {
drivers/usb/serial/keyspan.c:	if (this_urb->status == -EINPROGRESS) {
drivers/usb/serial/keyspan_pda.c: *	  urb status is -EINPROGRESS, meaning it cannot write at the moment
drivers/usb/serial/keyspan_pda.c:	   again (the only sudden transition was the one from EINPROGRESS to
drivers/usb/serial/kl5kusb105.c:			if (priv->write_urb_pool[i]->status != -EINPROGRESS) {
drivers/usb/serial/kl5kusb105.c:		if (priv->write_urb_pool[i]->status == -EINPROGRESS) {
drivers/usb/serial/kl5kusb105.c:		if (priv->write_urb_pool[i]->status != -EINPROGRESS) {
drivers/usb/serial/mos7720.c:	if (port->read_urb->status != -EINPROGRESS) {
drivers/usb/serial/mos7720.c:		if (mos7720_port->write_urb_pool[i] && mos7720_port->write_urb_pool[i]->status == -EINPROGRESS)
drivers/usb/serial/mos7720.c:		if (mos7720_port->write_urb_pool[i] && mos7720_port->write_urb_pool[i]->status != -EINPROGRESS)
drivers/usb/serial/mos7720.c:		if (mos7720_port->write_urb_pool[i] && mos7720_port->write_urb_pool[i]->status != -EINPROGRESS) {
drivers/usb/serial/mos7720.c:	if (port->read_urb->status != -EINPROGRESS) {
drivers/usb/serial/mos7720.c:	if(port->read_urb->status != -EINPROGRESS) {
drivers/usb/serial/mos7840.c:	if (mos7840_port->read_urb->status != -EINPROGRESS) {
drivers/usb/serial/mos7840.c:	if (mos7840_port->read_urb->status != -EINPROGRESS) {
drivers/usb/serial/sierra.c:		if (this_urb->status == -EINPROGRESS) {
drivers/usb/serial/sierra.c:		if (this_urb && this_urb->status != -EINPROGRESS)
drivers/usb/serial/sierra.c:		if (this_urb && this_urb->status == -EINPROGRESS)
drivers/usb/misc/adutux.c:				if (dev->interrupt_in_urb->status == -EINPROGRESS) {
drivers/usb/misc/adutux.c:	if (should_submit && !dev->interrupt_in_urb->status==-EINPROGRESS) {
drivers/usb/misc/adutux.c:		if (dev->interrupt_out_urb->status == -EINPROGRESS) {
drivers/usb/misc/auerswald.c:        urb->status    = -EINPROGRESS;    /* usb_submit_urb does this, too */
drivers/usb/misc/auerswald.c:   the result is 0 if the urb is cancelled, or -EINPROGRESS if
drivers/usb/misc/auerswald.c:		if (urb->status != -EINPROGRESS) {	/* No callback?!! */
drivers/usb/misc/auerswald.c:-EINPROGRESS	during submission until end
drivers/usb/misc/usbtest.c:				case -EINPROGRESS:
drivers/usb/misc/usbtest.c:	if (!(retval == 0 || retval == -EINPROGRESS)) {

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/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.