git-scsi-misc build error
ERROR: "scsi_tgt_it_nexus_create" [drivers/scsi/scsi_transport_srp.ko] undefined!
ERROR: "scsi_tgt_it_nexus_destroy" [drivers/scsi/scsi_transport_srp.ko] undefined!
This bug was reported about seven times against 2.6.23-rc1-mm1's git-scsi-target, and now it has been moved into git-scsi-misc.
From: Andrew Morton <[email protected]>
- Fix this:
ERROR: "scsi_tgt_it_nexus_create" [drivers/scsi/scsi_transport_srp.ko] undefined!
ERROR: "scsi_tgt_it_nexus_destroy" [drivers/scsi/scsi_transport_srp.ko] undefined!
- Also avoid anonymous args in the function prototypes: adding the names has commentary value, and makes it easier to check the stubbed inline function against the out-of-line declaration.
---
include/scsi/scsi_tgt.h | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-)
include/scsi/scsi_tgt.h renamed from include/scsi/scsi_tgt.h~scsi-fix-build-for-config_scsi_tgt=n +17 -2
@@ -17,5 +17,20 @@ extern int scsi_tgt_tsk_mgmt_request(strextern struct scsi_cmnd *scsi_host_get_command (struct Scsi_Host *,enum dma_data_direction ,gfp_t );extern void scsi_host_put_command (struct Scsi_Host *,struct scsi_cmnd *); -extern int scsi_tgt_it_nexus_create (struct Scsi_Host *,u64 ,char *); -extern int scsi_tgt_it_nexus_destroy (struct Scsi_Host *,u64 ); + +#ifdef CONFIG_SCSI_TGT +extern int scsi_tgt_it_nexus_create (struct Scsi_Host *shost,u64 itn_id, +char *initiator); +extern int scsi_tgt_it_nexus_destroy (struct Scsi_Host *shost,u64 itn_id); +#else +static inline int scsi_tgt_it_nexus_create (struct Scsi_Host *shost, +u64 itn_id,char *initiator) +{ +return 0 ; +} + +static inline int scsi_tgt_it_nexus_destroy (struct Scsi_Host *shost,u64 itn_id) +{ +return 0 ; +} +#endif
_
Quoted 5 lines · Andrew Morton
ERROR: "
scsi_tgt_it_nexus_create" [drivers/scsi/scsi_transport_srp.ko] undefined!
ERROR: "scsi_tgt_it_nexus_destroy" [drivers/scsi/scsi_transport_srp.ko] undefined!This bug was reported about seven times against 2.6.23-rc1-mm1's git-scsi-target, and now it has been moved into git-scsi-misc.
Yes ... Tomo's on the hook for a better fix, which is promised.
James
Quoted 9 lines · On Tue, 31 Jul 2007 17:30:52 -0500 James Bottomley…
Quoted 5 lines · Andrew Morton
ERROR: "
scsi_tgt_it_nexus_create" [drivers/scsi/scsi_transport_srp.ko] undefined!
ERROR: "scsi_tgt_it_nexus_destroy" [drivers/scsi/scsi_transport_srp.ko] undefined!This bug was reported about seven times against 2.6.23-rc1-mm1's git-scsi-target, and now it has been moved into git-scsi-misc.
Yes ... Tomo's on the hook for a better fix, which is promised.
mutter.
Please, nothing which uses Kconfig `select'. They regularly go wrong.
Please copy me on that fix so I know when to drop this one.
Quoted 10 lines · Andrew Morton
Quoted 7 lines · On Tue, 31 Jul 2007 17:30:52 -0500 James Bottomley…
Quoted 5 lines · Andrew Morton
ERROR: "
scsi_tgt_it_nexus_create" [drivers/scsi/scsi_transport_srp.ko] undefined!
ERROR: "scsi_tgt_it_nexus_destroy" [drivers/scsi/scsi_transport_srp.ko] undefined!This bug was reported about seven times against 2.6.23-rc1-mm1's git-scsi-target, and now it has been moved into git-scsi-misc.
Quoted 6 lines
Quoted 2 lines
Yes ... Tomo's on the hook for a better fix, which is promised.
mutter.
Please, nothing which uses
Kconfig`select'. They regularly go wrong.
He has explicit instructions on that point.
Quoted 1 line
Please copy me on that fix so I know when to drop this one.
Will do.
James
Quoted 10 lines · On Tue, 31 Jul 2007 15:41:34 -0700 Andrew Morton <[email protected]>…
Quoted 7 lines · On Tue, 31 Jul 2007 17:30:52 -0500 James Bottomley…
Quoted 5 lines · Andrew Morton
ERROR: "
scsi_tgt_it_nexus_create" [drivers/scsi/scsi_transport_srp.ko] undefined!
ERROR: "scsi_tgt_it_nexus_destroy" [drivers/scsi/scsi_transport_srp.ko] undefined!This bug was reported about seven times against 2.6.23-rc1-mm1's git-scsi-target, and now it has been moved into git-scsi-misc.
Quoted 8 lines
Quoted 2 lines
Yes ... Tomo's on the hook for a better fix, which is promised.
mutter.
Please, nothing which uses
Kconfig`select'. They regularly go wrong.Please copy me on that fix so I know when to drop this one.
Really sorry about this issue that I should have fixed a long time ago. The following patch was merged to scsi-misc. Hopefully it will fix the issue.
---
Quoted 1 line
From
00924b31df30e4ddcf9ba9b5082171e5e46b9eb0Mon Sep 17 00:00:00 2001
From: FUJITA Tomonori <[email protected]>
Date: Thu, 2 Aug 2007 00:03:11 +0900
Subject: [PATCH] scsi_transport_srp: remove tgt dependencies
it's better to remove tgt dependencies in srp transport class since most people want only initiator support.
--- drivers/scsi/Kconfig | 11 +++++++++-- drivers/scsi/scsi_transport_srp.c | 10 +++++----- drivers/scsi/scsi_transport_srp_internal.h | 25 +++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 7 deletions(-) create mode 100644 drivers/scsi/scsi_transport_srp_internal.h
drivers/scsi/Kconfig +9 -2
@@ -291,11 +291,18 @@ source "drivers/scsi/libsas/Kconfig" config SCSI_SRP_ATTRS tristate "SRP Transport Attributes" - depends on SCSI && SCSI_TGT + depends on SCSI help If you wish to export transport-specific information about each attached SRP device to sysfs, say Y. +config SCSI_SRP_TGT_ATTRS + bool "SCSI target support for SRP Transport Attributes" + depends on SCSI_SRP_ATTRS + depends on SCSI_TGT = y || SCSI_TGT = SCSI_SRP_ATTRS + help + If you want to use SCSI target mode drivers enable this option. + endmenu menuconfig SCSI_LOWLEVEL
@@ -848,7 +855,7 @@ config SCSI_IBMVSCSI config SCSI_IBMVSCSIS tristate "IBM Virtual SCSI Server support" - depends on PPC_PSERIES && SCSI_TGT && SCSI_SRP && SCSI_SRP_ATTRS + depends on PPC_PSERIES && SCSI_SRP && SCSI_SRP_TGT_ATTRS help This is the SRP target driver for IBM pSeries virtual environments.
drivers/scsi/scsi_transport_srp.c +5 -5
@@ -30,7 +30,7 @@#include <scsi/scsi_host.h> #include <scsi/scsi_transport.h> #include <scsi/scsi_transport_srp.h> -#include <scsi/scsi_tgt.h> +#include "scsi_transport_srp_internal.h" struct srp_host_attrs {atomic_t next_port_id;
@@ -223,8 +223,8 @@ struct srp_rport *srp_rport_add(struct Scsi_Host *shost, }if (ids->roles ==SRP_RPORT_ROLE_INITIATOR ) { - ret =scsi_tgt_it_nexus_create (shost, (unsigned long )rport, - rport->port_id); + ret =srp_tgt_it_nexus_create (shost, (unsigned long )rport, + rport->port_id);if (ret) {device_del (&rport->dev);transport_destroy_device (&rport->dev);
@@ -251,8 +251,8 @@ void srp_rport_del(struct srp_rport *rport)struct device *dev = &rport->dev;if (rport->roles ==SRP_RPORT_ROLE_INITIATOR ) -scsi_tgt_it_nexus_destroy (dev_to_shost (dev->parent), - (unsigned long )rport); +srp_tgt_it_nexus_destroy (dev_to_shost (dev->parent), + (unsigned long )rport);transport_remove_device (dev);device_del (dev);
drivers/scsi/scsi_transport_srp_internal.h new file +25 -0
@@ -0,0 +1,25 @@ +#include <scsi/scsi_tgt.h> + +#ifdef CONFIG_SCSI_SRP_TGT_ATTRS +static inline int srp_tgt_it_nexus_create (struct Scsi_Host *shost,u64 itn_id, +char *initiator) +{ +return scsi_tgt_it_nexus_create (shost, itn_id, initiator); +} + +static inline int srp_tgt_it_nexus_destroy (struct Scsi_Host *shost,u64 itn_id) +{ +return scsi_tgt_it_nexus_destroy (shost, itn_id); +} + +#else +static inline int srp_tgt_it_nexus_create (struct Scsi_Host *shost,u64 itn_id, +char *initiator) +{ +return 0 ; +} +static inline int srp_tgt_it_nexus_destroy (struct Scsi_Host *shost,u64 itn_id) +{ +return 0 ; +} +#endif
Signature · 1 line
1.5.2.4