Subject: Re: Interpreting SCSI output messages
To: Brian Buhrow <buhrow@lothlorien.nfbcal.org>
From: Matthew Jacob <lydianconcepts@gmail.com>
List: current-users
Date: 07/14/2006 22:50:35
>
>
> sd0(umass0:0:0): Check Condition on CDB: 0x28 00 00 06 5a ea 00 00 20 00
> SENSE KEY: Media Error
> ASC/ASCQ: Medium Format Corrupted
>
> sd0(umass0:0:0): Check Condition on CDB: 0x28 00 00 05 10 8a 00 00 20 00
> SENSE KEY: Media Error
> ASC/ASCQ: Medium Format Corrupted
0x28 = READ (Group1)
0x00 = (ignore)
0x00 = msw/msb, lba
0x05 = msw/lsb, lba
0x10 = lsw/msb, lba
0x8a = lsw/lsb, lba
0x00 = (ignore)
0x00 = msb, lba xfer count
0x20 = lsb, lba xfer count
so, 0x5108a == 33194
the other one left as an exercise.
transfer_count = (((uint32_t)tmd->cd_cdb[7]) << 8) |
((u_int32_t)tmd->cd_cdb[8]);
lba =
(((uint32_t)tmd->cd_cdb[2]) << 24) |
(((uint32_t)tmd->cd_cdb[3]) << 16) |
(((uint32_t)tmd->cd_cdb[4]) << 8) |
((uint32_t)tmd->cd_cdb[5]);
>
>