Skip to contentSkip to conversation

scsi_debug version 1.61

PATCH In review Douglas Gilbert 1 participant 2 messages Jul 17, 2002 – Jul 19, 2002 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi_debug version 1.61

I have reworked the scsi_debug driver mainly to add kernel timers to simulate delayed responses. This is more realistic that returning immediately and allows commands to become queued. The length of the delay is controlled by a new boot line/module option: "scsi_debug_delay".

Other changes:
- support REPORT LUNS
- support more MODE SENSE pages
- [following Doug Ledford's suggestion] do autsense (i.e. set Scsi_Cmnd::sense_buffer array appropriately when a status of CHECK CONDITION is set)
- minor driverfs support
- start adding error injection logic, see "scsi_debug_every_nth"

At the moment the only driverfs support is creating the
directory: /driverfs/bus/scsi/drivers/scsi_debug Patrick Mochel sent a patch to lkml that would have allowed driver parameters to be placed in that directory. That patch didn't make it into lk 2.5.26 .

I'm interested in "clean" ways to inject errors. This would allow, for example, people to observe (and fix) what happens when QUEUE_FULL is returned for the first queued command.

The attachment is a patch against lk 2.5.26 . The full driver and some documentation can be found at
http://www.torque.net/sg/sdebug.html

I hope to backport this version to lk 2.4 (where it will become scsi_debug version 0.61) shortly.

Doug Gilbert

#1 lore raw

There have been some fixes to this driver and a crude INQUIRY evpd page 0x83 has been added. A new diff against lk 2.5.26 is attached.
There are tarballs on http://www.torque.net/sg/sdebug.html
for lk 2.5.26 and the lk 2.4 series (scsi_debug version 0.61).

Doug Gilbert

Quoted 33 lines · Douglas Gilbert

I have reworked the scsi_debug driver mainly to add kernel timers to simulate delayed responses. This is more realistic that returning immediately and allows commands to become queued. The length of the delay is controlled by a new boot line/module option: "scsi_debug_delay".

Other changes:
- support REPORT LUNS
- support more MODE SENSE pages
- [following Doug Ledford's suggestion] do autsense (i.e. set Scsi_Cmnd::sense_buffer array appropriately when a status of CHECK CONDITION is set)
- minor driverfs support
- start adding error injection logic, see "scsi_debug_every_nth"

At the moment the only driverfs support is creating the
directory: /driverfs/bus/scsi/drivers/scsi_debug Patrick Mochel sent a patch to lkml that would have allowed driver parameters to be placed in that directory. That patch didn't make it into lk 2.5.26 .

I'm interested in "clean" ways to inject errors. This would allow, for example, people to observe (and fix) what happens when QUEUE_FULL is returned for the first queued command.

The attachment is a patch against lk 2.5.26 . The full driver and some documentation can be found at
http://www.torque.net/sg/sdebug.html

I hope to backport this version to lk 2.4 (where it will become scsi_debug version 0.61) shortly.