From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
To: Petko Manolov <petkan@nucleusys.com>
Cc: linux-usb@vger.kernel.org, Greg KH <gregkh@linuxfoundation.org>,
netdev@vger.kernel.org,
Stephen Hemminger <stephen@networkplumber.org>
Subject: Re: Active URB submitted twice in pegasus driver
Date: Tue, 26 Mar 2013 11:52:18 -0700 [thread overview]
Message-ID: <20130326185218.GD10317@xanatos> (raw)
In-Reply-To: <alpine.DEB.2.02.1303261909260.4226@fry.nucleusys.com>
On Tue, Mar 26, 2013 at 07:28:53PM +0200, Petko Manolov wrote:
> On Tue, 26 Mar 2013, Sarah Sharp wrote:
>
> >On Tue, Mar 26, 2013 at 05:22:07PM +0200, Petko Manolov wrote:
> >>On Mon, 25 Mar 2013, Sarah Sharp wrote:
> >After taking a brief glance at the pegasus code,
> >pegasus_set_multicast looks broken. It sets the control URB
> >status to zero and calls ctrl_callback(), which does some stuff if
> >the URB status is zero. It doesn't look like
> >pegasus_set_multicast() is an URB callback function, so why in the
> >world is it touching a control URB that could possibly be in
> >flight else where?
>
> Beats me, i've got nothing to do with this driver. :-P
>
> Anyway, playing with the URB status looks rather stupid and is
> definitely a bug. I'll make a patch that fixes the problem.
>
> >It looks like the control URB is used to do things like get or set
> >registers, so what's stopping the upper layers from calling get
> >registers (which will submit the control URB and schedule a wait
> >queue), and then pegasus_set_multicast(), which will go overwrite
> >the active URB status? USB device drivers should not be writing
> >or reading fields in a submitted URB until the completion
> >handler's callback function is called.
>
> Err, see my previous comment. It can't be me. Maybe i've been too
> drunk. Or stupid. Or both... :-)
Nah, everybody makes silly coding mistakes. I was just trying to
clarify, since I don't know the driver. Send me a patch and I'll see if
it fixes the warning.
But considering the multicast code is pretty old, I bet I'm running into
a different bug...
Sarah Sharp
next prev parent reply other threads:[~2013-03-26 18:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-25 22:38 Active URB submitted twice in pegasus driver Sarah Sharp
2013-03-26 15:22 ` Petko Manolov
2013-03-26 17:01 ` Sarah Sharp
2013-03-26 17:28 ` Petko Manolov
2013-03-26 18:52 ` Sarah Sharp [this message]
2013-03-26 20:54 ` Petko Manolov
2013-03-26 21:37 ` Sarah Sharp
2013-03-26 22:26 ` Petko Manolov
2013-04-05 17:01 ` Petko Manolov
2013-04-08 15:49 ` Sarah Sharp
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=20130326185218.GD10317@xanatos \
--to=sarah.a.sharp@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-usb@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=petkan@nucleusys.com \
--cc=stephen@networkplumber.org \
/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