]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
sd: retry discard commands
authorChristoph Hellwig <hch@lst.de>
Sat, 28 Jun 2014 14:18:59 +0000 (16:18 +0200)
committerChristoph Hellwig <hch@lst.de>
Thu, 17 Jul 2014 20:16:28 +0000 (22:16 +0200)
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>
drivers/scsi/sd.c

index f54a53086c9d3b6fab107b4aaf870a97ad0f43a9..fe0b7dff02b4af1d6ddc15deb261555cff2bdb9f 100644 (file)
@@ -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