[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <e24506f3-e333-16b9-a8c9-5d25f3c19ccf@linux.vnet.ibm.com>
Date: Mon, 21 Aug 2017 17:14:00 -0500
From: Brian King <brking@...ux.vnet.ibm.com>
To: Bart Van Assche <Bart.VanAssche@....com>,
"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
"abdhalee@...ux.vnet.ibm.com" <abdhalee@...ux.vnet.ibm.com>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"hch@....de" <hch@....de>,
"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
"sfr@...b.auug.org.au" <sfr@...b.auug.org.au>,
"sachinp@...ux.vnet.ibm.com" <sachinp@...ux.vnet.ibm.com>,
"linux-next@...r.kernel.org" <linux-next@...r.kernel.org>,
"hare@...e.com" <hare@...e.com>,
"mpe@...erman.id.au" <mpe@...erman.id.au>
Subject: [PATCH 2/2] scsi: Preserve retry counter through scsi_prep_fn
Save / restore the retry counter in scsi_cmd in scsi_init_command.
This allows us to go back through scsi_init_command for retries
and not forget we are doing a retry.
Signed-off-by: Brian King <brking@...ux.vnet.ibm.com>
---
Index: linux-2.6.git/drivers/scsi/scsi_lib.c
===================================================================
--- linux-2.6.git.orig/drivers/scsi/scsi_lib.c
+++ linux-2.6.git/drivers/scsi/scsi_lib.c
@@ -1155,6 +1155,7 @@ void scsi_init_command(struct scsi_devic
void *prot = cmd->prot_sdb;
unsigned int unchecked_isa_dma = cmd->flags & SCMD_UNCHECKED_ISA_DMA;
unsigned long jiffies_at_alloc = cmd->jiffies_at_alloc;
+ int retries = cmd->retries;
/* zero out the cmd, except for the embedded scsi_request */
memset((char *)cmd + sizeof(cmd->req), 0,
@@ -1166,6 +1167,7 @@ void scsi_init_command(struct scsi_devic
cmd->flags = unchecked_isa_dma;
INIT_DELAYED_WORK(&cmd->abort_work, scmd_eh_abort_handler);
cmd->jiffies_at_alloc = jiffies_at_alloc;
+ cmd->retries = retries;
scsi_add_cmd_to_list(cmd);
}
Powered by blists - more mailing lists