Re: Continues drops on 3G



On Wed, 2010-02-10 at 21:48 +0100, nodata wrote:
> On 10/02/10 20:39, Dan Williams wrote:
> > On Wed, 2010-02-10 at 15:09 +0100, Jonathan Petersson wrote:
> >> Hi Dan,
> >>
> >> Turns out that my drive was crashing causing the whole system to be
> >> unstable for some reason it started showing with the 3G modem dying,
> >> buying a new drive and reinstalling the system solved the issue :)
> >>
> >> Btw, as mentioned earlier I just got notified that my 4G modem is
> >> ready for pickup so I'll try to get it sometime this week.
> >
> > Excellent, when you get it let me know so we can do some inspection.  If
> > you don't mind, also email me the Windows driver installer so we can
> > poke around with 'strings' and see how it does stuff.
> >
> > Dan
> 
> Can I also send you some drivers for the gobi modem on my hp 5310m?

Nah, I've already got a gobi and the drivers; having them won't help
much since we already know how the device works.  Looks like you may
have a Gobi 2000 device which may require slightly different serial bits
than the Gobi 1000 that we've seen before.

Does the attached patch work?

> It's for the bug reported here:
>   https://bugzilla.redhat.com/show_bug.cgi?id=533266
> I e-mailed gregkh for the qcserial part.

If the attached patch makes your device show up with ttyUSB0, and
gobi-loader can push firmware to it, and after it reboots you have an
AT-capable ttyUSB0 again, we can push the patch up to Greg and see what
he says...

Dan

[PATCH] qcserial: add support for HP Gobi 2000 devices

It looks like the USB layout is slightly different for Gobi 2000 devices.

Signed-off-by: Dan Williams <dcbw redhat com>


diff --git a/drivers/usb/serial/qcserial.c b/drivers/usb/serial/qcserial.c
index 7528b8d..9343874 100644
--- a/drivers/usb/serial/qcserial.c
+++ b/drivers/usb/serial/qcserial.c
@@ -21,6 +21,13 @@
 
 static int debug;
 
+#define USB_DEVICE_DATA(__ops)	.driver_info = (kernel_ulong_t)(__ops)
+
+enum {
+	GOBI_1000 = 0,
+	GOBI_2000 = 1,
+};
+
 static struct usb_device_id id_table[] = {
 	{USB_DEVICE(0x05c6, 0x9211)},	/* Acer Gobi QDL device */
 	{USB_DEVICE(0x05c6, 0x9212)},	/* Acer Gobi Modem Device */
@@ -47,6 +54,10 @@ static struct usb_device_id id_table[] = {
 	{USB_DEVICE(0x05c6, 0x9221)},	/* Generic Gobi QDL device */
 	{USB_DEVICE(0x05c6, 0x9231)},	/* Generic Gobi QDL device */
 	{USB_DEVICE(0x1f45, 0x0001)},	/* Unknown Gobi QDL device */
+
+	/* Gobi 2000 devices */
+	{USB_DEVICE(0x03f0, 0x241d), USB_DEVICE_DATA(GOBI_2000)}, /* HP Gobi 2000 QDL device */
+	{USB_DEVICE(0x03f0, 0x251d), USB_DEVICE_DATA(GOBI_2000)}, /* HP Gobi 2000 Modem Device */
 	{ }				/* Terminating entry */
 };
 MODULE_DEVICE_TABLE(usb, id_table);
@@ -66,6 +77,7 @@ static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id)
 	int retval = -ENODEV;
 	__u8 nintf;
 	__u8 ifnum;
+	int gobi_type = (int) id->driver_info;
 
 	dbg("%s", __func__);
 
@@ -77,22 +89,40 @@ static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id)
 	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;
+		if (gobi_type == GOBI_2000) {
+			if (ifnum == 1) {
+				dbg("Gobi 2000 QDL port found");
+				retval = usb_set_interface(serial->dev, ifnum, 0);
+				if (retval < 0) {
+					dev_err(&serial->dev->dev,
+						"Could not set interface, error %d\n",
+						retval);
+					retval = -ENODEV;
+				}
+				return retval;
+			} else {
+				dev_err(&serial->dev->dev,
+					"Incorrect QDL interface number (%d)\n",
+					ifnum);
+			}
+		} else {
+			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("Gobi 1000 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;
 					}
-					return retval;
 				}
 			}
 		}


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