View Single Post
Old 10 September 2016, 20:08   #12
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,819
I wouldn't say totally different; you can see how the SCSI REQUEST SENSE data evolved from SASI. Anyway, in pseudo-C, where scsi_sense_data[] is the normal/standard SCSI sense data:
Code:
sasi_sense_data[0] = scsi_sense_data[12] & 0x7F; // Error code (= ASC)
sasi_sense_data[0] |= scsi_sense_data[0] & 0x80; // Valid bit

sasi_sense_data[1] = scsi_sense_data[4] & 0x1F;  // LBA [21:16]
sasi_sense_data[1] |= LUN << 5;                  // LUN

sasi_sense_data[2] = scsi_sense_data[5];         // LBA [15:8]
sasi_sense_data[3] = scsi_sense_data[6];         // LBA [7:0]
mark_k is offline  
 
Page generated in 0.05633 seconds with 9 queries