From: Anand Lodnoor <anand.lodnoor@broadcom.com>
To: linux-scsi@vger.kernel.org
Cc: kashyap.desai@broadcom.com, sumit.saxena@broadcom.com,
kiran-kumar.kasturi@broadcom.com, sankar.patra@broadcom.com,
sasikumar.pc@broadcom.com,
shivasharan.srikanteshwara@broadcom.com,
chandrakanth.patil@broadcom.com,
Anand Lodnoor <anand.lodnoor@broadcom.com>
Subject: [PATCH v2 02/11] megaraid_sas: Set no_write_same only for Virtual Disk
Date: Tue, 14 Jan 2020 16:51:13 +0530 [thread overview]
Message-ID: <1579000882-20246-3-git-send-email-anand.lodnoor@broadcom.com> (raw)
In-Reply-To: <1579000882-20246-1-git-send-email-anand.lodnoor@broadcom.com>
Disable WRITE_SAME (no_write_same) for Virtual Disks only.
For System PDs and EPDs (Enhanced PDs), WRITE_SAME need not be disabled by
default.
Signed-off-by: Anand Lodnoor <anand.lodnoor@broadcom.com>
---
drivers/scsi/megaraid/megaraid_sas_base.c | 5 ++++-
drivers/scsi/megaraid/megaraid_sas_fusion.h | 17 ++++++++++++++---
2 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index 96b893f..8b9ecee 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -1887,6 +1887,10 @@ void megasas_set_dynamic_target_properties(struct scsi_device *sdev,
mr_device_priv_data->is_tm_capable =
raid->capability.tmCapable;
+
+ if (!raid->flags.isEPD)
+ sdev->no_write_same = 1;
+
} else if (instance->use_seqnum_jbod_fp) {
pd_index = (sdev->channel * MEGASAS_MAX_DEV_PER_CHANNEL) +
sdev->id;
@@ -3416,7 +3420,6 @@ static int megasas_reset_target(struct scsi_cmnd *scmd)
.bios_param = megasas_bios_param,
.change_queue_depth = scsi_change_queue_depth,
.max_segment_size = 0xffffffff,
- .no_write_same = 1,
};
/**
diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.h b/drivers/scsi/megaraid/megaraid_sas_fusion.h
index c013c80..8358b68 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.h
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.h
@@ -864,9 +864,20 @@ struct MR_LD_RAID {
u8 regTypeReqOnRead;
__le16 seqNum;
- struct {
- u32 ldSyncRequired:1;
- u32 reserved:31;
+struct {
+#ifndef MFI_BIG_ENDIAN
+ u32 ldSyncRequired:1;
+ u32 regTypeReqOnReadIsValid:1;
+ u32 isEPD:1;
+ u32 enableSLDOnAllRWIOs:1;
+ u32 reserved:28;
+#else
+ u32 reserved:28;
+ u32 enableSLDOnAllRWIOs:1;
+ u32 isEPD:1;
+ u32 regTypeReqOnReadIsValid:1;
+ u32 ldSyncRequired:1;
+#endif
} flags;
u8 LUN[8]; /* 0x24 8 byte LUN field used for SCSI IO's */
--
1.8.3.1
next prev parent reply other threads:[~2020-01-14 11:22 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-14 11:21 [PATCH v2 00/11] megaraid_sas: driver updates to 07.713.01.00-rc1 Anand Lodnoor
2020-01-14 11:21 ` [PATCH v2 01/11] megaraid_sas: Reset adapter if FW is not in READY state after device resume Anand Lodnoor
2020-01-14 11:21 ` Anand Lodnoor [this message]
2020-01-14 11:21 ` [PATCH v2 03/11] megaraid_sas: Update optimal queue depth for SAS and NVMe devices Anand Lodnoor
2020-01-14 11:21 ` [PATCH v2 04/11] megaraid_sas: Do not kill host bus adapter, if adapter is already dead Anand Lodnoor
2020-01-14 11:21 ` [PATCH v2 05/11] megaraid_sas: Do not kill HBA if JBOD Seqence map or RAID map is disabled Anand Lodnoor
2020-01-14 11:21 ` [PATCH v2 06/11] megaraid_sas: Do not set HBA Operational if FW is not in operational state Anand Lodnoor
2020-01-14 11:21 ` [PATCH v2 07/11] megaraid_sas: Re-Define enum DCMD_RETURN_STATUS Anand Lodnoor
2020-01-14 11:21 ` [PATCH v2 08/11] megaraid_sas: Do not initiate OCR if controller is not in ready state Anand Lodnoor
2020-01-14 11:21 ` [PATCH v2 09/11] megaraid_sas: Limit the number of retries for the IOCTLs causing firmware fault Anand Lodnoor
2020-01-14 11:21 ` [PATCH v2 10/11] megaraid_sas: Use Block layer API to check SCSI device in-flight IO requests Anand Lodnoor
2020-01-16 12:30 ` Hannes Reinecke
2020-01-17 11:19 ` Anand Lodnoor
2020-02-26 16:19 ` John Garry
[not found] ` <CAAO+jF-P3MkB2mo6pmYH1ihjRGpfjkkgXZg9dAZ29nYmU6T2=A@mail.gmail.com>
2020-02-27 12:32 ` John Garry
2020-03-02 9:17 ` Hannes Reinecke
2020-03-02 9:51 ` John Garry
2020-03-02 18:37 ` Sumit Saxena
2020-03-03 11:53 ` John Garry
2020-03-03 11:56 ` Hannes Reinecke
2020-03-03 17:04 ` Sumit Saxena
2020-03-04 9:39 ` John Garry
2020-01-14 11:21 ` [PATCH v2 11/11] megaraid_sas: Update driver version to 07.713.01.00-rc1 Anand Lodnoor
2020-01-16 4:21 ` [PATCH v2 00/11] megaraid_sas: driver updates " Martin K. Petersen
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=1579000882-20246-3-git-send-email-anand.lodnoor@broadcom.com \
--to=anand.lodnoor@broadcom.com \
--cc=chandrakanth.patil@broadcom.com \
--cc=kashyap.desai@broadcom.com \
--cc=kiran-kumar.kasturi@broadcom.com \
--cc=linux-scsi@vger.kernel.org \
--cc=sankar.patra@broadcom.com \
--cc=sasikumar.pc@broadcom.com \
--cc=shivasharan.srikanteshwara@broadcom.com \
--cc=sumit.saxena@broadcom.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).