18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * Copyright (c) 2003-2008 Chelsio, Inc. All rights reserved. 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * This software is available to you under a choice of one of two 58c2ecf20Sopenharmony_ci * licenses. You may choose to be licensed under the terms of the GNU 68c2ecf20Sopenharmony_ci * General Public License (GPL) Version 2, available from the file 78c2ecf20Sopenharmony_ci * COPYING in the main directory of this source tree, or the 88c2ecf20Sopenharmony_ci * OpenIB.org BSD license below: 98c2ecf20Sopenharmony_ci * 108c2ecf20Sopenharmony_ci * Redistribution and use in source and binary forms, with or 118c2ecf20Sopenharmony_ci * without modification, are permitted provided that the following 128c2ecf20Sopenharmony_ci * conditions are met: 138c2ecf20Sopenharmony_ci * 148c2ecf20Sopenharmony_ci * - Redistributions of source code must retain the above 158c2ecf20Sopenharmony_ci * copyright notice, this list of conditions and the following 168c2ecf20Sopenharmony_ci * disclaimer. 178c2ecf20Sopenharmony_ci * 188c2ecf20Sopenharmony_ci * - Redistributions in binary form must reproduce the above 198c2ecf20Sopenharmony_ci * copyright notice, this list of conditions and the following 208c2ecf20Sopenharmony_ci * disclaimer in the documentation and/or other materials 218c2ecf20Sopenharmony_ci * provided with the distribution. 228c2ecf20Sopenharmony_ci * 238c2ecf20Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 248c2ecf20Sopenharmony_ci * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 258c2ecf20Sopenharmony_ci * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 268c2ecf20Sopenharmony_ci * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 278c2ecf20Sopenharmony_ci * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 288c2ecf20Sopenharmony_ci * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 298c2ecf20Sopenharmony_ci * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 308c2ecf20Sopenharmony_ci * SOFTWARE. 318c2ecf20Sopenharmony_ci */ 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_ci/* This file should not be included directly. Include common.h instead. */ 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ci#ifndef __T3_ADAPTER_H__ 368c2ecf20Sopenharmony_ci#define __T3_ADAPTER_H__ 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ci#include <linux/pci.h> 398c2ecf20Sopenharmony_ci#include <linux/spinlock.h> 408c2ecf20Sopenharmony_ci#include <linux/interrupt.h> 418c2ecf20Sopenharmony_ci#include <linux/timer.h> 428c2ecf20Sopenharmony_ci#include <linux/cache.h> 438c2ecf20Sopenharmony_ci#include <linux/mutex.h> 448c2ecf20Sopenharmony_ci#include <linux/bitops.h> 458c2ecf20Sopenharmony_ci#include "t3cdev.h" 468c2ecf20Sopenharmony_ci#include <asm/io.h> 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_cistruct adapter; 498c2ecf20Sopenharmony_cistruct sge_qset; 508c2ecf20Sopenharmony_cistruct port_info; 518c2ecf20Sopenharmony_ci 528c2ecf20Sopenharmony_cienum mac_idx_types { 538c2ecf20Sopenharmony_ci LAN_MAC_IDX = 0, 548c2ecf20Sopenharmony_ci SAN_MAC_IDX, 558c2ecf20Sopenharmony_ci 568c2ecf20Sopenharmony_ci MAX_MAC_IDX 578c2ecf20Sopenharmony_ci}; 588c2ecf20Sopenharmony_ci 598c2ecf20Sopenharmony_cistruct iscsi_config { 608c2ecf20Sopenharmony_ci __u8 mac_addr[ETH_ALEN]; 618c2ecf20Sopenharmony_ci __u32 flags; 628c2ecf20Sopenharmony_ci int (*send)(struct port_info *pi, struct sk_buff **skb); 638c2ecf20Sopenharmony_ci int (*recv)(struct port_info *pi, struct sk_buff *skb); 648c2ecf20Sopenharmony_ci}; 658c2ecf20Sopenharmony_ci 668c2ecf20Sopenharmony_cistruct port_info { 678c2ecf20Sopenharmony_ci struct adapter *adapter; 688c2ecf20Sopenharmony_ci struct sge_qset *qs; 698c2ecf20Sopenharmony_ci u8 port_id; 708c2ecf20Sopenharmony_ci u8 nqsets; 718c2ecf20Sopenharmony_ci u8 first_qset; 728c2ecf20Sopenharmony_ci struct cphy phy; 738c2ecf20Sopenharmony_ci struct cmac mac; 748c2ecf20Sopenharmony_ci struct link_config link_config; 758c2ecf20Sopenharmony_ci int activity; 768c2ecf20Sopenharmony_ci __be32 iscsi_ipv4addr; 778c2ecf20Sopenharmony_ci struct iscsi_config iscsic; 788c2ecf20Sopenharmony_ci 798c2ecf20Sopenharmony_ci int link_fault; /* link fault was detected */ 808c2ecf20Sopenharmony_ci}; 818c2ecf20Sopenharmony_ci 828c2ecf20Sopenharmony_cienum { /* adapter flags */ 838c2ecf20Sopenharmony_ci FULL_INIT_DONE = (1 << 0), 848c2ecf20Sopenharmony_ci USING_MSI = (1 << 1), 858c2ecf20Sopenharmony_ci USING_MSIX = (1 << 2), 868c2ecf20Sopenharmony_ci QUEUES_BOUND = (1 << 3), 878c2ecf20Sopenharmony_ci TP_PARITY_INIT = (1 << 4), 888c2ecf20Sopenharmony_ci NAPI_INIT = (1 << 5), 898c2ecf20Sopenharmony_ci}; 908c2ecf20Sopenharmony_ci 918c2ecf20Sopenharmony_cistruct fl_pg_chunk { 928c2ecf20Sopenharmony_ci struct page *page; 938c2ecf20Sopenharmony_ci void *va; 948c2ecf20Sopenharmony_ci unsigned int offset; 958c2ecf20Sopenharmony_ci unsigned long *p_cnt; 968c2ecf20Sopenharmony_ci dma_addr_t mapping; 978c2ecf20Sopenharmony_ci}; 988c2ecf20Sopenharmony_ci 998c2ecf20Sopenharmony_cistruct rx_desc; 1008c2ecf20Sopenharmony_cistruct rx_sw_desc; 1018c2ecf20Sopenharmony_ci 1028c2ecf20Sopenharmony_cistruct sge_fl { /* SGE per free-buffer list state */ 1038c2ecf20Sopenharmony_ci unsigned int buf_size; /* size of each Rx buffer */ 1048c2ecf20Sopenharmony_ci unsigned int credits; /* # of available Rx buffers */ 1058c2ecf20Sopenharmony_ci unsigned int pend_cred; /* new buffers since last FL DB ring */ 1068c2ecf20Sopenharmony_ci unsigned int size; /* capacity of free list */ 1078c2ecf20Sopenharmony_ci unsigned int cidx; /* consumer index */ 1088c2ecf20Sopenharmony_ci unsigned int pidx; /* producer index */ 1098c2ecf20Sopenharmony_ci unsigned int gen; /* free list generation */ 1108c2ecf20Sopenharmony_ci struct fl_pg_chunk pg_chunk;/* page chunk cache */ 1118c2ecf20Sopenharmony_ci unsigned int use_pages; /* whether FL uses pages or sk_buffs */ 1128c2ecf20Sopenharmony_ci unsigned int order; /* order of page allocations */ 1138c2ecf20Sopenharmony_ci unsigned int alloc_size; /* size of allocated buffer */ 1148c2ecf20Sopenharmony_ci struct rx_desc *desc; /* address of HW Rx descriptor ring */ 1158c2ecf20Sopenharmony_ci struct rx_sw_desc *sdesc; /* address of SW Rx descriptor ring */ 1168c2ecf20Sopenharmony_ci dma_addr_t phys_addr; /* physical address of HW ring start */ 1178c2ecf20Sopenharmony_ci unsigned int cntxt_id; /* SGE context id for the free list */ 1188c2ecf20Sopenharmony_ci unsigned long empty; /* # of times queue ran out of buffers */ 1198c2ecf20Sopenharmony_ci unsigned long alloc_failed; /* # of times buffer allocation failed */ 1208c2ecf20Sopenharmony_ci}; 1218c2ecf20Sopenharmony_ci 1228c2ecf20Sopenharmony_ci/* 1238c2ecf20Sopenharmony_ci * Bundle size for grouping offload RX packets for delivery to the stack. 1248c2ecf20Sopenharmony_ci * Don't make this too big as we do prefetch on each packet in a bundle. 1258c2ecf20Sopenharmony_ci */ 1268c2ecf20Sopenharmony_ci# define RX_BUNDLE_SIZE 8 1278c2ecf20Sopenharmony_ci 1288c2ecf20Sopenharmony_cistruct rsp_desc; 1298c2ecf20Sopenharmony_ci 1308c2ecf20Sopenharmony_cistruct sge_rspq { /* state for an SGE response queue */ 1318c2ecf20Sopenharmony_ci unsigned int credits; /* # of pending response credits */ 1328c2ecf20Sopenharmony_ci unsigned int size; /* capacity of response queue */ 1338c2ecf20Sopenharmony_ci unsigned int cidx; /* consumer index */ 1348c2ecf20Sopenharmony_ci unsigned int gen; /* current generation bit */ 1358c2ecf20Sopenharmony_ci unsigned int polling; /* is the queue serviced through NAPI? */ 1368c2ecf20Sopenharmony_ci unsigned int holdoff_tmr; /* interrupt holdoff timer in 100ns */ 1378c2ecf20Sopenharmony_ci unsigned int next_holdoff; /* holdoff time for next interrupt */ 1388c2ecf20Sopenharmony_ci unsigned int rx_recycle_buf; /* whether recycling occurred 1398c2ecf20Sopenharmony_ci within current sop-eop */ 1408c2ecf20Sopenharmony_ci struct rsp_desc *desc; /* address of HW response ring */ 1418c2ecf20Sopenharmony_ci dma_addr_t phys_addr; /* physical address of the ring */ 1428c2ecf20Sopenharmony_ci unsigned int cntxt_id; /* SGE context id for the response q */ 1438c2ecf20Sopenharmony_ci spinlock_t lock; /* guards response processing */ 1448c2ecf20Sopenharmony_ci struct sk_buff_head rx_queue; /* offload packet receive queue */ 1458c2ecf20Sopenharmony_ci struct sk_buff *pg_skb; /* used to build frag list in napi handler */ 1468c2ecf20Sopenharmony_ci 1478c2ecf20Sopenharmony_ci unsigned long offload_pkts; 1488c2ecf20Sopenharmony_ci unsigned long offload_bundles; 1498c2ecf20Sopenharmony_ci unsigned long eth_pkts; /* # of ethernet packets */ 1508c2ecf20Sopenharmony_ci unsigned long pure_rsps; /* # of pure (non-data) responses */ 1518c2ecf20Sopenharmony_ci unsigned long imm_data; /* responses with immediate data */ 1528c2ecf20Sopenharmony_ci unsigned long rx_drops; /* # of packets dropped due to no mem */ 1538c2ecf20Sopenharmony_ci unsigned long async_notif; /* # of asynchronous notification events */ 1548c2ecf20Sopenharmony_ci unsigned long empty; /* # of times queue ran out of credits */ 1558c2ecf20Sopenharmony_ci unsigned long nomem; /* # of responses deferred due to no mem */ 1568c2ecf20Sopenharmony_ci unsigned long unhandled_irqs; /* # of spurious intrs */ 1578c2ecf20Sopenharmony_ci unsigned long starved; 1588c2ecf20Sopenharmony_ci unsigned long restarted; 1598c2ecf20Sopenharmony_ci}; 1608c2ecf20Sopenharmony_ci 1618c2ecf20Sopenharmony_cistruct tx_desc; 1628c2ecf20Sopenharmony_cistruct tx_sw_desc; 1638c2ecf20Sopenharmony_ci 1648c2ecf20Sopenharmony_cistruct sge_txq { /* state for an SGE Tx queue */ 1658c2ecf20Sopenharmony_ci unsigned long flags; /* HW DMA fetch status */ 1668c2ecf20Sopenharmony_ci unsigned int in_use; /* # of in-use Tx descriptors */ 1678c2ecf20Sopenharmony_ci unsigned int size; /* # of descriptors */ 1688c2ecf20Sopenharmony_ci unsigned int processed; /* total # of descs HW has processed */ 1698c2ecf20Sopenharmony_ci unsigned int cleaned; /* total # of descs SW has reclaimed */ 1708c2ecf20Sopenharmony_ci unsigned int stop_thres; /* SW TX queue suspend threshold */ 1718c2ecf20Sopenharmony_ci unsigned int cidx; /* consumer index */ 1728c2ecf20Sopenharmony_ci unsigned int pidx; /* producer index */ 1738c2ecf20Sopenharmony_ci unsigned int gen; /* current value of generation bit */ 1748c2ecf20Sopenharmony_ci unsigned int unacked; /* Tx descriptors used since last COMPL */ 1758c2ecf20Sopenharmony_ci struct tx_desc *desc; /* address of HW Tx descriptor ring */ 1768c2ecf20Sopenharmony_ci struct tx_sw_desc *sdesc; /* address of SW Tx descriptor ring */ 1778c2ecf20Sopenharmony_ci spinlock_t lock; /* guards enqueueing of new packets */ 1788c2ecf20Sopenharmony_ci unsigned int token; /* WR token */ 1798c2ecf20Sopenharmony_ci dma_addr_t phys_addr; /* physical address of the ring */ 1808c2ecf20Sopenharmony_ci struct sk_buff_head sendq; /* List of backpressured offload packets */ 1818c2ecf20Sopenharmony_ci struct tasklet_struct qresume_tsk; /* restarts the queue */ 1828c2ecf20Sopenharmony_ci unsigned int cntxt_id; /* SGE context id for the Tx q */ 1838c2ecf20Sopenharmony_ci unsigned long stops; /* # of times q has been stopped */ 1848c2ecf20Sopenharmony_ci unsigned long restarts; /* # of queue restarts */ 1858c2ecf20Sopenharmony_ci}; 1868c2ecf20Sopenharmony_ci 1878c2ecf20Sopenharmony_cienum { /* per port SGE statistics */ 1888c2ecf20Sopenharmony_ci SGE_PSTAT_TSO, /* # of TSO requests */ 1898c2ecf20Sopenharmony_ci SGE_PSTAT_RX_CSUM_GOOD, /* # of successful RX csum offloads */ 1908c2ecf20Sopenharmony_ci SGE_PSTAT_TX_CSUM, /* # of TX checksum offloads */ 1918c2ecf20Sopenharmony_ci SGE_PSTAT_VLANEX, /* # of VLAN tag extractions */ 1928c2ecf20Sopenharmony_ci SGE_PSTAT_VLANINS, /* # of VLAN tag insertions */ 1938c2ecf20Sopenharmony_ci 1948c2ecf20Sopenharmony_ci SGE_PSTAT_MAX /* must be last */ 1958c2ecf20Sopenharmony_ci}; 1968c2ecf20Sopenharmony_ci 1978c2ecf20Sopenharmony_cistruct napi_gro_fraginfo; 1988c2ecf20Sopenharmony_ci 1998c2ecf20Sopenharmony_cistruct sge_qset { /* an SGE queue set */ 2008c2ecf20Sopenharmony_ci struct adapter *adap; 2018c2ecf20Sopenharmony_ci struct napi_struct napi; 2028c2ecf20Sopenharmony_ci struct sge_rspq rspq; 2038c2ecf20Sopenharmony_ci struct sge_fl fl[SGE_RXQ_PER_SET]; 2048c2ecf20Sopenharmony_ci struct sge_txq txq[SGE_TXQ_PER_SET]; 2058c2ecf20Sopenharmony_ci int nomem; 2068c2ecf20Sopenharmony_ci void *lro_va; 2078c2ecf20Sopenharmony_ci struct net_device *netdev; 2088c2ecf20Sopenharmony_ci struct netdev_queue *tx_q; /* associated netdev TX queue */ 2098c2ecf20Sopenharmony_ci unsigned long txq_stopped; /* which Tx queues are stopped */ 2108c2ecf20Sopenharmony_ci struct timer_list tx_reclaim_timer; /* reclaims TX buffers */ 2118c2ecf20Sopenharmony_ci struct timer_list rx_reclaim_timer; /* reclaims RX buffers */ 2128c2ecf20Sopenharmony_ci unsigned long port_stats[SGE_PSTAT_MAX]; 2138c2ecf20Sopenharmony_ci} ____cacheline_aligned; 2148c2ecf20Sopenharmony_ci 2158c2ecf20Sopenharmony_cistruct sge { 2168c2ecf20Sopenharmony_ci struct sge_qset qs[SGE_QSETS]; 2178c2ecf20Sopenharmony_ci spinlock_t reg_lock; /* guards non-atomic SGE registers (eg context) */ 2188c2ecf20Sopenharmony_ci}; 2198c2ecf20Sopenharmony_ci 2208c2ecf20Sopenharmony_cistruct adapter { 2218c2ecf20Sopenharmony_ci struct t3cdev tdev; 2228c2ecf20Sopenharmony_ci struct list_head adapter_list; 2238c2ecf20Sopenharmony_ci void __iomem *regs; 2248c2ecf20Sopenharmony_ci struct pci_dev *pdev; 2258c2ecf20Sopenharmony_ci unsigned long registered_device_map; 2268c2ecf20Sopenharmony_ci unsigned long open_device_map; 2278c2ecf20Sopenharmony_ci unsigned long flags; 2288c2ecf20Sopenharmony_ci 2298c2ecf20Sopenharmony_ci const char *name; 2308c2ecf20Sopenharmony_ci int msg_enable; 2318c2ecf20Sopenharmony_ci unsigned int mmio_len; 2328c2ecf20Sopenharmony_ci 2338c2ecf20Sopenharmony_ci struct adapter_params params; 2348c2ecf20Sopenharmony_ci unsigned int slow_intr_mask; 2358c2ecf20Sopenharmony_ci unsigned long irq_stats[IRQ_NUM_STATS]; 2368c2ecf20Sopenharmony_ci 2378c2ecf20Sopenharmony_ci int msix_nvectors; 2388c2ecf20Sopenharmony_ci struct { 2398c2ecf20Sopenharmony_ci unsigned short vec; 2408c2ecf20Sopenharmony_ci char desc[22]; 2418c2ecf20Sopenharmony_ci } msix_info[SGE_QSETS + 1]; 2428c2ecf20Sopenharmony_ci 2438c2ecf20Sopenharmony_ci /* T3 modules */ 2448c2ecf20Sopenharmony_ci struct sge sge; 2458c2ecf20Sopenharmony_ci struct mc7 pmrx; 2468c2ecf20Sopenharmony_ci struct mc7 pmtx; 2478c2ecf20Sopenharmony_ci struct mc7 cm; 2488c2ecf20Sopenharmony_ci struct mc5 mc5; 2498c2ecf20Sopenharmony_ci 2508c2ecf20Sopenharmony_ci struct net_device *port[MAX_NPORTS]; 2518c2ecf20Sopenharmony_ci unsigned int check_task_cnt; 2528c2ecf20Sopenharmony_ci struct delayed_work adap_check_task; 2538c2ecf20Sopenharmony_ci struct work_struct ext_intr_handler_task; 2548c2ecf20Sopenharmony_ci struct work_struct fatal_error_handler_task; 2558c2ecf20Sopenharmony_ci struct work_struct link_fault_handler_task; 2568c2ecf20Sopenharmony_ci 2578c2ecf20Sopenharmony_ci struct work_struct db_full_task; 2588c2ecf20Sopenharmony_ci struct work_struct db_empty_task; 2598c2ecf20Sopenharmony_ci struct work_struct db_drop_task; 2608c2ecf20Sopenharmony_ci 2618c2ecf20Sopenharmony_ci struct dentry *debugfs_root; 2628c2ecf20Sopenharmony_ci 2638c2ecf20Sopenharmony_ci struct mutex mdio_lock; 2648c2ecf20Sopenharmony_ci spinlock_t stats_lock; 2658c2ecf20Sopenharmony_ci spinlock_t work_lock; 2668c2ecf20Sopenharmony_ci 2678c2ecf20Sopenharmony_ci struct sk_buff *nofail_skb; 2688c2ecf20Sopenharmony_ci}; 2698c2ecf20Sopenharmony_ci 2708c2ecf20Sopenharmony_cistatic inline u32 t3_read_reg(struct adapter *adapter, u32 reg_addr) 2718c2ecf20Sopenharmony_ci{ 2728c2ecf20Sopenharmony_ci u32 val = readl(adapter->regs + reg_addr); 2738c2ecf20Sopenharmony_ci 2748c2ecf20Sopenharmony_ci CH_DBG(adapter, MMIO, "read register 0x%x value 0x%x\n", reg_addr, val); 2758c2ecf20Sopenharmony_ci return val; 2768c2ecf20Sopenharmony_ci} 2778c2ecf20Sopenharmony_ci 2788c2ecf20Sopenharmony_cistatic inline void t3_write_reg(struct adapter *adapter, u32 reg_addr, u32 val) 2798c2ecf20Sopenharmony_ci{ 2808c2ecf20Sopenharmony_ci CH_DBG(adapter, MMIO, "setting register 0x%x to 0x%x\n", reg_addr, val); 2818c2ecf20Sopenharmony_ci writel(val, adapter->regs + reg_addr); 2828c2ecf20Sopenharmony_ci} 2838c2ecf20Sopenharmony_ci 2848c2ecf20Sopenharmony_cistatic inline struct port_info *adap2pinfo(struct adapter *adap, int idx) 2858c2ecf20Sopenharmony_ci{ 2868c2ecf20Sopenharmony_ci return netdev_priv(adap->port[idx]); 2878c2ecf20Sopenharmony_ci} 2888c2ecf20Sopenharmony_ci 2898c2ecf20Sopenharmony_cistatic inline int phy2portid(struct cphy *phy) 2908c2ecf20Sopenharmony_ci{ 2918c2ecf20Sopenharmony_ci struct adapter *adap = phy->adapter; 2928c2ecf20Sopenharmony_ci struct port_info *port0 = adap2pinfo(adap, 0); 2938c2ecf20Sopenharmony_ci 2948c2ecf20Sopenharmony_ci return &port0->phy == phy ? 0 : 1; 2958c2ecf20Sopenharmony_ci} 2968c2ecf20Sopenharmony_ci 2978c2ecf20Sopenharmony_ci#define OFFLOAD_DEVMAP_BIT 15 2988c2ecf20Sopenharmony_ci 2998c2ecf20Sopenharmony_ci#define tdev2adap(d) container_of(d, struct adapter, tdev) 3008c2ecf20Sopenharmony_ci 3018c2ecf20Sopenharmony_cistatic inline int offload_running(struct adapter *adapter) 3028c2ecf20Sopenharmony_ci{ 3038c2ecf20Sopenharmony_ci return test_bit(OFFLOAD_DEVMAP_BIT, &adapter->open_device_map); 3048c2ecf20Sopenharmony_ci} 3058c2ecf20Sopenharmony_ci 3068c2ecf20Sopenharmony_ciint t3_offload_tx(struct t3cdev *tdev, struct sk_buff *skb); 3078c2ecf20Sopenharmony_ci 3088c2ecf20Sopenharmony_civoid t3_os_ext_intr_handler(struct adapter *adapter); 3098c2ecf20Sopenharmony_civoid t3_os_link_changed(struct adapter *adapter, int port_id, int link_status, 3108c2ecf20Sopenharmony_ci int speed, int duplex, int fc); 3118c2ecf20Sopenharmony_civoid t3_os_phymod_changed(struct adapter *adap, int port_id); 3128c2ecf20Sopenharmony_civoid t3_os_link_fault(struct adapter *adapter, int port_id, int state); 3138c2ecf20Sopenharmony_civoid t3_os_link_fault_handler(struct adapter *adapter, int port_id); 3148c2ecf20Sopenharmony_ci 3158c2ecf20Sopenharmony_civoid t3_sge_start(struct adapter *adap); 3168c2ecf20Sopenharmony_civoid t3_sge_stop_dma(struct adapter *adap); 3178c2ecf20Sopenharmony_civoid t3_sge_stop(struct adapter *adap); 3188c2ecf20Sopenharmony_civoid t3_start_sge_timers(struct adapter *adap); 3198c2ecf20Sopenharmony_civoid t3_stop_sge_timers(struct adapter *adap); 3208c2ecf20Sopenharmony_civoid t3_free_sge_resources(struct adapter *adap); 3218c2ecf20Sopenharmony_civoid t3_sge_err_intr_handler(struct adapter *adapter); 3228c2ecf20Sopenharmony_ciirq_handler_t t3_intr_handler(struct adapter *adap, int polling); 3238c2ecf20Sopenharmony_cinetdev_tx_t t3_eth_xmit(struct sk_buff *skb, struct net_device *dev); 3248c2ecf20Sopenharmony_ciint t3_mgmt_tx(struct adapter *adap, struct sk_buff *skb); 3258c2ecf20Sopenharmony_civoid t3_update_qset_coalesce(struct sge_qset *qs, const struct qset_params *p); 3268c2ecf20Sopenharmony_ciint t3_sge_alloc_qset(struct adapter *adapter, unsigned int id, int nports, 3278c2ecf20Sopenharmony_ci int irq_vec_idx, const struct qset_params *p, 3288c2ecf20Sopenharmony_ci int ntxq, struct net_device *dev, 3298c2ecf20Sopenharmony_ci struct netdev_queue *netdevq); 3308c2ecf20Sopenharmony_ciextern struct workqueue_struct *cxgb3_wq; 3318c2ecf20Sopenharmony_ci 3328c2ecf20Sopenharmony_ciint t3_get_edc_fw(struct cphy *phy, int edc_idx, int size); 3338c2ecf20Sopenharmony_ci 3348c2ecf20Sopenharmony_ci#endif /* __T3_ADAPTER_H__ */ 335