From: Duncan Sands <baldrick@free.fr>
To: Greg KH <greg@kroah.com>
Cc: Grzegorz Kulewski <kangur@polcom.net>,
linux-kernel@vger.kernel.org, torvalds@osdl.org,
linux-usb-devel@lists.sourceforge.net, speedtouch@ml.free.fr
Subject: Re: [linux-usb-devel] 3 USB regressions (2.6.6-rc3-bk1) that should be fixed before 2.6.6
Date: Sun, 2 May 2004 22:53:03 +0200 [thread overview]
Message-ID: <200405022253.03011.baldrick@free.fr> (raw)
In-Reply-To: <20040430224111.GB14643@kroah.com>
> > Hi Greg, I'm not sure when these problems started showing up, maybe they
> > have been in 2.6.6- for a while. One patch that may be worth having in
> > 2.6.6 by the way is the one for device_disconnect in devio.c that changes
> > destroy_all_async to destroy_async_on_interface. It's clearly correct
> > and does do some good!
>
> Care to point out which one this was? I'm swimming in a sea of patches
> right now :)
I rediffed it against Linus's current tree. The extern -> static change is to make sure
we avoid the problem reported by R. J. Wysocki for -rc3-mm1: unknown symbol
destroy_all_async.
--- linux-2.5/drivers/usb/core/devio.c.orig 2004-05-02 23:22:34.000000000 +0200
+++ linux-2.5/drivers/usb/core/devio.c 2004-05-02 23:40:40.000000000 +0200
@@ -315,7 +315,7 @@
destroy_async(ps, &hitlist);
}
-extern __inline__ void destroy_all_async(struct dev_state *ps)
+static inline void destroy_all_async(struct dev_state *ps)
{
destroy_async(ps, &ps->async_pending);
}
@@ -335,6 +335,7 @@
static void driver_disconnect(struct usb_interface *intf)
{
struct dev_state *ps = usb_get_intfdata (intf);
+ unsigned int ifnum = intf->altsetting->desc.bInterfaceNumber;
if (!ps)
return;
@@ -345,11 +346,16 @@
/* prevent new I/O requests */
ps->dev = 0;
- clear_bit(intf->cur_altsetting->desc.bInterfaceNumber, &ps->ifclaimed);
+
+ if (likely(ifnum < 8*sizeof(ps->ifclaimed)))
+ clear_bit(ifnum, &ps->ifclaimed);
+ else
+ warn("interface number %u out of range", ifnum);
+
usb_set_intfdata (intf, NULL);
/* force async requests to complete */
- destroy_all_async (ps);
+ destroy_async_on_interface (ps, ifnum);
}
struct usb_driver usbdevfs_driver = {
next prev parent reply other threads:[~2004-05-02 20:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-29 23:32 Grzegorz Kulewski
2004-04-29 23:35 ` Grzegorz Kulewski
2004-04-30 7:52 ` [linux-usb-devel] " Duncan Sands
2004-04-30 15:55 ` Greg KH
2004-04-30 16:10 ` Duncan Sands
2004-04-30 22:41 ` Greg KH
2004-05-02 20:53 ` Duncan Sands [this message]
2004-05-07 23:24 ` Greg KH
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=200405022253.03011.baldrick@free.fr \
--to=baldrick@free.fr \
--cc=greg@kroah.com \
--cc=kangur@polcom.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
--cc=speedtouch@ml.free.fr \
--cc=torvalds@osdl.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
all inboxes | Powered by JetHome®