Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1716912

[PATCH 2/2] scsi: Preserve retry counter through scsi_prep_fn

From Brian King <brking@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject [PATCH 2/2] scsi: Preserve retry counter through scsi_prep_fn
Date 2017-08-22 00:20 +0200
Message-ID <uh3d7-1GC-3@gated-at.bofh.it> (permalink)
References (4 earlier) <ufWGK-zl-17@gated-at.bofh.it> <ufXjs-XC-13@gated-at.bofh.it> <ufXt7-10P-7@gated-at.bofh.it> <ufXMt-1mk-5@gated-at.bofh.it> <uh3d7-1GC-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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@linux.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);
 }

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [BUG][bisected 270065e] linux-next fails to boot on powerpc Bart Van Assche <Bart.VanAssche@wdc.com> - 2017-08-16 19:30 +0200
  Re: [BUG][bisected 270065e] linux-next fails to boot on powerpc Brian King <brking@linux.vnet.ibm.com> - 2017-08-17 01:20 +0200
    Re: [BUG][bisected 270065e] linux-next fails to boot on powerpc Bart Van Assche <Bart.VanAssche@wdc.com> - 2017-08-17 18:00 +0200
      Re: [BUG][bisected 270065e] linux-next fails to boot on powerpc Brian King <brking@linux.vnet.ibm.com> - 2017-08-18 23:10 +0200
        [PATCH] ipr: Set no_report_opcodes for RAID arrays Brian King <brking@linux.vnet.ibm.com> - 2017-08-18 23:20 +0200
          Re: [PATCH] ipr: Set no_report_opcodes for RAID arrays "Martin K. Petersen" <martin.petersen@oracle.com> - 2017-08-21 22:30 +0200
        Re: [BUG][bisected 270065e] linux-next fails to boot on powerpc Bart Van Assche <Bart.VanAssche@wdc.com> - 2017-08-18 23:50 +0200
          Re: [BUG][bisected 270065e] linux-next fails to boot on powerpc Brian King <brking@linux.vnet.ibm.com> - 2017-08-19 00:00 +0200
            Re: [BUG][bisected 270065e] linux-next fails to boot on powerpc Bart Van Assche <Bart.VanAssche@wdc.com> - 2017-08-19 00:20 +0200
              [PATCH 2/2] scsi: Preserve retry counter through scsi_prep_fn Brian King <brking@linux.vnet.ibm.com> - 2017-08-22 00:20 +0200
                Re: [PATCH 2/2] scsi: Preserve retry counter through scsi_prep_fn "hch@lst.de" <hch@lst.de> - 2017-08-22 09:00 +0200
              [PATCH 0/2] Allow scsi_prep_fn to occur for retried commands Brian King <brking@linux.vnet.ibm.com> - 2017-08-22 00:20 +0200
                [PATCH 1/2] scsi: Move scsi_cmd->jiffies_at_alloc initialization to  allocation time Brian King <brking@linux.vnet.ibm.com> - 2017-08-22 00:20 +0200
                Re: [PATCH 1/2] scsi: Move scsi_cmd->jiffies_at_alloc initialization  to allocation time Brian King <brking@linux.vnet.ibm.com> - 2017-08-22 00:20 +0200
                [PATCHv2 1/2] scsi: Move scsi_cmd->jiffies_at_alloc initialization to  allocation time Brian King <brking@linux.vnet.ibm.com> - 2017-08-22 00:50 +0200
                Re: [PATCH 1/2] scsi: Move scsi_cmd->jiffies_at_alloc         initialization to allocation time "hch@lst.de" <hch@lst.de> - 2017-08-22 09:00 +0200
                Re: [PATCH 0/2] Allow scsi_prep_fn to occur for retried commands Abdul Haleem <abdhalee@linux.vnet.ibm.com> - 2017-08-22 08:50 +0200
            Re: [BUG][bisected 270065e] linux-next fails to boot on powerpc "Martin K. Petersen" <martin.petersen@oracle.com> - 2017-08-21 22:30 +0200
  Re: [BUG][bisected 270065e] linux-next fails to boot on powerpc Michael Ellerman <mpe@ellerman.id.au> - 2017-08-17 03:40 +0200

csiph-web