Re: 2.6.31-rc2 warning in drivers/usb/host/ehci-hcd.c

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

 



On Tue  7.Jul'09 at 15:58:24 -0400, Alan Stern wrote:
> > PS: I don't know if it is related, but I can't connect anymore
> > after s2ram. 'draknetcenter' says that /dev/ttyUSB1 could not
> > be openned (but I need to make more tests to provide more info)...
> 
> That's a separate issue.  We can explore it in greater depth if you 
> want.
> 
> For now, here's a patch to fix the driver.  I don't know why the 
> usb_clear_halt call was in there; it doesn't appear to serve any useful 
> purpose.  Let me know how well the patch works.

The patch works fine and the warning is gone now. Consider it tested.

Furthermore it also fixed somehow the non-working state
after s2ram! I suspended to RAM while it was connected and
it resumed just fine, no warnings and it was still connected.

Thank you very much for your fix^2!

> Alan Stern
> 
> 
> 
> Index: usb-2.6/drivers/usb/serial/option.c
> ===================================================================
> --- usb-2.6.orig/drivers/usb/serial/option.c
> +++ usb-2.6/drivers/usb/serial/option.c
> @@ -931,23 +931,11 @@ static int option_open(struct tty_struct
>  
>  	dbg("%s", __func__);
>  
> -	/* Reset low level data toggle and start reading from endpoints */
> +	/* Start reading from the IN endpoint */
>  	for (i = 0; i < N_IN_URB; i++) {
>  		urb = portdata->in_urbs[i];
>  		if (!urb)
>  			continue;
> -		if (urb->dev != serial->dev) {
> -			dbg("%s: dev %p != %p", __func__,
> -				urb->dev, serial->dev);
> -			continue;
> -		}
> -
> -		/*
> -		 * make sure endpoint data toggle is synchronized with the
> -		 * device
> -		 */
> -		usb_clear_halt(urb->dev, urb->pipe);
> -
>  		err = usb_submit_urb(urb, GFP_KERNEL);
>  		if (err) {
>  			dbg("%s: submit urb %d failed (%d) %d",
> @@ -956,16 +944,6 @@ static int option_open(struct tty_struct
>  		}
>  	}
>  
> -	/* Reset low level data toggle on out endpoints */
> -	for (i = 0; i < N_OUT_URB; i++) {
> -		urb = portdata->out_urbs[i];
> -		if (!urb)
> -			continue;
> -		urb->dev = serial->dev;
> -		/* usb_settoggle(urb->dev, usb_pipeendpoint(urb->pipe),
> -				usb_pipeout(urb->pipe), 0); */
> -	}
> -
>  	option_send_setup(port);
>  
>  	return 0;
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux