Possible patch for MODE_SENSE?

From: Matthew Dharm (mdharm-kernel@one-eyed-alien.net)
Date: Mon Aug 27 2001 - 14:55:48 EST


Warning, this is crossposted to several lists. Beware of Reply-To-All.

Attached to this message is a one-line patch which changes the way Write
Protect detection is done in sd.c

Formerly, we requested "all pages" but only "8 bytes" so we could get the
header data to test the WP bit. But, I'm seeing more and more devices
which _really_ don't like this... and we wind up with bizzare results,
because the device basically is confused.

The problem is, apparently, our friends in Redmond don't do it this way.
And that's all anyone ever designs towards anymore.

This patch increases the requested data to 255 bytes. That's enough in the
testing I've done (or had people do -- about 3 different devices, so far)
to avoid the problem entirely.

I'd like people to try this patch and let me know if it breaks anything on
their system. I don't think it should -- any device which responded
properly to request for 8 bytes should work fine with larger requests, and
devices which didn't work the old way will either (a) still not work, or
(b) start working.

At least, that's the theory.

I'd like some wider testing on this... can people give it a whirl and let
me know what they get?

Matt Dharm

-- 
Matthew Dharm                              Home: mdharm-usb@one-eyed-alien.net 
Maintainer, Linux USB Mass Storage Driver

I'll scuff my feet on the carpet and zap your nose hairs unless you TALK mister!! Who put you up to this? -- Pitr User Friendly, 3/30/1998



- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Aug 31 2001 - 21:00:25 EST