Messages in this thread | | | Date | Mon, 28 Aug 2006 13:44:15 +0200 | From | Stefan Richter <> | Subject | Re: [PATCH 2.6.18-rc4 1/5] ieee1394: sbp2: workaround for write protect bit of Initio firmware |
| |
Christoph Hellwig wrote: > On Sun, Aug 27, 2006 at 01:17:31PM -0700, Linus Torvalds wrote: >> Why does sbp2scsi_slave_configure() set "use_10_for_ms" in the first >> place?
Good question...
All I can say about it is that older versions of sbp2 enforced the usage of MODE SENSE(10). If the SCSI stack passed down an MS(6), sbp2 converted it to MS(10) and converted returned data back into MS(6) format. It did so for RBC disks, SBC disks, and CD-ROMs. http://lxr.free-electrons.com/source/drivers/ieee1394/sbp2.c?v=2.4.32#2292 Some months ago all of these command conversions in sbp2 were removed and the use_10_for_ms flag was switched on.
It would be a non-issue if devices simply returned "illegal request" status on a wrong version of MODE SENSE. But these Initio INIC-1530 bridges return "good" status after either MODE SENSE(6) or (10) but bogus data after the latter.
> I suspect that's because the typical command set for ieee1394 devices is > RBC which only specifies the 10-byte commands.
RBC actually lists only MODE SENSE(6), not (10). This makes sbp2's old behaviour even more questionable. Nevertheless, INIC-1530 is the very first device that became known to break on MS(10). Everything else seemed to work fine with MS(10) so far. Switching unconditionally to try MS(6) before MS(10) could break any other devices.
I suppose I should set up an SBP-2 target (Oracle has a GPL'd userspace implementation; somebody recently mentioned an as yet unpublished kernelspace implementation) and use this to log which version of MODE SENSE Windows and Mac OS prefer. Firmware coders certainly test their works of art with some variants of these OSs.
PS: Initio's published data sheet mentions RBC support. But their inquiry data indicate a peripheral device type of 0, which is associated with SBC.
PPS: This patch here is not strictly needed. The INIC-1530 can be corrected if the user directly asks Initio for a corrected firmware and firmware uploader (they don't have it on their website) and has access to a Windows PC to run the firmware uploader. But I think Linux users are better served if our driver handles these devices out of the box. -- Stefan Richter -=====-=-==- =--- ==--= http://arcgraph.de/sr/ - 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/
| |