lkml.org 
[lkml]   [2009]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: 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


\
 
 \ /
  Last update: 2009-09-21 04:01    [W:0.060 / U:0.600 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site