diff options
author | Robert Love <robert.w.love@intel.com> | 2012-11-27 01:53:35 -0500 |
---|---|---|
committer | Robert Love <robert.w.love@intel.com> | 2012-12-14 13:38:54 -0500 |
commit | 435c86679a24ead623c8a47ca31038e250a75e05 (patch) | |
tree | 2ee9bc3a2d338bc641c099f9c7aa792bf1db0460 /drivers/scsi/fcoe/fcoe_ctlr.c | |
parent | 6a891b071b640e1de44c4a5117fa2c974dcfa84a (diff) |
fcoe: Use the fcoe_sysfs control interface
This patch adds support for the new fcoe_sysfs
control interface to fcoe.ko. It keeps the deprecated
interface in tact and therefore either the legacy
or the new control interfaces can be used. A mixed mode
is not supported. A user must either use the new
interfaces or the old ones, but not both.
The fcoe_ctlr's link state is now driven by both the
netdev link state as well as the fcoe_ctlr_device's
enabled attribute. The link must be up and the
fcoe_ctlr_device must be enabled before the FCoE
Controller starts discovery or login.
Signed-off-by: Robert Love <robert.w.love@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Diffstat (limited to 'drivers/scsi/fcoe/fcoe_ctlr.c')
-rw-r--r-- | drivers/scsi/fcoe/fcoe_ctlr.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/scsi/fcoe/fcoe_ctlr.c b/drivers/scsi/fcoe/fcoe_ctlr.c index 2ebe03a4b51d..75834255bf07 100644 --- a/drivers/scsi/fcoe/fcoe_ctlr.c +++ b/drivers/scsi/fcoe/fcoe_ctlr.c | |||
@@ -2864,22 +2864,21 @@ void fcoe_fcf_get_selected(struct fcoe_fcf_device *fcf_dev) | |||
2864 | } | 2864 | } |
2865 | EXPORT_SYMBOL(fcoe_fcf_get_selected); | 2865 | EXPORT_SYMBOL(fcoe_fcf_get_selected); |
2866 | 2866 | ||
2867 | void fcoe_ctlr_get_fip_mode(struct fcoe_ctlr_device *ctlr_dev) | 2867 | void fcoe_ctlr_set_fip_mode(struct fcoe_ctlr_device *ctlr_dev) |
2868 | { | 2868 | { |
2869 | struct fcoe_ctlr *ctlr = fcoe_ctlr_device_priv(ctlr_dev); | 2869 | struct fcoe_ctlr *ctlr = fcoe_ctlr_device_priv(ctlr_dev); |
2870 | 2870 | ||
2871 | mutex_lock(&ctlr->ctlr_mutex); | 2871 | mutex_lock(&ctlr->ctlr_mutex); |
2872 | switch (ctlr->mode) { | 2872 | switch (ctlr_dev->mode) { |
2873 | case FIP_MODE_FABRIC: | 2873 | case FIP_CONN_TYPE_VN2VN: |
2874 | ctlr_dev->mode = FIP_CONN_TYPE_FABRIC; | 2874 | ctlr->mode = FIP_MODE_VN2VN; |
2875 | break; | ||
2876 | case FIP_MODE_VN2VN: | ||
2877 | ctlr_dev->mode = FIP_CONN_TYPE_VN2VN; | ||
2878 | break; | 2875 | break; |
2876 | case FIP_CONN_TYPE_FABRIC: | ||
2879 | default: | 2877 | default: |
2880 | ctlr_dev->mode = FIP_CONN_TYPE_UNKNOWN; | 2878 | ctlr->mode = FIP_MODE_FABRIC; |
2881 | break; | 2879 | break; |
2882 | } | 2880 | } |
2881 | |||
2883 | mutex_unlock(&ctlr->ctlr_mutex); | 2882 | mutex_unlock(&ctlr->ctlr_mutex); |
2884 | } | 2883 | } |
2885 | EXPORT_SYMBOL(fcoe_ctlr_get_fip_mode); | 2884 | EXPORT_SYMBOL(fcoe_ctlr_set_fip_mode); |