scsi read command
hi all
i came across SCSI generic driver source code..
for read they are using scsi read_10 command
to send this scsi command to driver they are preparing CDB (command descriptor block) structure.
in that they are doing
cdbp[0] = READ_10;
cdbp[2] = (unsigned char)((start_block >> 24) & 0xff);
cdbp[3] = (unsigned char)((start_block >> 16) & 0xff);
cdbp[4] = (unsigned char)((start_block >> 8) & 0xff);
cdbp[5] = (unsigned char)(start_block & 0xff);
cdbp[7] = (unsigned char)((blocks >> 8) & 0xff);
cdbp[8] = (unsigned char)(blocks & 0xff);
where cdbp is unsigned char array, start_block = 0 and block is 1 to 128 any value
if anyone knows why they are performing cdbp[2] to cdbp[8] bit shift operations??
plz do explain.....
|