* [PATCH v2] megaraid_sas: unique names for MSIx vectors
@ 2019-10-07 5:18 Chandrakanth Patil
2019-10-10 3:28 ` Martin K. Petersen
0 siblings, 1 reply; 2+ messages in thread
From: Chandrakanth Patil @ 2019-10-07 5:18 UTC (permalink / raw)
To: linux-scsi
Cc: kashyap.desai, sumit.saxena, shivasharan.srikanteshwara,
anand.lodnoor, kiran-kumar.kasturi, sankar.patra, sasikumar.pc,
Chandrakanth Patil
Currently, MSIx vectors name appears in /proc/interrupts is "megasas"
which is same for all the vectors. This patch provides the unique
name to all megaraid_sas controllers and its associated MSIx interrupts.
Suggested-by: Konstantin Shalygin <k0ste@k0ste.ru>
Signed-off-by: Sumit Saxena <sumit.saxena@broadcom.com>
Signed-off-by: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
v2:
- MEGASAS_MSIX_NAME_LEN macro changed from 16 to 32.
- Format spectifier for scsi host_no changed from %d to %u.
---
drivers/scsi/megaraid/megaraid_sas.h | 3 +++
drivers/scsi/megaraid/megaraid_sas_base.c | 8 ++++++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h
index a6e788c..bd81840 100644
--- a/drivers/scsi/megaraid/megaraid_sas.h
+++ b/drivers/scsi/megaraid/megaraid_sas.h
@@ -24,6 +24,8 @@
#define MEGASAS_VERSION "07.710.50.00-rc1"
#define MEGASAS_RELDATE "June 28, 2019"
+#define MEGASAS_MSIX_NAME_LEN 32
+
/*
* Device IDs
*/
@@ -2203,6 +2205,7 @@ struct megasas_aen_event {
};
struct megasas_irq_context {
+ char name[MEGASAS_MSIX_NAME_LEN];
struct megasas_instance *instance;
u32 MSIxIndex;
u32 os_irq;
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index 42cf38c..713d04e 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -5546,9 +5546,11 @@ megasas_setup_irqs_ioapic(struct megasas_instance *instance)
pdev = instance->pdev;
instance->irq_context[0].instance = instance;
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),
instance->instancet->service_isr, IRQF_SHARED,
- "megasas", &instance->irq_context[0])) {
+ instance->irq_context->name, &instance->irq_context[0])) {
dev_err(&instance->pdev->dev,
"Failed to register IRQ from %s %d\n",
__func__, __LINE__);
@@ -5580,8 +5582,10 @@ megasas_setup_irqs_msix(struct megasas_instance *instance, u8 is_probe)
for (i = 0; i < instance->msix_vectors; i++) {
instance->irq_context[i].instance = instance;
instance->irq_context[i].MSIxIndex = i;
+ snprintf(instance->irq_context[i].name, MEGASAS_MSIX_NAME_LEN, "%s%u-msix%d",
+ "megasas", instance->host->host_no, 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])) {
dev_err(&instance->pdev->dev,
"Failed to register IRQ for vector %d.\n", i);
--
2.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] megaraid_sas: unique names for MSIx vectors
2019-10-07 5:18 [PATCH v2] megaraid_sas: unique names for MSIx vectors Chandrakanth Patil
@ 2019-10-10 3:28 ` Martin K. Petersen
0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2019-10-10 3:28 UTC (permalink / raw)
To: Chandrakanth Patil
Cc: linux-scsi, kashyap.desai, sumit.saxena,
shivasharan.srikanteshwara, anand.lodnoor, kiran-kumar.kasturi,
sankar.patra, sasikumar.pc
Chandrakanth,
> Currently, MSIx vectors name appears in /proc/interrupts is "megasas"
> which is same for all the vectors. This patch provides the unique
> name to all megaraid_sas controllers and its associated MSIx interrupts.
>
> Suggested-by: Konstantin Shalygin <k0ste@k0ste.ru>
> Signed-off-by: Sumit Saxena <sumit.saxena@broadcom.com>
> Signed-off-by: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
Next time, please make sure you put a "---" separator before the patch
changelog.
> v2:
[...]
Applied to 5.5/scsi-queue, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-10 3:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-07 5:18 [PATCH v2] megaraid_sas: unique names for MSIx vectors Chandrakanth Patil
2019-10-10 3:28 ` 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).