[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.1301101015530.1178-100000@iolanthe.rowland.org>
Date: Thu, 10 Jan 2013 10:20:42 -0500 (EST)
From: Alan Stern <stern@...land.harvard.edu>
To: Oliver Neukum <oneukum@...e.de>
cc: Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Josh Boyer <jwboyer@...hat.com>, <gregkh@...uxfoundation.org>,
<mdharm-usb@...-eyed-alien.net>, <linux-usb@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: USB autosuspend vs. URB submission
On Thu, 10 Jan 2013, Oliver Neukum wrote:
> On Thursday 10 January 2013 00:05:55 Laurent Pinchart wrote:
>
> > I've had a quick look at the trace posted at
> > https://bugzilla.redhat.com/show_bug.cgi?id=879462 but usbmon only shows URBs
> > that are successfully submitted. I'm not sure what useful information I could
> > get from the trace.
>
> The test is at the very start of usb_submit_urb()
>
> if (!urb || !urb->complete)
> return -EINVAL;
> if (urb->hcpriv) {
> WARN_ONCE(1, "URB %p submitted while active\n", urb);
> return -EBUSY;
> }
>
> usbmon will never see such URBs
Not quite -- it will see them the first time they are submitted, when
the submission succeeds.
> I suggest that for debugging you change the WARN_ONCE into a WARN and compare
> the URB pointers of usbmon and dmesg.
Good idea.
> In the long run it is probably a good idea to pass duplicated URBs to usbmon by
> a special code path.
I'd prefer to add extra information to the WARN_ONCE message. Even
though it would require the extra effort of correlating the dmesg
output with the usbmon output.
You know, it's possible that the URB really was not submitted before
but instead the urb->hcpriv field got overwritten. Of course, that
would also be a bug.
Alan Stern
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists