All of lore.kernel.org
 help / color / mirror / Atom feed
From: Deepak Ukey <deepak.ukey@microchip.com>
To: <linux-scsi@vger.kernel.org>
Cc: <Vasanthalakshmi.Tharmarajan@microchip.com>,
	<Viswas.G@microchip.com>, <deepak.ukey@microchip.com>,
	<jinpu.wang@profitbricks.com>, <martin.petersen@oracle.com>,
	<dpf@google.com>, <jsperbeck@google.com>, <auradkar@google.com>,
	<ianyar@google.com>
Subject: [PATCH V2 12/13] pm80xx : Tie the interrupt name to the module instance.
Date: Thu, 14 Nov 2019 15:39:09 +0530	[thread overview]
Message-ID: <20191114100910.6153-13-deepak.ukey@microchip.com> (raw)
In-Reply-To: <20191114100910.6153-1-deepak.ukey@microchip.com>

From: Vikram Auradkar <auradkar@google.com>

With msix 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.

Signed-off-by: Vikram Auradkar <auradkar@google.com>
Signed-off-by: Deepak Ukey <deepak.ukey@microchip.com>
Signed-off-by: Viswas G <Viswas.G@microchip.com>
Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com>
---
 drivers/scsi/pm8001/pm8001_init.c | 11 ++++++-----
 drivers/scsi/pm8001/pm8001_sas.h  |  2 ++
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c
index 86b619d10392..485f0afc53f9 100644
--- a/drivers/scsi/pm8001/pm8001_init.c
+++ b/drivers/scsi/pm8001/pm8001_init.c
@@ -894,7 +894,6 @@ static u32 pm8001_setup_msix(struct pm8001_hba_info *pm8001_ha)
 	u32 number_of_intr;
 	int flag = 0;
 	int rc;
-	static char intr_drvname[PM8001_MAX_MSIX_VEC][sizeof(DRV_NAME)+3];
 
 	/* SPCv controllers supports 64 msi-x */
 	if (pm8001_ha->chip_id == chip_8001) {
@@ -915,14 +914,16 @@ static u32 pm8001_setup_msix(struct pm8001_hba_info *pm8001_ha)
 				rc, pm8001_ha->number_of_intr));
 
 	for (i = 0; i < number_of_intr; i++) {
-		snprintf(intr_drvname[i], sizeof(intr_drvname[0]),
-				DRV_NAME"%d", i);
+		snprintf(pm8001_ha->intr_drvname[i],
+			sizeof(pm8001_ha->intr_drvname[0]),
+			"%s-%d", pm8001_ha->name, i);
 		pm8001_ha->irq_vector[i].irq_id = i;
 		pm8001_ha->irq_vector[i].drv_inst = pm8001_ha;
 
 		rc = request_irq(pci_irq_vector(pm8001_ha->pdev, i),
 			pm8001_interrupt_handler_msix, flag,
-			intr_drvname[i], &(pm8001_ha->irq_vector[i]));
+			pm8001_ha->intr_drvname[i],
+			&(pm8001_ha->irq_vector[i]));
 		if (rc) {
 			for (j = 0; j < i; j++) {
 				free_irq(pci_irq_vector(pm8001_ha->pdev, i),
@@ -963,7 +964,7 @@ static u32 pm8001_request_irq(struct pm8001_hba_info *pm8001_ha)
 	pm8001_ha->irq_vector[0].irq_id = 0;
 	pm8001_ha->irq_vector[0].drv_inst = pm8001_ha;
 	rc = request_irq(pdev->irq, pm8001_interrupt_handler_intx, IRQF_SHARED,
-		DRV_NAME, SHOST_TO_SAS_HA(pm8001_ha->shost));
+		pm8001_ha->name, SHOST_TO_SAS_HA(pm8001_ha->shost));
 	return rc;
 }
 
diff --git a/drivers/scsi/pm8001/pm8001_sas.h b/drivers/scsi/pm8001/pm8001_sas.h
index f7be7b85624e..a55b03bca529 100644
--- a/drivers/scsi/pm8001/pm8001_sas.h
+++ b/drivers/scsi/pm8001/pm8001_sas.h
@@ -541,6 +541,8 @@ struct pm8001_hba_info {
 	struct pm8001_ccb_info	*ccb_info;
 #ifdef PM8001_USE_MSIX
 	int			number_of_intr;/*will be used in remove()*/
+	char			intr_drvname[PM8001_MAX_MSIX_VEC]
+				[PM8001_NAME_LENGTH+1+3+1];
 #endif
 #ifdef PM8001_USE_TASKLET
 	struct tasklet_struct	tasklet[PM8001_MAX_MSIX_VEC];
-- 
2.16.3


  parent reply	other threads:[~2019-11-14 10:08 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-14 10:08 [PATCH V2 00/13] pm80xx : Updates for the driver version 0.1.39 Deepak Ukey
2019-11-14 10:08 ` [PATCH V2 01/13] pm80xx : Fix for SATA device discovery Deepak Ukey
2019-11-18  9:00   ` Jinpu Wang
2019-11-14 10:08 ` [PATCH V2 02/13] pm80xx : Make phy enable completion as NULL Deepak Ukey
2019-11-18  9:01   ` Jinpu Wang
2019-11-14 10:09 ` [PATCH V2 03/13] pm80xx : Initialize variable used as return status Deepak Ukey
2019-11-14 10:09 ` [PATCH V2 04/13] pm80xx : Convert 'long' mdelay to msleep Deepak Ukey
2019-11-14 10:09 ` [PATCH V2 05/13] pm80xx : Squashed logging cleanup changes Deepak Ukey
2019-11-14 10:09 ` [PATCH V2 06/13] pm80xx : Increase timeout for pm80xx mpi_uninit_check Deepak Ukey
2019-11-14 10:09 ` [PATCH V2 07/13] pm80xx : Fix dereferencing dangling pointer Deepak Ukey
2019-11-14 10:09 ` [PATCH V2 08/13] pm80xx : Fix command issue sizing Deepak Ukey
2019-11-14 10:09 ` [PATCH V2 09/13] pm80xx : Cleanup command when a reset times out Deepak Ukey
2019-11-18  9:41   ` Jinpu Wang
2019-11-14 10:09 ` [PATCH V2 10/13] pm80xx : Do not request 12G sas speeds Deepak Ukey
2019-11-14 10:41   ` John Garry
2019-11-14 10:09 ` [PATCH V2 11/13] pm80xx : Controller fatal error through sysfs Deepak Ukey
2019-11-18  9:42   ` Jinpu Wang
2019-11-14 10:09 ` Deepak Ukey [this message]
2019-11-14 10:09 ` [PATCH V2 13/13] pm80xx : Modified the logic to collect fatal dump Deepak Ukey
2019-11-18  9:43   ` Jinpu Wang
2019-11-19  4:29 ` [PATCH V2 00/13] pm80xx : Updates for the driver version 0.1.39 Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191114100910.6153-13-deepak.ukey@microchip.com \
    --to=deepak.ukey@microchip.com \
    --cc=Vasanthalakshmi.Tharmarajan@microchip.com \
    --cc=Viswas.G@microchip.com \
    --cc=auradkar@google.com \
    --cc=dpf@google.com \
    --cc=ianyar@google.com \
    --cc=jinpu.wang@profitbricks.com \
    --cc=jsperbeck@google.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.