0001
0002
0003
0004
0005
0006
0007 #ifndef _QED_FCOE_H
0008 #define _QED_FCOE_H
0009 #include <linux/types.h>
0010 #include <linux/list.h>
0011 #include <linux/slab.h>
0012 #include <linux/spinlock.h>
0013 #include <linux/qed/qed_fcoe_if.h>
0014 #include <linux/qed/qed_chain.h>
0015 #include "qed.h"
0016 #include "qed_hsi.h"
0017 #include "qed_mcp.h"
0018 #include "qed_sp.h"
0019
0020 struct qed_fcoe_info {
0021 spinlock_t lock;
0022 struct list_head free_list;
0023 };
0024
0025 #if IS_ENABLED(CONFIG_QED_FCOE)
0026 int qed_fcoe_alloc(struct qed_hwfn *p_hwfn);
0027
0028 void qed_fcoe_setup(struct qed_hwfn *p_hwfn);
0029
0030 void qed_fcoe_free(struct qed_hwfn *p_hwfn);
0031 void qed_get_protocol_stats_fcoe(struct qed_dev *cdev,
0032 struct qed_mcp_fcoe_stats *stats);
0033 #else
0034 static inline int qed_fcoe_alloc(struct qed_hwfn *p_hwfn)
0035 {
0036 return -EINVAL;
0037 }
0038
0039 static inline void qed_fcoe_setup(struct qed_hwfn *p_hwfn) {}
0040 static inline void qed_fcoe_free(struct qed_hwfn *p_hwfn) {}
0041
0042 static inline void qed_get_protocol_stats_fcoe(struct qed_dev *cdev,
0043 struct qed_mcp_fcoe_stats *stats)
0044 {
0045 }
0046 #endif
0047
0048 #endif