[PATCH] cypress_m8 driver is broken with my GPS device

From: Trever Fischer
Date: Fri Jul 25 2008 - 17:37:08 EST


Hi, I've got a DeLORME Earthmate LT-20 USB GPS unit. A year or so ago it used
to work with the cypress_m8 driver, but now when I try to read from the
device, the kernel spits out:

drivers/usb/serial/cypress_m8.c: cypress_serial_control - failed to retrieve
serial line settings - -32
drivers/usb/serial/cypress_m8.c: cypress_m8 suspending failing port 3 -
interval might be too short

I dug into the source and created the attached patch. Its my first (albeit
tiny) patch to the linux kernel, so any feedback is graciously welcome.
--- /usr/src/kernels/linux-2.6.26/drivers/usb/serial/cypress_m8.c 2008-07-13 17:51:29.000000000 -0400
+++ ./drivers/usb/serial/cypress_m8.c 2008-07-25 16:49:53.000000000 -0400
@@ -410,6 +410,11 @@
/* set initial values in feature buffer */
memset(feature_buffer, 0, sizeof(feature_buffer));

+ /* The LT-20 doesn't really work too well with trying to get the serial settings. */
+ if (port->serial->dev->descriptor.idProduct == PRODUCT_ID_EARTHMATEUSB_LT20) {
+ return retval;
+ }
+
do {
retval = usb_control_msg(port->serial->dev,
usb_rcvctrlpipe(port->serial->dev, 0),

Attachment: signature.asc
Description: This is a digitally signed message part.