summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/gdth_kcompat.h
diff options
context:
space:
mode:
authorBoaz Harrosh <bharrosh@panasas.com>2007-07-29 22:27:06 +0300
committerJames Bottomley <jejb@mulgrave.localdomain>2007-08-04 09:14:24 -0500
commit45333ffa6ffd2f493fc3853481984b6e60b4fb93 (patch)
tree77be77784c92689593b3b56e92a070da64f84745 /drivers/scsi/gdth_kcompat.h
parent66acdb0309507950376393f2fb1c8e7482fb4d52 (diff)
downloadblackbird-op-linux-45333ffa6ffd2f493fc3853481984b6e60b4fb93.tar.gz
blackbird-op-linux-45333ffa6ffd2f493fc3853481984b6e60b4fb93.zip
[SCSI] aha152x: Fix check_condition code-path
check_condition code-path was similar but more complicated to Reset. It went like this: 1. extra space was allocated at aha152x_scdata for mirroring scsi_cmnd members. 2. At aha152x_internal_queue() every not check_condition (REQUEST_SENSE) command was copied to above members in case of error. 3. At busfree_run() in the DONE_CS phase if a Status of SAM_STAT_CHECK_CONDITION was detected. The command was re-queued Internally using aha152x_internal_queue(,,check_condition,) The old command members are over written with the REQUEST_SENSE info. 4. At busfree_run() in the DONE_CS phase again. If it is a check_condition command, info was restored from mirror made at first call to aha152x_internal_queue() (see 2) and the command is completed. What I did is: 1. Allocate less space in aha152x_scdata only for the 16-byte original command. (which is actually not needed by scsi-ml anymore at this stage. But this is to much knowledge of scsi-ml) 2. If Status == SAM_STAT_CHECK_CONDITION, then like before re-queue a REQUEST_SENSE command. But only now save original command members. (Less of them) 3. In aha152x_internal_queue(), just like for Reset, use the check_condition hint to set differently the working members. execute the command. 4. At busfree_run() in the DONE_CS phase again. restore needed members. While at it. This patch fixes a BUG. Old code when sending a REQUEST_SENSE for a failed command. Would than return with cmd->resid == 0 which was the status of the REQUEST_SENSE. The failing command resid was lost. And when would resid be interesting if not on a failing command? Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/gdth_kcompat.h')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud