Commit 0012fdf9 authored by FUJITA Tomonori's avatar FUJITA Tomonori Committed by James Bottomley

[SCSI] scsi_transport_srp: remove tgt dependencies

it's better to remove tgt dependencies in srp transport class since
most people want only initiator support.
Signed-off-by: default avatarFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent e9906fe8
...@@ -291,11 +291,18 @@ source "drivers/scsi/libsas/Kconfig" ...@@ -291,11 +291,18 @@ source "drivers/scsi/libsas/Kconfig"
config SCSI_SRP_ATTRS config SCSI_SRP_ATTRS
tristate "SRP Transport Attributes" tristate "SRP Transport Attributes"
depends on SCSI && SCSI_TGT depends on SCSI
help help
If you wish to export transport-specific information about If you wish to export transport-specific information about
each attached SRP device to sysfs, say Y. 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 endmenu
menuconfig SCSI_LOWLEVEL menuconfig SCSI_LOWLEVEL
...@@ -848,7 +855,7 @@ config SCSI_IBMVSCSI ...@@ -848,7 +855,7 @@ config SCSI_IBMVSCSI
config SCSI_IBMVSCSIS config SCSI_IBMVSCSIS
tristate "IBM Virtual SCSI Server support" 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 help
This is the SRP target driver for IBM pSeries virtual environments. This is the SRP target driver for IBM pSeries virtual environments.
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include <scsi/scsi_host.h> #include <scsi/scsi_host.h>
#include <scsi/scsi_transport.h> #include <scsi/scsi_transport.h>
#include <scsi/scsi_transport_srp.h> #include <scsi/scsi_transport_srp.h>
#include <scsi/scsi_tgt.h> #include "scsi_transport_srp_internal.h"
struct srp_host_attrs { struct srp_host_attrs {
atomic_t next_port_id; atomic_t next_port_id;
...@@ -223,7 +223,7 @@ struct srp_rport *srp_rport_add(struct Scsi_Host *shost, ...@@ -223,7 +223,7 @@ struct srp_rport *srp_rport_add(struct Scsi_Host *shost,
} }
if (ids->roles == SRP_RPORT_ROLE_INITIATOR) { if (ids->roles == SRP_RPORT_ROLE_INITIATOR) {
ret = scsi_tgt_it_nexus_create(shost, (unsigned long)rport, ret = srp_tgt_it_nexus_create(shost, (unsigned long)rport,
rport->port_id); rport->port_id);
if (ret) { if (ret) {
device_del(&rport->dev); device_del(&rport->dev);
...@@ -251,7 +251,7 @@ void srp_rport_del(struct srp_rport *rport) ...@@ -251,7 +251,7 @@ void srp_rport_del(struct srp_rport *rport)
struct device *dev = &rport->dev; struct device *dev = &rport->dev;
if (rport->roles == SRP_RPORT_ROLE_INITIATOR) if (rport->roles == SRP_RPORT_ROLE_INITIATOR)
scsi_tgt_it_nexus_destroy(dev_to_shost(dev->parent), srp_tgt_it_nexus_destroy(dev_to_shost(dev->parent),
(unsigned long)rport); (unsigned long)rport);
transport_remove_device(dev); transport_remove_device(dev);
......
#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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment