aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/scsi/pm8001/pm8001_sas.h
diff options
context:
space:
mode:
authorDamien Le Moal <dlemoal@kernel.org>2023-09-12 08:27:43 +0900
committerMartin K. Petersen <martin.petersen@oracle.com>2023-09-21 21:39:46 -0400
commitefa1fca45082c75061a53fa58ca69468f407291c (patch)
tree72594efc8744fc631c3ef13677a3149cf5386308 /drivers/scsi/pm8001/pm8001_sas.h
parentscsi: pm8001: Remove pm80xx_chip_intx_interrupt_enable/disable() (diff)
downloadwireguard-linux-efa1fca45082c75061a53fa58ca69468f407291c.tar.xz
wireguard-linux-efa1fca45082c75061a53fa58ca69468f407291c.zip
scsi: pm8001: Remove PM8001_USE_MSIX
The pm8001 driver does not compile if PM8001_USE_MSIX is not defined in pm8001_sas.h because various fields and functions conditionally defined are used unconditionally without a "#ifdef PM8001_USE_MSIX" protection. This macro is rather useless anyway and not convenient as diabling MSI-X use requires recompiling the driver. Remove this macro and replace it with the bool module parameter "use_msix" which defaults to true. The use of MSI-X interrupts for an adapter is gated by this module parameter for adapters that actually support MSI-X. The "use_msix" boolean field is added to struct pm8001_hba_info and all code defined depending on PM8001_USE_MSIX is modified to rely on pm8001_hba_info->use_msix instead. Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Link: https://lore.kernel.org/r/20230911232745.325149-9-dlemoal@kernel.org Acked-by: Jack Wang <jinpu.wang@ionos.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/pm8001/pm8001_sas.h')
-rw-r--r--drivers/scsi/pm8001/pm8001_sas.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/scsi/pm8001/pm8001_sas.h b/drivers/scsi/pm8001/pm8001_sas.h
index 2fadd353f1c1..612856b09187 100644
--- a/drivers/scsi/pm8001/pm8001_sas.h
+++ b/drivers/scsi/pm8001/pm8001_sas.h
@@ -83,8 +83,9 @@ do { \
pm8001_info(HBA, fmt, ##__VA_ARGS__); \
} while (0)
+extern bool pm8001_use_msix;
+
#define PM8001_USE_TASKLET
-#define PM8001_USE_MSIX
#define PM8001_READ_VPD
@@ -520,11 +521,11 @@ struct pm8001_hba_info {
struct pm8001_device *devices;
struct pm8001_ccb_info *ccb_info;
u32 ccb_count;
-#ifdef PM8001_USE_MSIX
+
+ bool 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];
#endif