Skip to contentSkip to conversation

scsi: fix bnx2i build errors

PATCH In review Randy Dunlap 2 participants 5 messages May 4, 2010 – May 5, 2010

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

PATCH 1/1 scsi: fix bnx2i build errors

From: Randy Dunlap <[email protected]>

bnx2i should depend on NET since it selects SCSI_ISCSI_ATTRS, which depends on NET.

Also move the dependencies together.

The "depends" change fixes multiple build errors when CONFIG_NET is not enabled:
ERROR: "skb_trim" [drivers/scsi/scsi_transport_iscsi.ko] undefined!
ERROR: "netlink_kernel_create" [drivers/scsi/scsi_transport_iscsi.ko] undefined!
ERROR: "netlink_kernel_release" [drivers/scsi/scsi_transport_iscsi.ko] undefined!
ERROR: "skb_pull" [drivers/scsi/scsi_transport_iscsi.ko] undefined!
ERROR: "init_net" [drivers/scsi/scsi_transport_iscsi.ko] undefined!
ERROR: "__alloc_skb" [drivers/scsi/scsi_transport_iscsi.ko] undefined!
ERROR: "netlink_broadcast" [drivers/scsi/scsi_transport_iscsi.ko] undefined!
ERROR: "kfree_skb" [drivers/scsi/scsi_transport_iscsi.ko] undefined!
ERROR: "skb_put" [drivers/scsi/scsi_transport_iscsi.ko] undefined!

Cc Anil Veerabhadrappa <[email protected]>
---
 drivers/scsi/bnx2i/Kconfig |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/scsi/bnx2i/Kconfig +2 -1
@@ -1,10 +1,11 @@
 config SCSI_BNX2_ISCSI
 	tristate "Broadcom NetXtreme II iSCSI support"
+	depends on NET
+	depends on PCI
 	select SCSI_ISCSI_ATTRS
 	select NETDEVICES
 	select NETDEV_1000
 	select CNIC
-	depends on PCI
 	---help---
 	This driver supports iSCSI offload for the Broadcom NetXtreme II
 	devices.
#1 lore raw
Quoted 28 lines · Randy Dunlap

From: Randy Dunlap <[email protected]>

bnx2i should depend on NET since it selects SCSI_ISCSI_ATTRS, which depends on NET.

Also move the dependencies together.

The "depends" change fixes multiple build errors when CONFIG_NET is not enabled:
ERROR: "skb_trim" [drivers/scsi/scsi_transport_iscsi.ko] undefined!
ERROR: "netlink_kernel_create" [drivers/scsi/scsi_transport_iscsi.ko] undefined!
ERROR: "netlink_kernel_release" [drivers/scsi/scsi_transport_iscsi.ko] undefined!
ERROR: "skb_pull" [drivers/scsi/scsi_transport_iscsi.ko] undefined!
ERROR: "init_net" [drivers/scsi/scsi_transport_iscsi.ko] undefined!
ERROR: "__alloc_skb" [drivers/scsi/scsi_transport_iscsi.ko] undefined!
ERROR: "netlink_broadcast" [drivers/scsi/scsi_transport_iscsi.ko] undefined!
ERROR: "kfree_skb" [drivers/scsi/scsi_transport_iscsi.ko] undefined!
ERROR: "skb_put" [drivers/scsi/scsi_transport_iscsi.ko] undefined!

Cc Anil Veerabhadrappa <[email protected]>
---
 drivers/scsi/bnx2i/Kconfig |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

drivers/scsi/bnx2i/Kconfig line 4

Quoted 4 lines
drivers/scsi/bnx2i/Kconfig +2 -0
@@ -1,10 +1,11 @@
 config SCSI_BNX2_ISCSI
 	tristate "Broadcom NetXtreme II iSCSI support"
+	depends on NET
+	depends on PCI

Actually, let's not fix it this way. While we still have this annoying bug in the Kconfig system where it doesn't respect the dependencies of a select, let's not build traps like this ... the rule has to be selected attributes must select their dependencies, that way the selection just works(tm).

Of course, fixing Kconfig would be the better option ...

James

---

drivers/scsi/Kconfig +2 -1
index 75f2336..804ba3d 100644
@@ -308,7 +308,8 @@ config SCSI_FC_TGT_ATTRS
 
 config SCSI_ISCSI_ATTRS
 	tristate "iSCSI Transport Attributes"
-	depends on SCSI && NET
+	depends on SCSI
+	select NET
 	help
 	  If you wish to export transport-specific information about
 	  each attached iSCSI device to sysfs, say Y.
#2 lore raw
Quoted 53 lines · James Bottomley
Quoted 28 lines · Randy Dunlap

From: Randy Dunlap <[email protected]>

