scsi: SCSI_ISCI needs to select SCSI_SAS_HOST_SMP, fixes build error
Subsystems (2)
PATCH 1/1 scsi: SCSI_ISCI needs to select SCSI_SAS_HOST_SMP, fixes build error
From: Randy Dunlap <[email protected]>
SCSI_ISCI needs to select SCSI_SAS_HOST_SMP to ensure that all needed symbols are available to it.
Fixes this build error:
ERROR: "try_test_sas_gpio_gp_bit" [drivers/scsi/isci/isci.ko] undefined!
--- drivers/scsi/Kconfig | 1 + 1 file changed, 1 insertion(+)
Found in linux-next, but also applies to mainline.
drivers/scsi/Kconfig +1 -0
@@ -847,6 +847,7 @@ config SCSI_ISCI # (temporary): known alpha quality driver depends on EXPERIMENTAL select SCSI_SAS_LIBSAS + select SCSI_SAS_HOST_SMP ---help--- This driver supports the 6Gb/s SAS capabilities of the storage control unit found in the Intel(R) C600 series chipset.
Quoted 9 lines · Randy Dunlap
From: Randy Dunlap <[email protected]>
SCSI_ISCIneeds to selectSCSI_SAS_HOST_SMPto ensure that all needed symbols are available to it.Fixes this build error:
ERROR: "try_test_sas_gpio_gp_bit" [drivers/scsi/isci/isci.ko] undefined!Signed-off-by Randy Dunlap <[email protected]>
Thanks Randy!
Here's a replacement patch (also attached), that just stubs out that routine in the !SCSI_SAS_HOST_SMP case.
Quoted 1 line
From
645ea60066251c2728197bf7a1048d885626936fMon Sep 17 00:00:00 2001
From: Dan Williams <[email protected]>
Date: Fri, 23 Sep 2011 16:28:53 -0700
Subject: [PATCH] libsas: fix try_test_sas_gpio_gp_bit() build error
If the user has disabled CONFIG_SCSI_SAS_HOST_SMP then libsas drivers will not be receiving smp-gpio frames and do not need this lookup code.
--- include/scsi/libsas.h | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
include/scsi/libsas.h +0 -0
@@ -407,7 +407,14 @@ static inline unsigned int to_sas_gpio_od(int
device, int bit)
return 3 * device + bit;
}
+#ifdef CONFIG_SCSI_SAS_HOST_SMP
int try_test_sas_gpio_gp_bit(unsigned int od, u8 *data, u8 index, u8 count);
+#else
+static inline int try_test_sas_gpio_gp_bit(unsigned int od, u8 *data, u8 index, u8 count)
+{
+ return -1;
+}
+#endif
/* ---------- Tasks ---------- */
/*
Signature · 1 line
1.7.6
From 645ea60066251c2728197bf7a1048d885626936f Mon Sep 17 00:00:00 2001
From: Dan Williams <[email protected]>
Date: Fri, 23 Sep 2011 16:28:53 -0700
Subject: [PATCH] libsas: fix try_test_sas_gpio_gp_bit() build error
If the user has disabled CONFIG_SCSI_SAS_HOST_SMP then libsas drivers will not be receiving smp-gpio frames and do not need this lookup code.
--- include/scsi/libsas.h | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
include/scsi/libsas.h +7 -0
@@ -407,7 +407,14 @@ static inline unsigned int to_sas_gpio_od(int device, int bit)return 3 * device + bit; } +#ifdef CONFIG_SCSI_SAS_HOST_SMP int try_test_sas_gpio_gp_bit (unsigned int od,u8 *data,u8 index,u8 count); +#else +static inline int try_test_sas_gpio_gp_bit (unsigned int od,u8 *data,u8 index,u8 count) +{ +return -1 ; +} +#endif /* ---------- Tasks ---------- */ /*
Signature · 1 line
1.7.6
Randy Dunlap
Acked-byQuoted 9 lines · Dan Williams
Quoted 8 lines · Randy Dunlap
From: Randy Dunlap <[email protected]>
SCSI_ISCIneeds to selectSCSI_SAS_HOST_SMPto ensure that all needed symbols are available to it.Fixes this build error:
ERROR: "try_test_sas_gpio_gp_bit" [drivers/scsi/isci/isci.ko] undefined!
Quoted 6 lines
Quoted 1 line
Signed-off-by Randy Dunlap <[email protected]>Thanks Randy!
Here's a replacement patch (also attached), that just stubs out that routine in the !SCSI_SAS_HOST_SMP case.
Yes, that works too.
Thanks.
Quoted 35 lines
From
645ea60066251c2728197bf7a1048d885626936fMon Sep 17 00:00:00 2001
From: Dan Williams <[email protected]>
Date: Fri, 23 Sep 2011 16:28:53 -0700
Subject: [PATCH] libsas: fixtry_test_sas_gpio_gp_bit()build errorIf the user has disabled
CONFIG_SCSI_SAS_HOST_SMPthen libsas drivers will not be receiving smp-gpio frames and do not need this lookup code.Reported-by Randy Dunlap <[email protected]>Signed-off-by Dan Williams <[email protected]>--- include/scsi/libsas.h | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)include/scsi/libsas.h +7
-0@@ -407,7 +407,14 @@ static inline unsigned int to_sas_gpio_od(int device, int bit)return 3 * device + bit; } +#ifdef CONFIG_SCSI_SAS_HOST_SMP int try_test_sas_gpio_gp_bit (unsigned int od,u8 *data,u8 index,u8 count); +#else +static inline int try_test_sas_gpio_gp_bit (unsigned int od,u8 *data,u8 index,u8 count) +{ +return -1 ; +} +#endif /* ---------- Tasks ---------- */
/*
Signature · 2 lines
~Randy *** Remember to use Documentation/SubmitChecklist when testing your code ***