This is a revised patch following this post: http://marc.theaimsgroup.com/?l=linux-scsi&m=112461881419898&w=2 The plan is to add MODE SELECT SCSI command support to libata so that parameters such as WCE and DRA can be changed by a user (i.e. Write(back) Cache Enable and Disable Read Ahead respectively). There are still some issues to be addressed with MODE SELECT so the attached is mainly a subset of the earlier one. It improves error processing and fixes a READ_6/WRITE_6 SCSI command special case ** as requested by Jeff G. The attached is against lk 2.6.13-rc6 and includes the START STOP UNIT patch. ChangeLog: - generalize SCSI error processing - add block descriptor to MODE SENSE command - make various changes to sync with sat-r05 (as noted in source) - fix READ(6) and WRITE(6) SCSI command special case: transfer_length=0 -> transfer 256 blocks ** The special case can be tested with sg_dd: sg_dd if=/dev/sda blk_sgio=1 cdbsz=6 of=. bs=512 bpt=256 count=256 This tests READ(6) with a transfer length of 0 (i.e. 256 blocks) in its cdb. BTW the scsi_debug driver has the same bug. Signed-off-by: Douglas Gilbert Doug Gilbert