The attachment is for discussion. It adds MODE SELECT support to libata allowing the write(back) cache and read ahead to be manipulated by users [i.e. the WCE and DRA ** bits in the SCSI Caching mode page]. The patch is against lk 2.6.13-rc6 and includes the SSU patch (but not the TUR patch). It highlights several issues with libata: - may need hook so SCSI command specific logic can be executed _after_ a ATA command has completed successfully - one SCSI command can map to two or more ATA commands (e.g. a MODE SELECT caching page that changes the state of both WCE and DRA) I cannot see a graceful way to do this with libata. - patch generalizes error processing but probably not enough - may need lighter weight version of ata_dev_identify() when the "dev->id" array needs to be resync-ed (e.g. as required by the ATA information VPD page in sat-r05) ChangeLog: - generalize SCSI error processing - add MODE SELECT (6 and 10) handling; active for WCE and DRA in Caching mode page - add block descriptor to MODE SENSE command - make various changes to sync with sat-r05 (as noted in source) - answer some "FIXME" questions in code and flag points for extra work ** Testing this patch highlighted a bug in sdparm effecting DRA (but not WCE). A beta version of sdparm-0.95 can be found at http://www.torque.net/sg/sdparm.html that fixes the problem. Not to be applied to mainline kernel yet. Doug Gilbert