From: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
To: linux-scsi@vger.kernel.org, hch@infradead.org
Cc: martin.petersen@oracle.com, JBottomley@Parallels.com,
Sathya.Prakash@broadcom.com, linux-kernel@vger.kernel.org,
Sreekanth Reddy <Sreekanth.Reddy@broadcom.com>
Subject: [PATCH 04/10] mpt3sas: Fix removal and addition of vSES device during host reset
Date: Tue, 10 Oct 2017 18:41:17 +0530 [thread overview]
Message-ID: <1507641083-20207-5-git-send-email-Sreekanth.Reddy@broadcom.com> (raw)
In-Reply-To: <1507641083-20207-1-git-send-email-Sreekanth.Reddy@broadcom.com>
For Dev Handles who value is less than hba's phys count number
driver will return HBA sas address value as a sas address.
So for Virtual SES device also driver was returning HBA sas address instead
of Virtual SES sas address. So now updated the driver to return
Virtual SES's sas address for Virtual SES device instead of
HBA's sas address.
Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@broadcom.com>
---
drivers/scsi/mpt3sas/mpt3sas_scsih.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
index 600e8ef..cc78ce4 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
@@ -406,11 +406,6 @@ _scsih_get_sas_address(struct MPT3SAS_ADAPTER *ioc, u16 handle,
*sas_address = 0;
- if (handle <= ioc->sas_hba.num_phys) {
- *sas_address = ioc->sas_hba.sas_address;
- return 0;
- }
-
if ((mpt3sas_config_get_sas_device_pg0(ioc, &mpi_reply, &sas_device_pg0,
MPI2_SAS_DEVICE_PGAD_FORM_HANDLE, handle))) {
pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", ioc->name,
@@ -420,7 +415,15 @@ _scsih_get_sas_address(struct MPT3SAS_ADAPTER *ioc, u16 handle,
ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & MPI2_IOCSTATUS_MASK;
if (ioc_status == MPI2_IOCSTATUS_SUCCESS) {
- *sas_address = le64_to_cpu(sas_device_pg0.SASAddress);
+ /* For HBA vSES don't return hba sas address instead return
+ * vSES's sas address.
+ */
+ if ((handle <= ioc->sas_hba.num_phys) &&
+ (!(le32_to_cpu(sas_device_pg0.DeviceInfo) &
+ MPI2_SAS_DEVICE_INFO_SEP)))
+ *sas_address = ioc->sas_hba.sas_address;
+ else
+ *sas_address = le64_to_cpu(sas_device_pg0.SASAddress);
return 0;
}
--
2.4.3
next prev parent reply other threads:[~2017-10-10 13:15 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-10 13:11 [PATCH 00/10] [SCSI] mpt3sas: Phase15 driver enhancements and fixes Sreekanth Reddy
2017-10-10 13:11 ` [PATCH 01/10] mpt3sas: Processing of Cable Exception events Sreekanth Reddy
2017-10-11 15:17 ` Tomas Henzl
2017-10-10 13:11 ` [PATCH 02/10] mpt3sas: Fixed memory leaks in driver Sreekanth Reddy
2017-10-11 15:30 ` Tomas Henzl
2017-10-10 13:11 ` [PATCH 03/10] mpt3sas: Reduce memory footprints in kdump kernel Sreekanth Reddy
2017-10-11 15:33 ` Tomas Henzl
2017-10-10 13:11 ` Sreekanth Reddy [this message]
2017-10-11 15:35 ` [PATCH 04/10] mpt3sas: Fix removal and addition of vSES device during host reset Tomas Henzl
2017-10-11 15:56 ` James Bottomley
2017-10-11 16:12 ` Tomas Henzl
2017-10-11 17:19 ` James Bottomley
2017-10-11 17:27 ` Martin K. Petersen
2017-10-10 13:11 ` [PATCH 05/10] mpt3sas: Fix IO error occurs on pulling out a drive from RAID1 volume created on two SATA drive Sreekanth Reddy
2017-10-11 15:37 ` Tomas Henzl
2017-10-10 13:11 ` [PATCH 06/10] mpt3sas: Updated MPI headers to v2.00.48 Sreekanth Reddy
2017-10-11 15:42 ` Tomas Henzl
2017-10-10 13:11 ` [PATCH 07/10] mpt3sas: Display chassis slot information of the drive Sreekanth Reddy
2017-10-11 16:00 ` Tomas Henzl
2017-10-10 13:11 ` [PATCH 08/10] mpt3sas: Fix possibility of using invalid Enclosure Handles for SAS device after host reset Sreekanth Reddy
2017-10-11 16:07 ` Tomas Henzl
2017-10-11 16:09 ` Tomas Henzl
2017-10-10 13:11 ` [PATCH 09/10] mpt3sas: Adding support for SAS3616 HBA device Sreekanth Reddy
2017-10-11 16:12 ` Tomas Henzl
2017-10-10 13:11 ` [PATCH 10/10] mpt3sas: Bump mpt3sas driver version to v16.100.00.00 Sreekanth Reddy
2017-10-11 16:13 ` Tomas Henzl
2017-10-11 18:11 ` [PATCH 00/10] [SCSI] mpt3sas: Phase15 driver enhancements and fixes 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=1507641083-20207-5-git-send-email-Sreekanth.Reddy@broadcom.com \
--to=sreekanth.reddy@broadcom.com \
--cc=JBottomley@Parallels.com \
--cc=Sathya.Prakash@broadcom.com \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.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
all inboxes | Powered by JetHome®