Commit 39ee5201 authored by Heiko Carstens's avatar Heiko Carstens Committed by James Bottomley

[PATCH] sd.c: set data direction to SCSI_DATA_NONE for START_STOP

while trying to access a disk drive via an FCP bridge we got an FCP_RSP IU
with the RSP_CODE field set to "FCP_CMND Fields Invalid". This happened
after sending a START_STOP command to the device. Reason for this was that
the FCP_CMND IU incorrectly had the RDDATA field set to one, because of a
bug in sd_spinup_disk(). There the data direction for START_STOP is set
to SCSI_DATA_READ instead of SCSI_DATA_NONE.
Please apply the patch below.

Thanks,
Heiko
parent 7cc987b7
...@@ -850,7 +850,7 @@ sd_spinup_disk(struct scsi_disk *sdkp, char *diskname, ...@@ -850,7 +850,7 @@ sd_spinup_disk(struct scsi_disk *sdkp, char *diskname,
SRpnt->sr_sense_buffer[0] = 0; SRpnt->sr_sense_buffer[0] = 0;
SRpnt->sr_sense_buffer[2] = 0; SRpnt->sr_sense_buffer[2] = 0;
SRpnt->sr_data_direction = SCSI_DATA_READ; SRpnt->sr_data_direction = SCSI_DATA_NONE;
scsi_wait_req(SRpnt, (void *)cmd, scsi_wait_req(SRpnt, (void *)cmd,
(void *) buffer, 0/*512*/, (void *) buffer, 0/*512*/,
SD_TIMEOUT, SD_MAX_RETRIES); SD_TIMEOUT, SD_MAX_RETRIES);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment