SYNCHRONIZE_CACHE command used fixed value
PATCH 4/5 SYNCHRONIZE_CACHE command used fixed value
Switch to adjustable timeout value for scsi SYNCHRONIZE_CACHE commands. We have been running into problems with fixed values on troublesome devices.
Signed-off-by Bernd Schubert <[email protected]>
--- drivers/scsi/sd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/scsi/sd.c +3 -2
@@ -884,7 +884,8 @@ static int sd_sync_cache(struct scsi_dis* flush everything. */ res =scsi_execute_req (sdp, cmd,DMA_NONE ,NULL ,0 , &sshdr, -SD_TIMEOUT ,SD_MAX_RETRIES ); + sdp->request_queue->rq_timeout, +SD_MAX_RETRIES );if (res ==0 )break ; }
@@ -903,7 +904,7 @@ static int sd_sync_cache(struct scsi_disstatic void sd_prepare_flush (struct request_queue *q,struct request *rq) { rq->cmd_type =REQ_TYPE_BLOCK_PC ; - rq->timeout =SD_TIMEOUT ; + rq->timeout = q->rq_timeout; rq->cmd[0 ] =SYNCHRONIZE_CACHE ; rq->cmd_len =10 ; }
Signature · 2 lines
Bernd Schubert Q-Leap Networks GmbH