aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorNeerav Parikh <Neerav.Parikh@intel.com>2012-01-04 15:23:39 -0500
committerDavid S. Miller <davem@davemloft.net>2012-01-05 13:12:04 -0500
commit68bad94ed801d955535cb50dde3412944a24530c (patch)
tree1c7134dffb57e4891fadd367100a7fd072089c10 /include/linux/netdevice.h
parenta95a07445ee97a2fef65befafbadcc30ca1bd145 (diff)
netdev: FCoE: Add new ndo_get_fcoe_hbainfo() call
This adds a new ndo_get_fcoe_hbainfo() call in net_device_ops for FCoE protocol stack. If supported by the underlying device, the FCoE protocol stack will call this to get device specific information from the underlying device. This information will then be utilized by the FCoE protocol stack to register Fiber Channel HBA attributes with the Fiber Channel Management Service via Fabric Device Management Interface (FDMI) as per the T11 FC-GS specification. Changes in v2: - As per comments from David Miller aligning the parameters of the ndo_get_fcoe_hbainfo() Signed-off-by: Neerav Parikh <Neerav.Parikh@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index a776a675c0e5..a1d109590da4 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -707,6 +707,23 @@ struct netdev_tc_txq {
707 u16 offset; 707 u16 offset;
708}; 708};
709 709
710#if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE)
711/*
712 * This structure is to hold information about the device
713 * configured to run FCoE protocol stack.
714 */
715struct netdev_fcoe_hbainfo {
716 char manufacturer[64];
717 char serial_number[64];
718 char hardware_version[64];
719 char driver_version[64];
720 char optionrom_version[64];
721 char firmware_version[64];
722 char model[256];
723 char model_description[256];
724};
725#endif
726
710/* 727/*
711 * This structure defines the management hooks for network devices. 728 * This structure defines the management hooks for network devices.
712 * The following hooks can be defined; unless noted otherwise, they are 729 * The following hooks can be defined; unless noted otherwise, they are
@@ -847,6 +864,13 @@ struct netdev_tc_txq {
847 * perform necessary setup and returns 1 to indicate the device is set up 864 * perform necessary setup and returns 1 to indicate the device is set up
848 * successfully to perform DDP on this I/O, otherwise this returns 0. 865 * successfully to perform DDP on this I/O, otherwise this returns 0.
849 * 866 *
867 * int (*ndo_fcoe_get_hbainfo)(struct net_device *dev,
868 * struct netdev_fcoe_hbainfo *hbainfo);
869 * Called when the FCoE Protocol stack wants information on the underlying
870 * device. This information is utilized by the FCoE protocol stack to
871 * register attributes with Fiber Channel management service as per the
872 * FC-GS Fabric Device Management Information(FDMI) specification.
873 *
850 * int (*ndo_fcoe_get_wwn)(struct net_device *dev, u64 *wwn, int type); 874 * int (*ndo_fcoe_get_wwn)(struct net_device *dev, u64 *wwn, int type);
851 * Called when the underlying device wants to override default World Wide 875 * Called when the underlying device wants to override default World Wide
852 * Name (WWN) generation mechanism in FCoE protocol stack to pass its own 876 * Name (WWN) generation mechanism in FCoE protocol stack to pass its own
@@ -950,6 +974,8 @@ struct net_device_ops {
950 u16 xid, 974 u16 xid,
951 struct scatterlist *sgl, 975 struct scatterlist *sgl,
952 unsigned int sgc); 976 unsigned int sgc);
977 int (*ndo_fcoe_get_hbainfo)(struct net_device *dev,
978 struct netdev_fcoe_hbainfo *hbainfo);
953#endif 979#endif
954 980
955#if IS_ENABLED(CONFIG_LIBFCOE) 981#if IS_ENABLED(CONFIG_LIBFCOE)