* [PATCH 0/5] megaraid_sas: Update for scsi for-next
@ 2014-07-09 22:17 Adam Radford
2014-07-09 22:17 ` [PATCH 1/5] megaraid_sas: Fix reset_mutex leak Adam Radford
` (4 more replies)
0 siblings, 5 replies; 8+ messages in thread
From: Adam Radford @ 2014-07-09 22:17 UTC (permalink / raw)
To: linux-scsi, uday.lingala, kashyap.desai, sumit.saxena; +Cc: Adam Radford
(Re-sending again based on feedback from Christoph Hellwig & Martin Petersen)
The following patch series for megaraid_sas brings the driver up to
v06.803.02.00-rc1.
1. Fix reset_mutex leak in megasas_reset_fusion().
2. Remove unused variables in megasas_instance.
3. Fix LD/VF affiliation parsing.
4. Add missing initial call to megasas_get_ld_vf_affiliation().
5. Version and Changelog update.
Adam Radford (5):
megaraid_sas: Fix reset_mutex leak
megaraid_sas: Remove unused variables in megasas_instance
megaraid_sas: Fix LD/VF affiliation parsing
megaraid_sas: Add missing initial call to
megasas_get_ld_vf_affiliation().
megaraid_sas: Version and Changelog update
Documentation/scsi/ChangeLog.megaraid_sas | 14 ++
drivers/scsi/megaraid/megaraid_sas.h | 9 +-
drivers/scsi/megaraid/megaraid_sas_base.c | 324 ++++++++++++++++++----------
drivers/scsi/megaraid/megaraid_sas_fusion.c | 1 +
4 files changed, 231 insertions(+), 117 deletions(-)
--
1.7.11.7
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/5] megaraid_sas: Fix reset_mutex leak
2014-07-09 22:17 [PATCH 0/5] megaraid_sas: Update for scsi for-next Adam Radford
@ 2014-07-09 22:17 ` Adam Radford
2014-07-09 22:17 ` [PATCH 2/5] megaraid_sas: Remove unused variables in megasas_instance Adam Radford
` (3 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Adam Radford @ 2014-07-09 22:17 UTC (permalink / raw)
To: linux-scsi, uday.lingala, kashyap.desai, sumit.saxena; +Cc: Adam Radford
The following patch for megaraid_sas fixes a reset_mutex leak in megasas_reset_fusion().
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Adam Radford <aradford@gmail.com>
---
drivers/scsi/megaraid/megaraid_sas_fusion.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c
index 2260041..0858851 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
@@ -2355,6 +2355,7 @@ int megasas_reset_fusion(struct Scsi_Host *shost, int iotimeout)
printk(KERN_WARNING "megaraid_sas: Hardware critical error, "
"returning FAILED for scsi%d.\n",
instance->host->host_no);
+ mutex_unlock(&instance->reset_mutex);
return FAILED;
}
--
1.7.11.7
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/5] megaraid_sas: Remove unused variables in megasas_instance
2014-07-09 22:17 [PATCH 0/5] megaraid_sas: Update for scsi for-next Adam Radford
2014-07-09 22:17 ` [PATCH 1/5] megaraid_sas: Fix reset_mutex leak Adam Radford
@ 2014-07-09 22:17 ` Adam Radford
2014-07-09 22:17 ` [PATCH 3/5] megaraid_sas: Fix LD/VF affiliation parsing Adam Radford
` (2 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Adam Radford @ 2014-07-09 22:17 UTC (permalink / raw)
To: linux-scsi, uday.lingala, kashyap.desai, sumit.saxena; +Cc: Adam Radford
The following patch for megaraid_sas removes some unused variables from the megasas_instance structure.
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Adam Radford <aradford@gmail.com>
---
drivers/scsi/megaraid/megaraid_sas.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h
index 32166c2..7d722fb 100644
--- a/drivers/scsi/megaraid/megaraid_sas.h
+++ b/drivers/scsi/megaraid/megaraid_sas.h
@@ -1633,8 +1633,6 @@ struct megasas_instance {
struct timer_list sriov_heartbeat_timer;
char skip_heartbeat_timer_del;
u8 requestorId;
- u64 initiator_sas_address;
- u64 ld_sas_address[64];
char PlasmaFW111;
char mpio;
int throttlequeuedepth;
--
1.7.11.7
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/5] megaraid_sas: Fix LD/VF affiliation parsing
2014-07-09 22:17 [PATCH 0/5] megaraid_sas: Update for scsi for-next Adam Radford
2014-07-09 22:17 ` [PATCH 1/5] megaraid_sas: Fix reset_mutex leak Adam Radford
2014-07-09 22:17 ` [PATCH 2/5] megaraid_sas: Remove unused variables in megasas_instance Adam Radford
@ 2014-07-09 22:17 ` Adam Radford
2014-07-11 9:55 ` Christoph Hellwig
2014-07-09 22:17 ` [PATCH 4/5] megaraid_sas: Add missing initial call to megasas_get_ld_vf_affiliation() Adam Radford
2014-07-09 22:17 ` [PATCH 5/5] megaraid_sas: Version and Changelog update Adam Radford
4 siblings, 1 reply; 8+ messages in thread
From: Adam Radford @ 2014-07-09 22:17 UTC (permalink / raw)
To: linux-scsi, uday.lingala, kashyap.desai, sumit.saxena; +Cc: Adam Radford
The following patch for megaraid_sas fixes the LD/VF affiliation policy parsing
code to account for LD targetId's and Hidden LD's (not yet affiliated with any
Virtual Functions). This also breaks megasas_get_ld_vf_affiliation() into 2
separate functions: megasas_get_ld_vf_affiliation_111() and
megasas_get_ld_Vf_affiliation_12() to reduce indentation levels.
Signed-off-by: Adam Radford <aradford@gmail.com>
---
drivers/scsi/megaraid/megaraid_sas.h | 1 +
drivers/scsi/megaraid/megaraid_sas_base.c | 318 +++++++++++++++++++-----------
2 files changed, 208 insertions(+), 111 deletions(-)
diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h
index 7d722fb..2e2fcb2 100644
--- a/drivers/scsi/megaraid/megaraid_sas.h
+++ b/drivers/scsi/megaraid/megaraid_sas.h
@@ -1659,6 +1659,7 @@ struct MR_LD_VF_AFFILIATION {
/* Plasma 1.11 FW backward compatibility structures */
#define IOV_111_OFFSET 0x7CE
#define MAX_VIRTUAL_FUNCTIONS 8
+#define MR_LD_ACCESS_HIDDEN 15
struct IOV_111 {
u8 maxVFsSupported;
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index 112799b..b4c032c 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -1825,16 +1825,12 @@ void megasas_do_ocr(struct megasas_instance *instance)
process_fw_state_change_wq(&instance->work_init);
}
-/* This function will get the current SR-IOV LD/VF affiliation */
-static int megasas_get_ld_vf_affiliation(struct megasas_instance *instance,
- int initial)
+static int megasas_get_ld_vf_affiliation_111(struct megasas_instance *instance,
+ int initial)
{
struct megasas_cmd *cmd;
struct megasas_dcmd_frame *dcmd;
- struct MR_LD_VF_AFFILIATION *new_affiliation = NULL;
struct MR_LD_VF_AFFILIATION_111 *new_affiliation_111 = NULL;
- struct MR_LD_VF_MAP *newmap = NULL, *savedmap = NULL;
- dma_addr_t new_affiliation_h;
dma_addr_t new_affiliation_111_h;
int ld, retval = 0;
u8 thisVf;
@@ -1842,15 +1838,15 @@ static int megasas_get_ld_vf_affiliation(struct megasas_instance *instance,
cmd = megasas_get_cmd(instance);
if (!cmd) {
- printk(KERN_DEBUG "megasas: megasas_get_ld_vf_"
- "affiliation: Failed to get cmd for scsi%d.\n",
+ printk(KERN_DEBUG "megasas: megasas_get_ld_vf_affiliation_111:"
+ "Failed to get cmd for scsi%d.\n",
instance->host->host_no);
return -ENOMEM;
}
dcmd = &cmd->frame->dcmd;
- if (!instance->vf_affiliation && !instance->vf_affiliation_111) {
+ if (!instance->vf_affiliation_111) {
printk(KERN_WARNING "megasas: SR-IOV: Couldn't get LD/VF "
"affiliation for scsi%d.\n", instance->host->host_no);
megasas_return_cmd(instance, cmd);
@@ -1858,38 +1854,22 @@ static int megasas_get_ld_vf_affiliation(struct megasas_instance *instance,
}
if (initial)
- if (instance->PlasmaFW111)
memset(instance->vf_affiliation_111, 0,
sizeof(struct MR_LD_VF_AFFILIATION_111));
- else
- memset(instance->vf_affiliation, 0,
- (MAX_LOGICAL_DRIVES + 1) *
- sizeof(struct MR_LD_VF_AFFILIATION));
else {
- if (instance->PlasmaFW111)
- new_affiliation_111 =
- pci_alloc_consistent(instance->pdev,
- sizeof(struct MR_LD_VF_AFFILIATION_111),
- &new_affiliation_111_h);
- else
- new_affiliation =
- pci_alloc_consistent(instance->pdev,
- (MAX_LOGICAL_DRIVES + 1) *
- sizeof(struct MR_LD_VF_AFFILIATION),
- &new_affiliation_h);
- if (!new_affiliation && !new_affiliation_111) {
+ new_affiliation_111 =
+ pci_alloc_consistent(instance->pdev,
+ sizeof(struct MR_LD_VF_AFFILIATION_111),
+ &new_affiliation_111_h);
+ if (!new_affiliation_111) {
printk(KERN_DEBUG "megasas: SR-IOV: Couldn't allocate "
"memory for new affiliation for scsi%d.\n",
- instance->host->host_no);
+ instance->host->host_no);
megasas_return_cmd(instance, cmd);
return -ENOMEM;
}
- if (instance->PlasmaFW111)
- memset(new_affiliation_111, 0,
- sizeof(struct MR_LD_VF_AFFILIATION_111));
- else
- memset(new_affiliation, 0, (MAX_LOGICAL_DRIVES + 1) *
- sizeof(struct MR_LD_VF_AFFILIATION));
+ memset(new_affiliation_111, 0,
+ sizeof(struct MR_LD_VF_AFFILIATION_111));
}
memset(dcmd->mbox.b, 0, MFI_MBOX_SIZE);
@@ -1900,34 +1880,17 @@ static int megasas_get_ld_vf_affiliation(struct megasas_instance *instance,
dcmd->flags = MFI_FRAME_DIR_BOTH;
dcmd->timeout = 0;
dcmd->pad_0 = 0;
- if (instance->PlasmaFW111) {
- dcmd->data_xfer_len = sizeof(struct MR_LD_VF_AFFILIATION_111);
- dcmd->opcode = MR_DCMD_LD_VF_MAP_GET_ALL_LDS_111;
- } else {
- dcmd->data_xfer_len = (MAX_LOGICAL_DRIVES + 1) *
- sizeof(struct MR_LD_VF_AFFILIATION);
- dcmd->opcode = MR_DCMD_LD_VF_MAP_GET_ALL_LDS;
- }
+ dcmd->data_xfer_len = sizeof(struct MR_LD_VF_AFFILIATION_111);
+ dcmd->opcode = MR_DCMD_LD_VF_MAP_GET_ALL_LDS_111;
- if (initial) {
- if (instance->PlasmaFW111)
- dcmd->sgl.sge32[0].phys_addr =
- instance->vf_affiliation_111_h;
- else
- dcmd->sgl.sge32[0].phys_addr =
- instance->vf_affiliation_h;
- } else {
- if (instance->PlasmaFW111)
- dcmd->sgl.sge32[0].phys_addr = new_affiliation_111_h;
- else
- dcmd->sgl.sge32[0].phys_addr = new_affiliation_h;
- }
- if (instance->PlasmaFW111)
- dcmd->sgl.sge32[0].length =
- sizeof(struct MR_LD_VF_AFFILIATION_111);
+ if (initial)
+ dcmd->sgl.sge32[0].phys_addr =
+ instance->vf_affiliation_111_h;
else
- dcmd->sgl.sge32[0].length = (MAX_LOGICAL_DRIVES + 1) *
- sizeof(struct MR_LD_VF_AFFILIATION);
+ dcmd->sgl.sge32[0].phys_addr = new_affiliation_111_h;
+
+ dcmd->sgl.sge32[0].length =
+ sizeof(struct MR_LD_VF_AFFILIATION_111);
printk(KERN_WARNING "megasas: SR-IOV: Getting LD/VF affiliation for "
"scsi%d\n", instance->host->host_no);
@@ -1943,80 +1906,213 @@ static int megasas_get_ld_vf_affiliation(struct megasas_instance *instance,
}
if (!initial) {
- if (instance->PlasmaFW111) {
- if (!new_affiliation_111->vdCount) {
- printk(KERN_WARNING "megasas: SR-IOV: Got new "
- "LD/VF affiliation for passive path "
+ thisVf = new_affiliation_111->thisVf;
+ for (ld = 0 ; ld < new_affiliation_111->vdCount; ld++)
+ if (instance->vf_affiliation_111->map[ld].policy[thisVf] !=
+ new_affiliation_111->map[ld].policy[thisVf]) {
+ printk(KERN_WARNING "megasas: SR-IOV: "
+ "Got new LD/VF affiliation "
"for scsi%d.\n",
- instance->host->host_no);
- retval = 1;
- goto out;
- }
- thisVf = new_affiliation_111->thisVf;
- for (ld = 0 ; ld < new_affiliation_111->vdCount; ld++)
- if (instance->vf_affiliation_111->map[ld].policy[thisVf] != new_affiliation_111->map[ld].policy[thisVf]) {
- printk(KERN_WARNING "megasas: SR-IOV: "
- "Got new LD/VF affiliation "
- "for scsi%d.\n",
- instance->host->host_no);
- memcpy(instance->vf_affiliation_111,
- new_affiliation_111,
- sizeof(struct MR_LD_VF_AFFILIATION_111));
- retval = 1;
- goto out;
- }
- } else {
- if (!new_affiliation->ldCount) {
- printk(KERN_WARNING "megasas: SR-IOV: Got new "
- "LD/VF affiliation for passive "
- "path for scsi%d.\n",
instance->host->host_no);
+ memcpy(instance->vf_affiliation_111,
+ new_affiliation_111,
+ sizeof(struct MR_LD_VF_AFFILIATION_111));
retval = 1;
goto out;
}
- newmap = new_affiliation->map;
- savedmap = instance->vf_affiliation->map;
- thisVf = new_affiliation->thisVf;
- for (ld = 0 ; ld < new_affiliation->ldCount; ld++) {
- if (savedmap->policy[thisVf] !=
- newmap->policy[thisVf]) {
- printk(KERN_WARNING "megasas: SR-IOV: "
- "Got new LD/VF affiliation "
- "for scsi%d.\n",
- instance->host->host_no);
- memcpy(instance->vf_affiliation,
- new_affiliation,
- new_affiliation->size);
- retval = 1;
- goto out;
+ }
+out:
+ if (new_affiliation_111) {
+ pci_free_consistent(instance->pdev,
+ sizeof(struct MR_LD_VF_AFFILIATION_111),
+ new_affiliation_111,
+ new_affiliation_111_h);
+ }
+ megasas_return_cmd(instance, cmd);
+
+ return retval;
+}
+
+static int megasas_get_ld_vf_affiliation_12(struct megasas_instance *instance,
+ int initial)
+{
+ struct megasas_cmd *cmd;
+ struct megasas_dcmd_frame *dcmd;
+ struct MR_LD_VF_AFFILIATION *new_affiliation = NULL;
+ struct MR_LD_VF_MAP *newmap = NULL, *savedmap = NULL;
+ dma_addr_t new_affiliation_h;
+ int i, j, retval = 0, found = 0, doscan = 0;
+ u8 thisVf;
+
+ cmd = megasas_get_cmd(instance);
+
+ if (!cmd) {
+ printk(KERN_DEBUG "megasas: megasas_get_ld_vf_affiliation12: "
+ "Failed to get cmd for scsi%d.\n",
+ instance->host->host_no);
+ return -ENOMEM;
+ }
+
+ dcmd = &cmd->frame->dcmd;
+
+ if (!instance->vf_affiliation) {
+ printk(KERN_WARNING "megasas: SR-IOV: Couldn't get LD/VF "
+ "affiliation for scsi%d.\n", instance->host->host_no);
+ megasas_return_cmd(instance, cmd);
+ return -ENOMEM;
+ }
+
+ if (initial)
+ memset(instance->vf_affiliation, 0, (MAX_LOGICAL_DRIVES + 1) *
+ sizeof(struct MR_LD_VF_AFFILIATION));
+ else {
+ new_affiliation =
+ pci_alloc_consistent(instance->pdev,
+ (MAX_LOGICAL_DRIVES + 1) *
+ sizeof(struct MR_LD_VF_AFFILIATION),
+ &new_affiliation_h);
+ if (!new_affiliation) {
+ printk(KERN_DEBUG "megasas: SR-IOV: Couldn't allocate "
+ "memory for new affiliation for scsi%d.\n",
+ instance->host->host_no);
+ megasas_return_cmd(instance, cmd);
+ return -ENOMEM;
+ }
+ memset(new_affiliation, 0, (MAX_LOGICAL_DRIVES + 1) *
+ sizeof(struct MR_LD_VF_AFFILIATION));
+ }
+
+ memset(dcmd->mbox.b, 0, MFI_MBOX_SIZE);
+
+ dcmd->cmd = MFI_CMD_DCMD;
+ dcmd->cmd_status = 0xFF;
+ dcmd->sge_count = 1;
+ dcmd->flags = MFI_FRAME_DIR_BOTH;
+ dcmd->timeout = 0;
+ dcmd->pad_0 = 0;
+ dcmd->data_xfer_len = (MAX_LOGICAL_DRIVES + 1) *
+ sizeof(struct MR_LD_VF_AFFILIATION);
+ dcmd->opcode = MR_DCMD_LD_VF_MAP_GET_ALL_LDS;
+
+ if (initial)
+ dcmd->sgl.sge32[0].phys_addr = instance->vf_affiliation_h;
+ else
+ dcmd->sgl.sge32[0].phys_addr = new_affiliation_h;
+
+ dcmd->sgl.sge32[0].length = (MAX_LOGICAL_DRIVES + 1) *
+ sizeof(struct MR_LD_VF_AFFILIATION);
+
+ printk(KERN_WARNING "megasas: SR-IOV: Getting LD/VF affiliation for "
+ "scsi%d\n", instance->host->host_no);
+
+ megasas_issue_blocked_cmd(instance, cmd, 0);
+
+ if (dcmd->cmd_status) {
+ printk(KERN_WARNING "megasas: SR-IOV: LD/VF affiliation DCMD"
+ " failed with status 0x%x for scsi%d.\n",
+ dcmd->cmd_status, instance->host->host_no);
+ retval = 1; /* Do a scan if we couldn't get affiliation */
+ goto out;
+ }
+
+ if (!initial) {
+ if (!new_affiliation->ldCount) {
+ printk(KERN_WARNING "megasas: SR-IOV: Got new LD/VF "
+ "affiliation for passive path for scsi%d.\n",
+ instance->host->host_no);
+ retval = 1;
+ goto out;
+ }
+ newmap = new_affiliation->map;
+ savedmap = instance->vf_affiliation->map;
+ thisVf = new_affiliation->thisVf;
+ for (i = 0 ; i < new_affiliation->ldCount; i++) {
+ found = 0;
+ for (j = 0; j < instance->vf_affiliation->ldCount;
+ j++) {
+ if (newmap->ref.targetId ==
+ savedmap->ref.targetId) {
+ found = 1;
+ if (newmap->policy[thisVf] !=
+ savedmap->policy[thisVf]) {
+ doscan = 1;
+ goto out;
+ }
}
savedmap = (struct MR_LD_VF_MAP *)
((unsigned char *)savedmap +
savedmap->size);
+ }
+ if (!found && newmap->policy[thisVf] !=
+ MR_LD_ACCESS_HIDDEN) {
+ doscan = 1;
+ goto out;
+ }
+ newmap = (struct MR_LD_VF_MAP *)
+ ((unsigned char *)newmap + newmap->size);
+ }
+
+ newmap = new_affiliation->map;
+ savedmap = instance->vf_affiliation->map;
+
+ for (i = 0 ; i < instance->vf_affiliation->ldCount; i++) {
+ found = 0;
+ for (j = 0 ; j < new_affiliation->ldCount; j++) {
+ if (savedmap->ref.targetId ==
+ newmap->ref.targetId) {
+ found = 1;
+ if (savedmap->policy[thisVf] !=
+ newmap->policy[thisVf]) {
+ doscan = 1;
+ goto out;
+ }
+ }
newmap = (struct MR_LD_VF_MAP *)
((unsigned char *)newmap +
newmap->size);
}
+ if (!found && savedmap->policy[thisVf] !=
+ MR_LD_ACCESS_HIDDEN) {
+ doscan = 1;
+ goto out;
+ }
+ savedmap = (struct MR_LD_VF_MAP *)
+ ((unsigned char *)savedmap +
+ savedmap->size);
}
}
out:
- if (new_affiliation) {
- if (instance->PlasmaFW111)
- pci_free_consistent(instance->pdev,
- sizeof(struct MR_LD_VF_AFFILIATION_111),
- new_affiliation_111,
- new_affiliation_111_h);
- else
- pci_free_consistent(instance->pdev,
- (MAX_LOGICAL_DRIVES + 1) *
- sizeof(struct MR_LD_VF_AFFILIATION),
- new_affiliation, new_affiliation_h);
+ if (doscan) {
+ printk(KERN_WARNING "megasas: SR-IOV: Got new LD/VF "
+ "affiliation for scsi%d.\n", instance->host->host_no);
+ memcpy(instance->vf_affiliation, new_affiliation,
+ new_affiliation->size);
+ retval = 1;
}
+
+ if (new_affiliation)
+ pci_free_consistent(instance->pdev,
+ (MAX_LOGICAL_DRIVES + 1) *
+ sizeof(struct MR_LD_VF_AFFILIATION),
+ new_affiliation, new_affiliation_h);
megasas_return_cmd(instance, cmd);
return retval;
}
+/* This function will get the current SR-IOV LD/VF affiliation */
+static int megasas_get_ld_vf_affiliation(struct megasas_instance *instance,
+ int initial)
+{
+ int retval;
+
+ if (instance->PlasmaFW111)
+ retval = megasas_get_ld_vf_affiliation_111(instance, initial);
+ else
+ retval = megasas_get_ld_vf_affiliation_12(instance, initial);
+ return retval;
+}
+
/* This function will tell FW to start the SR-IOV heartbeat */
int megasas_sriov_start_heartbeat(struct megasas_instance *instance,
int initial)
--
1.7.11.7
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 4/5] megaraid_sas: Add missing initial call to megasas_get_ld_vf_affiliation().
2014-07-09 22:17 [PATCH 0/5] megaraid_sas: Update for scsi for-next Adam Radford
` (2 preceding siblings ...)
2014-07-09 22:17 ` [PATCH 3/5] megaraid_sas: Fix LD/VF affiliation parsing Adam Radford
@ 2014-07-09 22:17 ` Adam Radford
2014-07-11 9:56 ` Christoph Hellwig
2014-07-09 22:17 ` [PATCH 5/5] megaraid_sas: Version and Changelog update Adam Radford
4 siblings, 1 reply; 8+ messages in thread
From: Adam Radford @ 2014-07-09 22:17 UTC (permalink / raw)
To: linux-scsi, uday.lingala, kashyap.desai, sumit.saxena; +Cc: Adam Radford
The following patch for megaraid_sas adds a missing initial call to
megasas_get_ld_vf_affiliation() at the end of megasas_probe_one().
Signed-off-by: Adam Radford <aradford@gmail.com>
---
drivers/scsi/megaraid/megaraid_sas_base.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index b4c032c..6db5c12 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -4992,6 +4992,10 @@ retry_irq_register:
goto fail_start_aen;
}
+ /* Get current SR-IOV LD/VF affiliation */
+ if (instance->requestorId)
+ megasas_get_ld_vf_affiliation(instance, 1);
+
return 0;
fail_start_aen:
--
1.7.11.7
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 5/5] megaraid_sas: Version and Changelog update
2014-07-09 22:17 [PATCH 0/5] megaraid_sas: Update for scsi for-next Adam Radford
` (3 preceding siblings ...)
2014-07-09 22:17 ` [PATCH 4/5] megaraid_sas: Add missing initial call to megasas_get_ld_vf_affiliation() Adam Radford
@ 2014-07-09 22:17 ` Adam Radford
4 siblings, 0 replies; 8+ messages in thread
From: Adam Radford @ 2014-07-09 22:17 UTC (permalink / raw)
To: linux-scsi, uday.lingala, kashyap.desai, sumit.saxena; +Cc: Adam Radford
The following patch for megaraid_sas updates the driver version and
Documentation/scsi/ChangeLog.megaraid_sas.
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Adam Radford <aradford@gmail.com>
---
Documentation/scsi/ChangeLog.megaraid_sas | 14 ++++++++++++++
drivers/scsi/megaraid/megaraid_sas.h | 6 +++---
drivers/scsi/megaraid/megaraid_sas_base.c | 2 +-
3 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/Documentation/scsi/ChangeLog.megaraid_sas b/Documentation/scsi/ChangeLog.megaraid_sas
index 91ba58e..18b5709 100644
--- a/Documentation/scsi/ChangeLog.megaraid_sas
+++ b/Documentation/scsi/ChangeLog.megaraid_sas
@@ -1,3 +1,17 @@
+Release Date : Thu. Jun 19, 2014 17:00:00 PST 2014 -
+ (emaild-id:megaraidlinux@lsi.com)
+ Adam Radford
+ Kashyap Desai
+ Sumit Saxena
+ Uday Lingala
+Current Version : 06.803.02.00-rc1
+Old Version : 06.803.01.00-rc1
+ 1. Fix reset_mutex leak in megasas_reset_fusion().
+ 2. Remove unused variables in megasas_instance.
+ 3. Fix LD/VF affiliation parsing.
+ 4. Add missing initial call to megasas_get_ld_vf_affiliation().
+ 5. Version and Changelog update.
+-------------------------------------------------------------------------------
Release Date : Mon. Mar 10, 2014 17:00:00 PST 2014 -
(emaild-id:megaraidlinux@lsi.com)
Adam Radford
diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h
index 2e2fcb2..bc7adcf 100644
--- a/drivers/scsi/megaraid/megaraid_sas.h
+++ b/drivers/scsi/megaraid/megaraid_sas.h
@@ -33,9 +33,9 @@
/*
* MegaRAID SAS Driver meta data
*/
-#define MEGASAS_VERSION "06.803.01.00-rc1"
-#define MEGASAS_RELDATE "Mar. 10, 2014"
-#define MEGASAS_EXT_VERSION "Mon. Mar. 10 17:00:00 PDT 2014"
+#define MEGASAS_VERSION "06.803.02.00-rc1"
+#define MEGASAS_RELDATE "Jun. 19, 2014"
+#define MEGASAS_EXT_VERSION "Thu. Jun. 19 17:00:00 PDT 2014"
/*
* Device IDs
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index 6db5c12..a2263fd 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -18,7 +18,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* FILE: megaraid_sas_base.c
- * Version : 06.803.01.00-rc1
+ * Version : 06.803.02.00-rc1
*
* Authors: LSI Corporation
* Sreenivas Bagalkote
--
1.7.11.7
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 3/5] megaraid_sas: Fix LD/VF affiliation parsing
2014-07-09 22:17 ` [PATCH 3/5] megaraid_sas: Fix LD/VF affiliation parsing Adam Radford
@ 2014-07-11 9:55 ` Christoph Hellwig
0 siblings, 0 replies; 8+ messages in thread
From: Christoph Hellwig @ 2014-07-11 9:55 UTC (permalink / raw)
To: Adam Radford; +Cc: linux-scsi, uday.lingala, kashyap.desai, sumit.saxena
On Wed, Jul 09, 2014 at 03:17:56PM -0700, Adam Radford wrote:
> The following patch for megaraid_sas fixes the LD/VF affiliation policy parsing
> code to account for LD targetId's and Hidden LD's (not yet affiliated with any
> Virtual Functions). This also breaks megasas_get_ld_vf_affiliation() into 2
> separate functions: megasas_get_ld_vf_affiliation_111() and
> megasas_get_ld_Vf_affiliation_12() to reduce indentation levels.
>
> Signed-off-by: Adam Radford <aradford@gmail.com>
> ---
> drivers/scsi/megaraid/megaraid_sas.h | 1 +
> drivers/scsi/megaraid/megaraid_sas_base.c | 318 +++++++++++++++++++-----------
> 2 files changed, 208 insertions(+), 111 deletions(-)
>
> diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h
> index 7d722fb..2e2fcb2 100644
> --- a/drivers/scsi/megaraid/megaraid_sas.h
> +++ b/drivers/scsi/megaraid/megaraid_sas.h
> @@ -1659,6 +1659,7 @@ struct MR_LD_VF_AFFILIATION {
> /* Plasma 1.11 FW backward compatibility structures */
> #define IOV_111_OFFSET 0x7CE
> #define MAX_VIRTUAL_FUNCTIONS 8
> +#define MR_LD_ACCESS_HIDDEN 15
>
> struct IOV_111 {
> u8 maxVFsSupported;
> diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
> index 112799b..b4c032c 100644
> --- a/drivers/scsi/megaraid/megaraid_sas_base.c
> +++ b/drivers/scsi/megaraid/megaraid_sas_base.c
> @@ -1825,16 +1825,12 @@ void megasas_do_ocr(struct megasas_instance *instance)
> process_fw_state_change_wq(&instance->work_init);
> }
>
> -/* This function will get the current SR-IOV LD/VF affiliation */
> -static int megasas_get_ld_vf_affiliation(struct megasas_instance *instance,
> - int initial)
> +static int megasas_get_ld_vf_affiliation_111(struct megasas_instance *instance,
> + int initial)
> {
> struct megasas_cmd *cmd;
> struct megasas_dcmd_frame *dcmd;
> - struct MR_LD_VF_AFFILIATION *new_affiliation = NULL;
> struct MR_LD_VF_AFFILIATION_111 *new_affiliation_111 = NULL;
> - struct MR_LD_VF_MAP *newmap = NULL, *savedmap = NULL;
> - dma_addr_t new_affiliation_h;
> dma_addr_t new_affiliation_111_h;
> int ld, retval = 0;
> u8 thisVf;
> @@ -1842,15 +1838,15 @@ static int megasas_get_ld_vf_affiliation(struct megasas_instance *instance,
> cmd = megasas_get_cmd(instance);
>
> if (!cmd) {
> - printk(KERN_DEBUG "megasas: megasas_get_ld_vf_"
> - "affiliation: Failed to get cmd for scsi%d.\n",
> + printk(KERN_DEBUG "megasas: megasas_get_ld_vf_affiliation_111:"
You'd make your life easier if you just used __func__ to print the
function name.
I also think the initial variant should have their own set of functions,
but I'm not going to held this series over over these bits:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 4/5] megaraid_sas: Add missing initial call to megasas_get_ld_vf_affiliation().
2014-07-09 22:17 ` [PATCH 4/5] megaraid_sas: Add missing initial call to megasas_get_ld_vf_affiliation() Adam Radford
@ 2014-07-11 9:56 ` Christoph Hellwig
0 siblings, 0 replies; 8+ messages in thread
From: Christoph Hellwig @ 2014-07-11 9:56 UTC (permalink / raw)
To: Adam Radford; +Cc: linux-scsi, uday.lingala, kashyap.desai, sumit.saxena
On Wed, Jul 09, 2014 at 03:17:57PM -0700, Adam Radford wrote:
> The following patch for megaraid_sas adds a missing initial call to
> megasas_get_ld_vf_affiliation() at the end of megasas_probe_one().
>
> Signed-off-by: Adam Radford <aradford@gmail.com>
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-07-11 9:56 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-09 22:17 [PATCH 0/5] megaraid_sas: Update for scsi for-next Adam Radford
2014-07-09 22:17 ` [PATCH 1/5] megaraid_sas: Fix reset_mutex leak Adam Radford
2014-07-09 22:17 ` [PATCH 2/5] megaraid_sas: Remove unused variables in megasas_instance Adam Radford
2014-07-09 22:17 ` [PATCH 3/5] megaraid_sas: Fix LD/VF affiliation parsing Adam Radford
2014-07-11 9:55 ` Christoph Hellwig
2014-07-09 22:17 ` [PATCH 4/5] megaraid_sas: Add missing initial call to megasas_get_ld_vf_affiliation() Adam Radford
2014-07-11 9:56 ` Christoph Hellwig
2014-07-09 22:17 ` [PATCH 5/5] megaraid_sas: Version and Changelog update Adam Radford
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox