Skip to contentSkip to conversation

SCSI: Printing cleanups

PATCH In review Martin K. Petersen 2 participants 3 messages Feb 28, 2007 SCSI

lore
Share & tools
lore
#0 lore raw

cover SCSI: Printing cleanups

This patch series is the first batch of cleanups in an attempt to make the SCSI printing more consistent and suitable for human consumption.

Previously a typical error looked like this:

sd 0:0:0:0: SCSI error: return code = 0x08000002
sda: Current: sense key: Aborted Command
Additional sense: Logical block reference tag check failed

You had to have the magic return value decoder ring handy to figure out what had really happened. And you had to do the mapping between sd 0:0:0:0 and sda yourself.

The following patches clean up various bits so that the same information can be presented in a more readable form:

sd 0:0:0:0: [sda] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE,SUGGEST_OK sd 0:0:0:0: [sda] Sense Key : Aborted Command [current]
sd 0:0:0:0: [sda] Add. Sense: Logical block reference tag check failed

All printk's from sd.c now have the same prefix. If logging is turned on, for instance, we also get:

    sd 0:0:0:0: [sda] Send: 0x0fb89180 
    sd 0:0:0:0: [sda] CDB: Read(16): 88 20 00 00 00 00 00 00 00 20 00 00 00 08 00 00
    sd 0:0:0:0: [sda] Done: 0x0fb89180 SUCCESS

The patches need to be applied in order.

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
#1 lore raw
Quoted 21 lines · Martin K. Petersen

This patch series is the first batch of cleanups in an attempt to make the SCSI printing more consistent and suitable for human consumption.

Previously a typical error looked like this:

sd 0:0:0:0: SCSI error: return code = 0x08000002
sda: Current: sense key: Aborted Command
Additional sense: Logical block reference tag check failed

You had to have the magic return value decoder ring handy to figure out what had really happened. And you had to do the mapping between sd 0:0:0:0 and sda yourself.

The following patches clean up various bits so that the same information can be presented in a more readable form:

sd 0:0:0:0: [sda] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE,SUGGEST_OK sd 0:0:0:0: [sda] Sense Key : Aborted Command [current]
sd 0:0:0:0: [sda] Add. Sense: Logical block reference tag check failed

Quoted 8 lines

All printk's from sd.c now have the same prefix. If logging is turned on, for instance, we also get:

    sd 0:0:0:0: [sda] Send: 0x0fb89180 
    sd 0:0:0:0: [sda] CDB: Read(16): 88 20 00 00 00 00 00 00 00 20 00 00 00 08 00 00
    sd 0:0:0:0: [sda] Done: 0x0fb89180 SUCCESS

The patches need to be applied in order.

Martin,
Looks good.

If you need to revise anything, perhaps you could add a comment with this url near the list of additional sense codes:
http://www.t10.org/lists/asc-num.txt

That is the official list of SCSI additional sense codes.

Based on the date of my last additional sense code update only this one is missing:
2Fh/02h DTLPWROMAEBKVF COMMANDS CLEARED BY DEVICE SERVER

Doug Gilbert

#2 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Doug" == Douglas Gilbert <[email protected]> writes:

Doug> If you need to revise anything, perhaps you could add a comment Doug> with this url near the list of additional sense codes:
Doug> http://www.t10.org/lists/asc-num.txt

Oh, that's super helpful. Much easier than searching the SPC draft.

Patch on its way...

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering