Skip to content

Commit 7295493

Browse files
vauradkarmartinkpetersen
authored andcommitted
scsi: pm80xx: Tie the interrupt name to the module instance
With MSI-x enabled, the interrupt instances are <prefix><index> where the prefix is fixed for all module instances, making it a little harder to track down what's what. Link: https://lore.kernel.org/r/[email protected] Acked-by: Jack Wang <[email protected]> Signed-off-by: Vikram Auradkar <[email protected]> Signed-off-by: Deepak Ukey <[email protected]> Signed-off-by: Viswas G <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent e2773c6 commit 7295493

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

drivers/scsi/pm8001/pm8001_init.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,6 @@ static u32 pm8001_setup_msix(struct pm8001_hba_info *pm8001_ha)
894894
u32 number_of_intr;
895895
int flag = 0;
896896
int rc;
897-
static char intr_drvname[PM8001_MAX_MSIX_VEC][sizeof(DRV_NAME)+3];
898897

899898
/* SPCv controllers supports 64 msi-x */
900899
if (pm8001_ha->chip_id == chip_8001) {
@@ -915,14 +914,16 @@ static u32 pm8001_setup_msix(struct pm8001_hba_info *pm8001_ha)
915914
rc, pm8001_ha->number_of_intr));
916915

917916
for (i = 0; i < number_of_intr; i++) {
918-
snprintf(intr_drvname[i], sizeof(intr_drvname[0]),
919-
DRV_NAME"%d", i);
917+
snprintf(pm8001_ha->intr_drvname[i],
918+
sizeof(pm8001_ha->intr_drvname[0]),
919+
"%s-%d", pm8001_ha->name, i);
920920
pm8001_ha->irq_vector[i].irq_id = i;
921921
pm8001_ha->irq_vector[i].drv_inst = pm8001_ha;
922922

923923
rc = request_irq(pci_irq_vector(pm8001_ha->pdev, i),
924924
pm8001_interrupt_handler_msix, flag,
925-
intr_drvname[i], &(pm8001_ha->irq_vector[i]));
925+
pm8001_ha->intr_drvname[i],
926+
&(pm8001_ha->irq_vector[i]));
926927
if (rc) {
927928
for (j = 0; j < i; j++) {
928929
free_irq(pci_irq_vector(pm8001_ha->pdev, i),
@@ -963,7 +964,7 @@ static u32 pm8001_request_irq(struct pm8001_hba_info *pm8001_ha)
963964
pm8001_ha->irq_vector[0].irq_id = 0;
964965
pm8001_ha->irq_vector[0].drv_inst = pm8001_ha;
965966
rc = request_irq(pdev->irq, pm8001_interrupt_handler_intx, IRQF_SHARED,
966-
DRV_NAME, SHOST_TO_SAS_HA(pm8001_ha->shost));
967+
pm8001_ha->name, SHOST_TO_SAS_HA(pm8001_ha->shost));
967968
return rc;
968969
}
969970

drivers/scsi/pm8001/pm8001_sas.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,8 @@ struct pm8001_hba_info {
541541
struct pm8001_ccb_info *ccb_info;
542542
#ifdef PM8001_USE_MSIX
543543
int number_of_intr;/*will be used in remove()*/
544+
char intr_drvname[PM8001_MAX_MSIX_VEC]
545+
[PM8001_NAME_LENGTH+1+3+1];
544546
#endif
545547
#ifdef PM8001_USE_TASKLET
546548
struct tasklet_struct tasklet[PM8001_MAX_MSIX_VEC];

0 commit comments

Comments
 (0)