linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: wenxiong@vmlinux.vnet.ibm.com
To: James.Bottomley@HansenPartnership.com
Cc: linux-scsi@vger.kernel.org, bjking1@us.ibm.com,
	Wen Xiong <wenxiong@linux.vnet.ibm.com>
Subject: [PATCH RESEND 1/7] ipr: Remove extended delay bit on GSCSI reads/writes ops
Date: Wed, 12 Mar 2014 16:08:46 -0500	[thread overview]
Message-ID: <20140312210905.802415034@vmlinux.vnet.ibm.com> (raw)
In-Reply-To: 20140312210845.384489953@vmlinux.vnet.ibm.com

[-- Attachment #1: delay --]
[-- Type: text/plain, Size: 1826 bytes --]

This patch removes extended delay bit on GSCSI reads/writes ops, the
performance will be significanly better.

Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com>

---
 drivers/scsi/ipr.c |    6 +++++-
 drivers/scsi/ipr.h |    1 +
 2 files changed, 6 insertions(+), 1 deletion(-)

Index: b/drivers/scsi/ipr.c
===================================================================
--- a/drivers/scsi/ipr.c	2014-03-11 17:11:04.487766647 -0500
+++ b/drivers/scsi/ipr.c	2014-03-11 17:12:07.218702192 -0500
@@ -1143,6 +1143,7 @@ static void ipr_init_res_entry(struct ip
 	res->add_to_ml = 0;
 	res->del_from_ml = 0;
 	res->resetting_device = 0;
+	res->reset_occurred = 0;
 	res->sdev = NULL;
 	res->sata_port = NULL;
 
@@ -5015,6 +5016,7 @@ static int __ipr_eh_dev_reset(struct scs
 	} else
 		rc = ipr_device_reset(ioa_cfg, res);
 	res->resetting_device = 0;
+	res->reset_occurred = 1;
 
 	LEAVE;
 	return rc ? FAILED : SUCCESS;
@@ -6183,8 +6185,10 @@ static int ipr_queuecommand(struct Scsi_
 			ioarcb->cmd_pkt.flags_hi |= IPR_FLAGS_HI_NO_ULEN_CHK;
 
 		ioarcb->cmd_pkt.flags_hi |= IPR_FLAGS_HI_NO_LINK_DESC;
-		if (ipr_is_gscsi(res))
+		if (ipr_is_gscsi(res) && res->reset_occurred) {
+			res->reset_occurred = 0;
 			ioarcb->cmd_pkt.flags_lo |= IPR_FLAGS_LO_DELAY_AFTER_RST;
+		}
 		ioarcb->cmd_pkt.flags_lo |= IPR_FLAGS_LO_ALIGNED_BFR;
 		ioarcb->cmd_pkt.flags_lo |= ipr_get_task_attributes(scsi_cmd);
 	}
Index: b/drivers/scsi/ipr.h
===================================================================
--- a/drivers/scsi/ipr.h	2014-03-11 17:10:58.577766209 -0500
+++ b/drivers/scsi/ipr.h	2014-03-11 17:12:07.218702192 -0500
@@ -1252,6 +1252,7 @@ struct ipr_resource_entry {
 	u8 add_to_ml:1;
 	u8 del_from_ml:1;
 	u8 resetting_device:1;
+	u8 reset_occurred:1;
 
 	u32 bus;		/* AKA channel */
 	u32 target;		/* AKA id */

-- 

  reply	other threads:[~2014-03-12 21:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-12 21:08 [PATCH RESEND 0/7] New CCINs and several patches for new improvement wenxiong
2014-03-12 21:08 ` wenxiong [this message]
2014-03-14 15:50   ` [PATCH RESEND 1/7] ipr: Remove extended delay bit on GSCSI reads/writes ops Brian King
2014-03-12 21:08 ` [PATCH RESEND 2/7] ipr: Add new CCIN definition for new hardware support wenxiong
2014-03-12 21:08 ` [PATCH RESEND 3/7] ipr: Handle early EEH wenxiong
2014-03-12 21:08 ` [PATCH RESEND 4/7] ipr: Get rid of superfluous call to pci_disbale_msi/msix() wenxiong
2014-03-19 19:55   ` James Bottomley
2014-03-19 20:26     ` Brian King
2014-03-19 20:57       ` James Bottomley
2014-03-12 21:08 ` [PATCH RESEND 5/7] ipr: Use pci_enable_msi_range() and pci_enable_msix_range() wenxiong
2014-03-12 21:08 ` [PATCH RESEND 6/7] ipr: Format HCAM overlay ID 0x21 wenxiong
2014-03-12 21:08 ` [PATCH RESEND 7/7] ipr: Add new CCIN definition for Grand Canyon support wenxiong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140312210905.802415034@vmlinux.vnet.ibm.com \
    --to=wenxiong@vmlinux.vnet.ibm.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=bjking1@us.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=wenxiong@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).