bnx2i should depend on NET since it selects SCSI_ISCSI_ATTRS, which depends on NET.

Also move the dependencies together.

The "depends" change fixes multiple build errors when CONFIG_NET is not enabled:
ERROR: "skb_trim" [drivers/scsi/scsi_transport_iscsi.ko] undefined!
ERROR: "netlink_kernel_create" [drivers/scsi/scsi_transport_iscsi.ko] undefined!
ERROR: "netlink_kernel_release" [drivers/scsi/scsi_transport_iscsi.ko] undefined!
ERROR: "skb_pull" [drivers/scsi/scsi_transport_iscsi.ko] undefined!
ERROR: "init_net" [drivers/scsi/scsi_transport_iscsi.ko] undefined!
ERROR: "__alloc_skb" [drivers/scsi/scsi_transport_iscsi.ko] undefined!
ERROR: "netlink_broadcast" [drivers/scsi/scsi_transport_iscsi.ko] undefined!
ERROR: "kfree_skb" [drivers/scsi/scsi_transport_iscsi.ko] undefined!
ERROR: "skb_put" [drivers/scsi/scsi_transport_iscsi.ko] undefined!

Cc Anil Veerabhadrappa <[email protected]>
---
 drivers/scsi/bnx2i/Kconfig |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

drivers/scsi/bnx2i/Kconfig line 4

Quoted 4 lines
drivers/scsi/bnx2i/Kconfig +2 -0
@@ -1,10 +1,11 @@
 config SCSI_BNX2_ISCSI
 	tristate "Broadcom NetXtreme II iSCSI support"
+	depends on NET
+	depends on PCI

Actually, let's not fix it this way. While we still have this annoying bug in the Kconfig system where it doesn't respect the dependencies of a select, let's not build traps like this ... the rule has to be selected attributes must select their dependencies, that way the selection just works(tm).

Of course, fixing Kconfig would be the better option ...

James

---

drivers/scsi/Kconfig +0 -0
index 75f2336..804ba3d 100644

drivers/scsi/Kconfig config SCSI_FC_TGT_ATTRS · line 315

Quoted 9 lines
drivers/scsi/Kconfig +2 -1
@@ -308,7 +308,8 @@ config SCSI_FC_TGT_ATTRS
 
 config SCSI_ISCSI_ATTRS
 	tristate "iSCSI Transport Attributes"
-	depends on SCSI && NET
+	depends on SCSI
+	select NET
 	help
 	  If you wish to export transport-specific information about
 	  each attached iSCSI device to sysfs, say Y.

I would Nak that but it would probably do no good. Selecting NET just adds way too much code to be hidden like this.

Yes, of course, kconfig should be fixed...

Signature · 2 lines
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
#3 lore raw
Quoted 53 lines · Randy Dunlap
Quoted 52 lines · James Bottomley
Quoted 28 lines · Randy Dunlap

From: Randy Dunlap <[email protected]>

bnx2i should depend on NET since it selects SCSI_ISCSI_ATTRS, which depends on NET.

Also move the dependencies together.

The "depends" change fixes multiple build errors when CONFIG_NET is not enabled:
ERROR: "skb_trim" [drivers/scsi/scsi_transport_iscsi.ko] undefined!
ERROR: "netlink_kernel_create" [drivers/scsi/scsi_transport_iscsi.ko] undefined!
ERROR: "netlink_kernel_release" [drivers/scsi/scsi_transport_iscsi.ko] undefined!
ERROR: "skb_pull" [drivers/scsi/scsi_transport_iscsi.ko] undefined!
ERROR: "init_net" [drivers/scsi/scsi_transport_iscsi.ko] undefined!
ERROR: "__alloc_skb" [drivers/scsi/scsi_transport_iscsi.ko] undefined!
ERROR: "netlink_broadcast" [drivers/scsi/scsi_transport_iscsi.ko] undefined!
ERROR: "kfree_skb" [drivers/scsi/scsi_transport_iscsi.ko] undefined!
ERROR: "skb_put" [drivers/scsi/scsi_transport_iscsi.ko] undefined!

Cc Anil Veerabhadrappa <[email protected]>
---
 drivers/scsi/bnx2i/Kconfig |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

drivers/scsi/bnx2i/Kconfig line 4

Quoted 4 lines
drivers/scsi/bnx2i/Kconfig +2 -0
@@ -1,10 +1,11 @@
 config SCSI_BNX2_ISCSI
 	tristate "Broadcom NetXtreme II iSCSI support"
+	depends on NET
+	depends on PCI

Actually, let's not fix it this way. While we still have this annoying bug in the Kconfig system where it doesn't respect the dependencies of a select, let's not build traps like this ... the rule has to be selected attributes must select their dependencies, that way the selection just works(tm).

