Re: [PATCH] Add Unusual Dev for Sony GPS-CS1

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

 



Alan Stern wrote:
On Mon, 11 May 2009, Phil Endecott wrote:

From: Phil Endecott <sonygpsbug@xxxxxxxxxxxx>

Add an UNUSUAL_DEV for the Sony GPS-CS1 (054c:0298), which seems to suffer from the READ CAPACITY off-by-one and LOCKING bugs.

Signed-off-by: Phil Endecott <sonygpsbug@xxxxxxxxxxxx>
---
This device used to work for me without any fixes. It now doesn't work even with older kernels. I don't know why; my best guess is that perhaps it didn't need to look at the last sector until recently, maybe due to filesystem layout or something. Because of my uncertainly I've made this a "guess capacity", not "fix capacity".

It would be nice to see some usbmon traces showing how the device fails
when you leave out individual flags from the patch.  We might be able
to tell exactly which flags are needed.

Hi Alan,

I debugged this from the "bottom up" with a USB analyser and wrote down the SCSI commands as I deciphered them. Basically I see a READ CAPACITY early on that returns 0000FFF0; a bit later I see reads:

Address Length
0       1
1       1F
FF00    8
FFE0    8
FFF0    1

This last one fails. (Oddly the response to REQUEST SENSE looks like an OK to me - though I don't really know anything about SCSI error reporting. It has 0x70 in the response code field and everything else is 0. Did I also see a quirk related to error reporting?)

It goes on to do lots of other reads but it re-visits this beyond-the-end sector several times and each time the read fails.

So I'm pretty certain that it is, currently, suffering from this off-by-one bug. But I'm equally sure that it was working before, with the same kernel. It seems unlikely that this is the sort of bug that would come-and-go, so my guess is that it causes a problem now because the flash is nearly full and whatever bit of filesystem metadata is stored at the end of the device is now reaching into the last block, or something like that.

I can also see the "prevent/allow removal" commands failing in the USB analyser trace. That quirk is not necessary to make the device work but it certainly makes the logs a lot quieter.


Cheers,  Phil.



--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux