--- qcserial.c 2010-02-13 12:19:24.206151243 +0100 +++ qcserial.c 2010-02-13 12:18:02.965400290 +0100 @@ -24,6 +24,8 @@ static struct usb_device_id id_table[] = { {USB_DEVICE(0x05c6, 0x9211)}, /* Acer Gobi QDL device */ {USB_DEVICE(0x05c6, 0x9212)}, /* Acer Gobi Modem Device */ + {USB_DEVICE(0x05c6, 0x9224)}, /* Vaio W Gobi QDL device */ + {USB_DEVICE(0x05c6, 0x9225)}, /* Vaio W Gobi Modem Device */ {USB_DEVICE(0x03f0, 0x1f1d)}, /* HP un2400 Gobi Modem Device */ {USB_DEVICE(0x03f0, 0x201d)}, /* HP un2400 Gobi QDL Device */ {USB_DEVICE(0x04da, 0x250d)}, /* Panasonic Gobi Modem device */ @@ -66,7 +68,8 @@ int retval = -ENODEV; __u8 nintf; __u8 ifnum; - + __u8 altsetting; + dbg("%s", __func__); nintf = serial->dev->actconfig->desc.bNumInterfaces; @@ -77,23 +80,22 @@ switch (nintf) { case 1: /* QDL mode */ - if (serial->interface->num_altsetting == 2) { - struct usb_host_interface *intf; - - intf = &serial->interface->altsetting[1]; - if (intf->desc.bNumEndpoints == 2) { - if (usb_endpoint_is_bulk_in(&intf->endpoint[0].desc) && - usb_endpoint_is_bulk_out(&intf->endpoint[1].desc)) { - dbg("QDL port found"); - retval = usb_set_interface(serial->dev, ifnum, 1); - if (retval < 0) { - dev_err(&serial->dev->dev, - "Could not set interface, error %d\n", - retval); - retval = -ENODEV; - } - return retval; + + altsetting = serial->interface->num_altsetting - 1; + struct usb_host_interface *intf; + intf = &serial->interface->altsetting[altsetting]; + if (intf->desc.bNumEndpoints == 2) { + if (usb_endpoint_is_bulk_in(&intf->endpoint[0].desc) && + usb_endpoint_is_bulk_out(&intf->endpoint[1].desc)) { + dbg("QDL port found"); + retval = usb_set_interface(serial->dev, ifnum, altsetting); + if (retval < 0) { + dev_err(&serial->dev->dev, + "Could not set interface, error %d\n", + retval); + retval = -ENODEV; } + return retval; } } break;