18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */ 28c2ecf20Sopenharmony_ci/* QLogic qed NIC Driver 38c2ecf20Sopenharmony_ci * Copyright (c) 2015-2017 QLogic Corporation 48c2ecf20Sopenharmony_ci * Copyright (c) 2019-2020 Marvell International Ltd. 58c2ecf20Sopenharmony_ci */ 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci#ifndef _QED_FCOE_H 88c2ecf20Sopenharmony_ci#define _QED_FCOE_H 98c2ecf20Sopenharmony_ci#include <linux/types.h> 108c2ecf20Sopenharmony_ci#include <linux/list.h> 118c2ecf20Sopenharmony_ci#include <linux/slab.h> 128c2ecf20Sopenharmony_ci#include <linux/spinlock.h> 138c2ecf20Sopenharmony_ci#include <linux/qed/qed_fcoe_if.h> 148c2ecf20Sopenharmony_ci#include <linux/qed/qed_chain.h> 158c2ecf20Sopenharmony_ci#include "qed.h" 168c2ecf20Sopenharmony_ci#include "qed_hsi.h" 178c2ecf20Sopenharmony_ci#include "qed_mcp.h" 188c2ecf20Sopenharmony_ci#include "qed_sp.h" 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_cistruct qed_fcoe_info { 218c2ecf20Sopenharmony_ci spinlock_t lock; /* Connection resources. */ 228c2ecf20Sopenharmony_ci struct list_head free_list; 238c2ecf20Sopenharmony_ci}; 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ci#if IS_ENABLED(CONFIG_QED_FCOE) 268c2ecf20Sopenharmony_ciint qed_fcoe_alloc(struct qed_hwfn *p_hwfn); 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_civoid qed_fcoe_setup(struct qed_hwfn *p_hwfn); 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_civoid qed_fcoe_free(struct qed_hwfn *p_hwfn); 318c2ecf20Sopenharmony_civoid qed_get_protocol_stats_fcoe(struct qed_dev *cdev, 328c2ecf20Sopenharmony_ci struct qed_mcp_fcoe_stats *stats); 338c2ecf20Sopenharmony_ci#else /* CONFIG_QED_FCOE */ 348c2ecf20Sopenharmony_cistatic inline int qed_fcoe_alloc(struct qed_hwfn *p_hwfn) 358c2ecf20Sopenharmony_ci{ 368c2ecf20Sopenharmony_ci return -EINVAL; 378c2ecf20Sopenharmony_ci} 388c2ecf20Sopenharmony_ci 398c2ecf20Sopenharmony_cistatic inline void qed_fcoe_setup(struct qed_hwfn *p_hwfn) {} 408c2ecf20Sopenharmony_cistatic inline void qed_fcoe_free(struct qed_hwfn *p_hwfn) {} 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_cistatic inline void qed_get_protocol_stats_fcoe(struct qed_dev *cdev, 438c2ecf20Sopenharmony_ci struct qed_mcp_fcoe_stats *stats) 448c2ecf20Sopenharmony_ci{ 458c2ecf20Sopenharmony_ci} 468c2ecf20Sopenharmony_ci#endif /* CONFIG_QED_FCOE */ 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_ci#endif /* _QED_FCOE_H */ 49