mirror of https://gitee.com/openkylin/linux.git
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.com 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> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
390e280878
commit
ff7ca7fd03
|
@ -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;
|
||||
|
|
|
@ -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%u",
|
||||
"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);
|
||||
|
|
Loading…
Reference in New Issue