Skip to contentSkip to conversation

scsi: SCSI_ISCI needs to select SCSI_SAS_HOST_SMP, fixes build error

PATCH In review Randy Dunlap 2 participants 3 messages Sep 23, 2011 – Sep 24, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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.
#1 lore raw
Quoted 9 lines · Randy Dunlap

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!

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 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 +0 -0
index 44f5634..0d78bfa 100644
@@ -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
index 44f5634..0d78bfa 100644
@@ -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
author Acked-by
#2 lore raw
Quoted 9 lines · Dan Williams
Quoted 8 lines · Randy Dunlap

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!

Quoted 6 lines
Quoted 1 line

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 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
index 44f5634..0d78bfa 100644
@@ -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 ***