From: Christoph Hellwig Date: Sat, 28 Jun 2014 14:18:59 +0000 (+0200) Subject: sd: retry discard commands X-Git-Tag: v4.9.8~5861^2~98 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e4200f8ee35db820680a3caa25d260ef11fc1462;p=platform%2Fkernel%2Flinux-rpi3.git 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 Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke --- 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