Of course, fixing Kconfig would be the better option ...

James

---

drivers/scsi/Kconfig +0 -0
index 75f2336..804ba3d 100644
@@ -308,7 +308,8 @@ config SCSI_FC_TGT_ATTRS
 
Quoted 13 lines

drivers/scsi/Kconfig config SCSI_FC_TGT_ATTRS · line 315

Quoted 10 lines
drivers/scsi/Kconfig +2 -1
 config SCSI_ISCSI_ATTRS
 	tristate "iSCSI Transport Attributes"
-	depends on SCSI && NET
+	depends on SCSI
+	select NET
 	help
 	  If you wish to export transport-specific information about
 	  each attached iSCSI device to sysfs, say Y.

I would Nak that but it would probably do no good. Selecting NET just adds way too much code to be hidden like this.

I think it's a complete hack too. But it's better than forcing people who use select on hidden options (like the transport classes) to be aware of the nebulous dependency diagram it's going to pull in. It's also what we've done to prevent hidden dependencies in other select items.

Quoted 1 line

Yes, of course, kconfig should be fixed...

In the absence of volunteers, I suppose I could take a look at it on the 'plane home. It seems to be a fairly simplistic parser.

James

#4 lore raw
Quoted 68 lines · James Bottomley
Quoted 53 lines · Randy Dunlap
Quoted 52 lines · James Bottomley
Quoted 28 lines · Randy Dunlap

From: Randy Dunlap <[email protected]>

bnx2i should depend on NET since it selects SCSI_ISCSI_ATTRS, which depends on NET.

Also move the dependencies together.

The "depends" change fixes multiple build errors when CONFIG_NET is not enabled:
ERROR: "skb_trim" [drivers/scsi/scsi_transport_iscsi.ko] undefined!
ERROR: "netlink_kernel_create" [drivers/scsi/scsi_transport_iscsi.ko] undefined!
ERROR: "netlink_kernel_release" [drivers/scsi/scsi_transport_iscsi.ko] undefined!
ERROR: "skb_pull" [drivers/scsi/scsi_transport_iscsi.ko] undefined!
ERROR: "init_net" [drivers/scsi/scsi_transport_iscsi.ko] undefined!
ERROR: "__alloc_skb" [drivers/scsi/scsi_transport_iscsi.ko] undefined!
ERROR: "netlink_broadcast" [drivers/scsi/scsi_transport_iscsi.ko] undefined!
ERROR: "kfree_skb" [drivers/scsi/scsi_transport_iscsi.ko] undefined!
ERROR: "skb_put" [drivers/scsi/scsi_transport_iscsi.ko] undefined!

Cc Anil Veerabhadrappa <[email protected]>
---
 drivers/scsi/bnx2i/Kconfig |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

drivers/scsi/bnx2i/Kconfig line 4

Quoted 4 lines
drivers/scsi/bnx2i/Kconfig +2 -0
@@ -1,10 +1,11 @@
 config SCSI_BNX2_ISCSI
 	tristate "Broadcom NetXtreme II iSCSI support"
+	depends on NET
+	depends on PCI

Actually, let's not fix it this way. While we still have this annoying bug in the Kconfig system where it doesn't respect the dependencies of a select, let's not build traps like this ... the rule has to be selected attributes must select their dependencies, that way the selection just works(tm).

Of course, fixing Kconfig would be the better option ...

James

---

drivers/scsi/Kconfig +0 -0
index 75f2336..804ba3d 100644
@@ -308,7 +308,8 @@ config SCSI_FC_TGT_ATTRS
 
Quoted 13 lines

drivers/scsi/Kconfig config SCSI_FC_TGT_ATTRS · line 315

Quoted 10 lines
drivers/scsi/Kconfig +2 -1
 config SCSI_ISCSI_ATTRS
 	tristate "iSCSI Transport Attributes"
-	depends on SCSI && NET
+	depends on SCSI
+	select NET
 	help
 	  If you wish to export transport-specific information about
 	  each attached iSCSI device to sysfs, say Y.

I would Nak that but it would probably do no good. Selecting NET just adds way too much code to be hidden like this.

Quoted 5 lines

I think it's a complete hack too. But it's better than forcing people who use select on hidden options (like the transport classes) to be aware of the nebulous dependency diagram it's going to pull in. It's also what we've done to prevent hidden dependencies in other select items.

The only other config symbol that selects NET is SCSI_NETLINK. :(

Quoted 4 lines
Quoted 1 line

Yes, of course, kconfig should be fixed...

In the absence of volunteers, I suppose I could take a look at it on the 'plane home. It seems to be a fairly simplistic parser.

That would be great. I've had a look at it and I was left dazed & confuzed.

Signature · 2 lines
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***