Commit ff7ca7fd authored by Chandrakanth Patil's avatar Chandrakanth Patil Committed by Martin K. Petersen

scsi: megaraid_sas: Unique names for MSI-X vectors

Currently, MSI-X vectors name appears in /proc/interrupts is "megasas"
which is same for all the vectors. This patch provides a unique name for
all megaraid_sas controllers and their associated MSI-X interrupts.

Link: https://lore.kernel.org/r/20191007051828.12294-1-chandrakanth.patil@broadcom.comSuggested-by: default avatarKonstantin Shalygin <k0ste@k0ste.ru>
Signed-off-by: default avatarSumit Saxena <sumit.saxena@broadcom.com>
Signed-off-by: default avatarChandrakanth Patil <chandrakanth.patil@broadcom.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 390e2808
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
#define MEGASAS_VERSION "07.710.50.00-rc1" #define MEGASAS_VERSION "07.710.50.00-rc1"
#define MEGASAS_RELDATE "June 28, 2019" #define MEGASAS_RELDATE "June 28, 2019"
#define MEGASAS_MSIX_NAME_LEN 32
/* /*
* Device IDs * Device IDs
*/ */
...@@ -2203,6 +2205,7 @@ struct megasas_aen_event { ...@@ -2203,6 +2205,7 @@ struct megasas_aen_event {
}; };
struct megasas_irq_context { struct megasas_irq_context {
char name[MEGASAS_MSIX_NAME_LEN];
struct megasas_instance *instance; struct megasas_instance *instance;
u32 MSIxIndex; u32 MSIxIndex;
u32 os_irq; u32 os_irq;
......
...@@ -5546,9 +5546,11 @@ megasas_setup_irqs_ioapic(struct megasas_instance *instance) ...@@ -5546,9 +5546,11 @@ megasas_setup_irqs_ioapic(struct megasas_instance *instance)
pdev = instance->pdev; pdev = instance->pdev;
instance->irq_context[0].instance = instance; instance->irq_context[0].instance = instance;
instance->irq_context[0].MSIxIndex = 0; instance->irq_context[0].MSIxIndex = 0;
snprintf(instance->irq_context->name, MEGASAS_MSIX_NAME_LEN, "%s%u",
"megasas", instance->host->host_no);
if (request_irq(pci_irq_vector(pdev, 0), if (request_irq(pci_irq_vector(pdev, 0),
instance->instancet->service_isr, IRQF_SHARED, instance->instancet->service_isr, IRQF_SHARED,
"megasas", &instance->irq_context[0])) { instance->irq_context->name, &instance->irq_context[0])) {
dev_err(&instance->pdev->dev, dev_err(&instance->pdev->dev,
"Failed to register IRQ from %s %d\n", "Failed to register IRQ from %s %d\n",
__func__, __LINE__); __func__, __LINE__);
...@@ -5580,8 +5582,10 @@ megasas_setup_irqs_msix(struct megasas_instance *instance, u8 is_probe) ...@@ -5580,8 +5582,10 @@ megasas_setup_irqs_msix(struct megasas_instance *instance, u8 is_probe)
for (i = 0; i < instance->msix_vectors; i++) { for (i = 0; i < instance->msix_vectors; i++) {
instance->irq_context[i].instance = instance; instance->irq_context[i].instance = instance;
instance->irq_context[i].MSIxIndex = i; instance->irq_context[i].MSIxIndex = i;
snprintf(instance->irq_context[i].name, MEGASAS_MSIX_NAME_LEN, "%s%u-msix%u",
"megasas", instance->host->host_no, i);
if (request_irq(pci_irq_vector(pdev, i), if (request_irq(pci_irq_vector(pdev, i),
instance->instancet->service_isr, 0, "megasas", instance->instancet->service_isr, 0, instance->irq_context[i].name,
&instance->irq_context[i])) { &instance->irq_context[i])) {
dev_err(&instance->pdev->dev, dev_err(&instance->pdev->dev,
"Failed to register IRQ for vector %d.\n", i); "Failed to register IRQ for vector %d.\n", i);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment