* [PATCH v3 9/10] megaraid_sas : Code refactor for use of requestorId
@ 2015-08-31 11:54 sumit.saxena
2015-09-04 3:35 ` Martin K. Petersen
0 siblings, 1 reply; 2+ messages in thread
From: sumit.saxena @ 2015-08-31 11:54 UTC (permalink / raw)
To: linux-scsi, thenzl, martin.petersen, hch, jbottomley,
kashyap.desai, sumit.saxena, kiran-kumar.kasturi
Cc: uday.lingala
Some of the code changes was proposed by David Binderman
Removed redudant check of requestorId. Redundant condition: instance.requestorId.
Check for plasma firmware 1.11 or new restructured to support only for specific device id
Signed-off-by: Sumit Saxena <sumit.saxena@avagotech.com>
Signed-off-by: Kashyap Desai <kashyap.desai@avagotech.com>
---
drivers/scsi/megaraid/megaraid_sas_base.c | 35 +++++++++++++++--------------
1 files changed, 18 insertions(+), 17 deletions(-)
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index 3a824cb..d2ebcdd 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -4842,18 +4842,22 @@ static int megasas_init_fw(struct megasas_instance *instance)
}
if (ctrl_info->host_interface.SRIOV) {
- if (!ctrl_info->adapterOperations2.activePassive)
- instance->PlasmaFW111 = 1;
-
- if (!instance->PlasmaFW111)
- instance->requestorId =
- ctrl_info->iov.requestorId;
- else {
- iovPtr = (struct IOV_111 *)((unsigned char *)ctrl_info + IOV_111_OFFSET);
- instance->requestorId = iovPtr->requestorId;
+ instance->requestorId = ctrl_info->iov.requestorId;
+ if (instance->pdev->device == PCI_DEVICE_ID_LSI_PLASMA) {
+ if (!ctrl_info->adapterOperations2.activePassive)
+ instance->PlasmaFW111 = 1;
+
+ dev_info(&instance->pdev->dev, "SR-IOV: firmware type: %s\n",
+ instance->PlasmaFW111 ? "1.11" : "new");
+
+ if (instance->PlasmaFW111) {
+ iovPtr = (struct IOV_111 *)
+ ((unsigned char *)ctrl_info + IOV_111_OFFSET);
+ instance->requestorId = iovPtr->requestorId;
+ }
}
- dev_warn(&instance->pdev->dev, "I am VF "
- "requestorId %d\n", instance->requestorId);
+ dev_info(&instance->pdev->dev, "SRIOV: VF requestorId %d\n",
+ instance->requestorId);
}
instance->crash_dump_fw_support =
@@ -6723,8 +6727,7 @@ megasas_aen_polling(struct work_struct *work)
case MR_EVT_CFG_CLEARED:
case MR_EVT_LD_DELETED:
if (!instance->requestorId ||
- (instance->requestorId &&
- megasas_get_ld_vf_affiliation(instance, 0))) {
+ megasas_get_ld_vf_affiliation(instance, 0)) {
if (megasas_ld_list_query(instance,
MR_LD_QUERY_TYPE_EXPOSED_TO_HOST))
megasas_get_ld_list(instance);
@@ -6755,8 +6758,7 @@ megasas_aen_polling(struct work_struct *work)
break;
case MR_EVT_LD_CREATED:
if (!instance->requestorId ||
- (instance->requestorId &&
- megasas_get_ld_vf_affiliation(instance, 0))) {
+ megasas_get_ld_vf_affiliation(instance, 0)) {
if (megasas_ld_list_query(instance,
MR_LD_QUERY_TYPE_EXPOSED_TO_HOST))
megasas_get_ld_list(instance);
@@ -6822,8 +6824,7 @@ megasas_aen_polling(struct work_struct *work)
}
if (!instance->requestorId ||
- (instance->requestorId &&
- megasas_get_ld_vf_affiliation(instance, 0))) {
+ megasas_get_ld_vf_affiliation(instance, 0)) {
if (megasas_ld_list_query(instance,
MR_LD_QUERY_TYPE_EXPOSED_TO_HOST))
megasas_get_ld_list(instance);
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v3 9/10] megaraid_sas : Code refactor for use of requestorId
2015-08-31 11:54 [PATCH v3 9/10] megaraid_sas : Code refactor for use of requestorId sumit.saxena
@ 2015-09-04 3:35 ` Martin K. Petersen
0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2015-09-04 3:35 UTC (permalink / raw)
To: sumit.saxena
Cc: linux-scsi, thenzl, martin.petersen, hch, jbottomley,
kashyap.desai, kiran-kumar.kasturi, uday.lingala
>>>>> "Sumit" == sumit saxena <sumit.saxena@avagotech.com> writes:
Sumit> Some of the code changes was proposed by David Binderman Removed
Sumit> redudant check of requestorId. Redundant condition:
Sumit> instance.requestorId. Check for plasma firmware 1.11 or new
Sumit> restructured to support only for specific device id
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-09-04 3:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-31 11:54 [PATCH v3 9/10] megaraid_sas : Code refactor for use of requestorId sumit.saxena
2015-09-04 3:35 ` Martin K. Petersen
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).