The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: "Carlos R. Mafra" <crmafra2@gmail.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
	dbrownell@users.sourceforge.net
Subject: Re: 2.6.31-rc2 warning in drivers/usb/host/ehci-hcd.c
Date: Tue, 7 Jul 2009 23:26:40 +0200	[thread overview]
Message-ID: <20090707212640.GA11178@Pilar.aei.mpg.de> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0907071554150.8221-100000@iolanthe.rowland.org>

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;

      reply	other threads:[~2009-07-07 21:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-06 22:26 2.6.31-rc2 warning in drivers/usb/host/ehci-hcd.c Carlos R. Mafra
2009-07-07  1:55 ` Alan Stern
2009-07-07 15:30 ` Alan Stern
2009-07-07 18:29   ` Carlos R. Mafra
2009-07-07 19:58     ` Alan Stern
2009-07-07 21:26       ` Carlos R. Mafra [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090707212640.GA11178@Pilar.aei.mpg.de \
    --to=crmafra2@gmail.com \
    --cc=dbrownell@users.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox