diff options
author | Vasu Dev <vasu.dev@intel.com> | 2009-03-27 16:03:29 (GMT) |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-04-03 14:23:00 (GMT) |
commit | 5919a59503577c2dc6eaa8bfba0f7bde3f9924ba (patch) | |
tree | 8b24bf78c4d21296990a598128cd334b59e4b0db /drivers/scsi/fcoe/fcoe_sw.c | |
parent | 8976f424d43c80ea32b6e847226e1a8ccdb6e748 (diff) | |
download | linux-fsl-qoriq-5919a59503577c2dc6eaa8bfba0f7bde3f9924ba.tar.xz |
[SCSI] fcoe: prep work to completely remove fc_transport_fcoe code
The fcoe transport code was added for generic FCoE transport
infrastructure to allow additional offload related module loading
on demand, this is not required anymore after recently added
different offload approach by having offload related func ops
in netdev.
This patch removes fcoe transport related code use, calls functions
directly between existing libfcoe.c and fcoe_sw.c for now, for
example fcoe_sw_destroy and fcoe_sw_create calling.
The fcoe_sw.c and libfcoe.c code will be further consolidated in
later patches and then also the default fcoe sw transport code
file fcoe_sw.c will be completely removed.
The fcoe transport code files are completely removed in next
patch to keep this patch simple for reviewing.
[This patch is an update to a previous patch. This update
resolves a build error as well as fixes a defect related to
not calling fc_release_transport().]
Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/fcoe/fcoe_sw.c')
-rw-r--r-- | drivers/scsi/fcoe/fcoe_sw.c | 37 |
1 files changed, 4 insertions, 33 deletions
diff --git a/drivers/scsi/fcoe/fcoe_sw.c b/drivers/scsi/fcoe/fcoe_sw.c index a675390..f060220 100644 --- a/drivers/scsi/fcoe/fcoe_sw.c +++ b/drivers/scsi/fcoe/fcoe_sw.c @@ -36,7 +36,6 @@ #include <scsi/libfc.h> #include <scsi/libfcoe.h> -#include <scsi/fc_transport_fcoe.h> #define FCOE_SW_VERSION "0.1" #define FCOE_SW_NAME "fcoesw" @@ -302,7 +301,7 @@ static inline int fcoe_sw_em_config(struct fc_lport *lp) * * Returns: 0 if link is OK for use by FCoE. */ -static int fcoe_sw_destroy(struct net_device *netdev) +int fcoe_sw_destroy(struct net_device *netdev) { struct fc_lport *lp = NULL; struct fcoe_softc *fc; @@ -415,7 +414,7 @@ static struct libfc_function_template fcoe_sw_libfc_fcn_templ = { * * Returns : 0 on success */ -static int fcoe_sw_create(struct net_device *netdev) +int fcoe_sw_create(struct net_device *netdev) { int rc; struct fc_lport *lp = NULL; @@ -494,28 +493,7 @@ out_host_put: } /** - * fcoe_sw_match() - The FCoE SW transport match function - * - * Returns : false always - */ -static bool fcoe_sw_match(struct net_device *netdev) -{ - /* FIXME - for sw transport, always return false */ - return false; -} - -/* the sw hba fcoe transport */ -struct fcoe_transport fcoe_sw_transport = { - .name = "fcoesw", - .create = fcoe_sw_create, - .destroy = fcoe_sw_destroy, - .match = fcoe_sw_match, - .vendor = 0x0, - .device = 0xffff, -}; - -/** - * fcoe_sw_init() - Registers fcoe_sw_transport + * fcoe_sw_init() - attach to scsi transport * * Returns : 0 on success */ @@ -530,23 +508,16 @@ int __init fcoe_sw_init(void) return -ENODEV; } - mutex_init(&fcoe_sw_transport.devlock); - INIT_LIST_HEAD(&fcoe_sw_transport.devlist); - - /* register sw transport */ - fcoe_transport_register(&fcoe_sw_transport); return 0; } /** - * fcoe_sw_exit() - Unregisters fcoe_sw_transport + * fcoe_sw_exit() - detach from scsi transport * * Returns : 0 on success */ int __exit fcoe_sw_exit(void) { - /* dettach the transport */ fc_release_transport(scsi_transport_fcoe_sw); - fcoe_transport_unregister(&fcoe_sw_transport); return 0; } |