2008-07-25 21:37:07

by Trever Fischer

[permalink] [raw]
Subject: [PATCH] cypress_m8 driver is broken with my GPS device

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.


Attachments:
(No filename) (0.00 B)
signature.asc (197.00 B)
This is a digitally signed message part.
Download all attachments

2008-07-25 22:01:10

by Mike Isely

[permalink] [raw]
Subject: Re: [PATCH] cypress_m8 driver is broken with my GPS device

On Fri, 25 Jul 2008, Trever Fischer wrote:

> 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.
>

Nacked-By: Mike Isely <[email protected]>

Trever:

Which kernel did you debug this against? I ask, because I encountered
and fixed this exact problem months ago. The fix(es) (there were
several) first appeared in the 2.6.26 kernel tree. Look at cypress_m8.c
there and search for get_cfg_unsafe. It's a new flag I added to mark if
the device can be safely queried for configuration. The flag is set
appropriately depending on the specific variant Earthmate device in use.

Please try the later kernel and tell me if the problem is still
happening.

-Mike


--

Mike Isely
isely @ pobox (dot) com
PGP: 03 54 43 4D 75 E5 CC 92 71 16 01 E2 B5 F5 C1 E8