aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/dmesg.py
diff options
context:
space:
mode:
authorFinn Thain <[email protected]>2016-01-03 16:06:00 +1100
committerMartin K. Petersen <[email protected]>2016-01-06 21:43:08 -0500
commitf27db8eb98a19e0f1b5748f8aad9fb4a98301eb0 (patch)
treed45622dd0b5a95ecbd2bbaabf52226562ba2c49b /scripts/gdb/linux/dmesg.py
parent677e01947e4a34ad97e9867af20435b8281c38e0 (diff)
ncr5380: Fix autosense bugs
NCR5380_information_transfer() may re-queue a command for autosense, after calling scsi_eh_prep_cmnd(). This creates several possibilities: 1. Reselection may intervene before the re-queued command gets processed. If the reconnected command then undergoes autosense, this causes the scsi_eh_save data from the previous command to be overwritten. 2. After NCR5380_information_transfer() calls scsi_eh_prep_cmnd(), a new REQUEST SENSE command may arrive. This would be queued ahead of any command already undergoing autosense, which means the scsi_eh_save data might be restored to the wrong command. 3. After NCR5380_information_transfer() calls scsi_eh_prep_cmnd(), eh_abort_handler() may abort the command. But the scsi_eh_save data is not discarded, which means the scsi_eh_save data might be incorrectly restored to the next REQUEST SENSE command issued. This patch adds a new autosense list so that commands that are re-queued because of a CHECK CONDITION result can be kept apart from the REQUEST SENSE commands that arrive via queuecommand. This patch also adds a function dedicated to dequeueing and preparing the next command for processing. By refactoring the main loop in this way, scsi_eh_save takes place when an autosense command is dequeued rather than when re-queued. Signed-off-by: Finn Thain <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Tested-by: Ondrej Zary <[email protected]> Tested-by: Michael Schmitz <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/dmesg.py')
0 files changed, 0 insertions, 0 deletions