Re: Status of Bug 8094 - ipaq oops on connecting "Vodafone VPA-II" ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux