summaryrefslogtreecommitdiff
path: root/drivers/scsi
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2014-06-28 14:18:59 (GMT)
committerChristoph Hellwig <hch@lst.de>2014-07-17 20:16:28 (GMT)
commite4200f8ee35db820680a3caa25d260ef11fc1462 (patch)
treead487daeb1655daf388b08d1356822ecc60e6bf8 /drivers/scsi
parenta25ee5485157403612fbb59be6c0435ede2f1da8 (diff)
downloadlinux-e4200f8ee35db820680a3caa25d260ef11fc1462.tar.xz
sd: retry discard commands
Currently cmd->allowed is initialized from rq->retries for discard commands, but retries is always 0 for non-BLOCK_PC requests. Set it to the standard number of retries instead. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Hannes Reinecke <hare@suse.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/sd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index f54a530..fe0b7df 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -758,7 +758,7 @@ static int sd_setup_discard_cmnd(struct scsi_cmnd *cmd)
rq->timeout = SD_TIMEOUT;
cmd->transfersize = len;
- cmd->allowed = rq->retries;
+ cmd->allowed = SD_MAX_RETRIES;
/*
* Initially __data_len is set to the amount of data that needs to be