[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.0909202152420.15304-100000@netrider.rowland.org>
Date: Sun, 20 Sep 2009 21:59:17 -0400 (EDT)
From: Alan Stern <stern@...land.harvard.edu>
To: Tilman Schmidt <tilman@...p.cc>
cc: Matthias Geissert <matthias.geissert@....de>,
Greg KH <greg@...ah.com>, USB list <linux-usb@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: Status of Bug 8094 - ipaq oops on connecting "Vodafone VPA-II"
?
On Sun, 20 Sep 2009, Greg KH wrote:
> Yes, I missed the fact that the ipaq driver needed to pay attention to
> this, my mistake :(
>
> I'm pretty much not able to write any new patches until the end of next
> week, due to conferences I'm currently attending, so if someone wants to
> knock up a patch to fix this before then, it would be most appreciated.
Here's a patch which ought to fix the oops. I trust it won't cause
any existing devices to start misbehaving. Tilman and Matthias, please
verify that this works okay on your systems.
A better approach might be to test the bInterfaceClass value, but I
don't know if that would work; there might be some devices using a
strange value.
Alan Stern
Index: usb-2.6/drivers/usb/serial/ipaq.c
===================================================================
--- usb-2.6.orig/drivers/usb/serial/ipaq.c
+++ usb-2.6/drivers/usb/serial/ipaq.c
@@ -966,6 +966,15 @@ static int ipaq_calc_num_ports(struct us
static int ipaq_startup(struct usb_serial *serial)
{
dbg("%s", __func__);
+
+ /* Some of the devices in ipaq_id_table[] are composite, and we
+ * shouldn't bind to all the interfaces. This test will rule out
+ * some obviously invalid possibilities.
+ */
+ if (serial->num_bulk_in < serial->num_ports ||
+ serial->num_bulk_out < serial->num_ports)
+ return -ENODEV;
+
if (serial->dev->actconfig->desc.bConfigurationValue != 1) {
/*
* FIXME: HP iPaq rx3715, possibly others, have 1 config that
--
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