diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2003-06-09 02:28:14 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2003-06-09 02:28:14 +0000 |
commit | bc786f06fee201918acb3f6ca1e5864d8c58e2bf (patch) | |
tree | 83ec2bbd75f8c3aadc28d6b4c5fd933a9d1f030c /sys/dev/atapiscsi | |
parent | b9b8ede6e19c7252e05d150a4f80af86cac6d44b (diff) |
Fix erroneous handling of i/o's during a reset.
a) Set xs->status rather than cmd_tables->status because there will be
no interrupt processing to move it from cmd_tables->status to
xs->status.
b) Set cmd_c.status to correct value (CMDST_SENSE_DONE) when an active
sense command is reset.
c) Don't put a reset command from the ready queue into the free_list
twice, once in siop_scsicmd_end() and once manually.
Condition a) meant that the scsi layer was seeing successfully
completed i/o's (xs->error == XS_NOERROR) when they were in fact reset
and should have had xs->error == XS_TIMEOUT or xs->error == XS_RESET.
This meant lost data on output, and random or zero'ed data on input.
Condition b) meant that the wrong bus_dmamap_sync() was called, though
the actual action was apparently identical.
Condition c) meant that the free_list could become corrupt.
The problem was discovered by pb@ on a heavily loaded server that
experienced timeouts. This fix was tested by pb@ and henric@ to prove
it did not affect normal processing. If nothing else it will provide
better error messages if the problem is ever encountered again.
Probably a good candidate for -stable if pb@ can successfully
reproduce his timeout problems and not have his server crash.
Diffstat (limited to 'sys/dev/atapiscsi')
0 files changed, 0 insertions, 0 deletions