0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029 #ifndef _CXGB_SGE_H_
0030 #define _CXGB_SGE_H_
0031
0032 #include <linux/types.h>
0033 #include <linux/interrupt.h>
0034 #include <asm/byteorder.h>
0035
0036 struct sge_intr_counts {
0037 unsigned int rx_drops;
0038 unsigned int pure_rsps;
0039 unsigned int unhandled_irqs;
0040 unsigned int respQ_empty;
0041 unsigned int respQ_overflow;
0042 unsigned int freelistQ_empty;
0043 unsigned int pkt_too_big;
0044 unsigned int pkt_mismatch;
0045 unsigned int cmdQ_full[3];
0046 unsigned int cmdQ_restarted[3];
0047 };
0048
0049 struct sge_port_stats {
0050 u64 rx_cso_good;
0051 u64 tx_cso;
0052 u64 tx_tso;
0053 u64 vlan_xtract;
0054 u64 vlan_insert;
0055 u64 tx_need_hdrroom;
0056 };
0057
0058 struct sk_buff;
0059 struct net_device;
0060 struct adapter;
0061 struct sge_params;
0062 struct sge;
0063
0064 struct sge *t1_sge_create(struct adapter *, struct sge_params *);
0065 int t1_sge_configure(struct sge *, struct sge_params *);
0066 int t1_sge_set_coalesce_params(struct sge *, struct sge_params *);
0067 void t1_sge_destroy(struct sge *);
0068 irqreturn_t t1_interrupt_thread(int irq, void *data);
0069 irqreturn_t t1_interrupt(int irq, void *cookie);
0070 int t1_poll(struct napi_struct *, int);
0071
0072 netdev_tx_t t1_start_xmit(struct sk_buff *skb, struct net_device *dev);
0073 void t1_vlan_mode(struct adapter *adapter, netdev_features_t features);
0074 void t1_sge_start(struct sge *);
0075 void t1_sge_stop(struct sge *);
0076 bool t1_sge_intr_error_handler(struct sge *sge);
0077 void t1_sge_intr_enable(struct sge *);
0078 void t1_sge_intr_disable(struct sge *);
0079 void t1_sge_intr_clear(struct sge *);
0080 const struct sge_intr_counts *t1_sge_get_intr_counts(const struct sge *sge);
0081 void t1_sge_get_port_stats(const struct sge *sge, int port, struct sge_port_stats *);
0082 unsigned int t1_sched_update_parms(struct sge *, unsigned int, unsigned int,
0083 unsigned int);
0084
0085 #endif