1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*****************************************************************************
6 * $Date: 2005/06/21 22:10:55 $ *
8 * part of the Chelsio 10Gb Ethernet Driver. *
11 * http://www.chelsio.com *
13 * Copyright (c) 2003 - 2005 Chelsio Communications, Inc. *
14 * All rights reserved. *
16 * Maintainers: maintainers@chelsio.com *
18 * Authors: Dimitrios Michailidis <dm@chelsio.com> *
19 * Tina Yang <tainay@chelsio.com> *
20 * Felix Marti <felix@chelsio.com> *
21 * Scott Bardone <sbardone@chelsio.com> *
22 * Kurt Ottaway <kottaway@chelsio.com> *
23 * Frank DiMambro <frank@chelsio.com> *
27 ****************************************************************************/
32 #include <linux/types.h>
33 #include <linux/interrupt.h>
34 #include <asm/byteorder.h>
36 struct sge_intr_counts
{
37 unsigned int rx_drops
; /* # of packets dropped due to no mem */
38 unsigned int pure_rsps
; /* # of non-payload responses */
39 unsigned int unhandled_irqs
; /* # of unhandled interrupts */
40 unsigned int respQ_empty
; /* # times respQ empty */
41 unsigned int respQ_overflow
; /* # respQ overflow (fatal) */
42 unsigned int freelistQ_empty
; /* # times freelist empty */
43 unsigned int pkt_too_big
; /* packet too large (fatal) */
44 unsigned int pkt_mismatch
;
45 unsigned int cmdQ_full
[3]; /* not HW IRQ, host cmdQ[] full */
46 unsigned int cmdQ_restarted
[3];/* # of times cmdQ X was restarted */
49 struct sge_port_stats
{
50 u64 rx_cso_good
; /* # of successful RX csum offloads */
51 u64 tx_cso
; /* # of TX checksum offloads */
52 u64 tx_tso
; /* # of TSO requests */
53 u64 vlan_xtract
; /* # of VLAN tag extractions */
54 u64 vlan_insert
; /* # of VLAN tag insertions */
55 u64 tx_need_hdrroom
; /* # of TX skbs in need of more header room */
64 struct sge
*t1_sge_create(struct adapter
*, struct sge_params
*);
65 int t1_sge_configure(struct sge
*, struct sge_params
*);
66 int t1_sge_set_coalesce_params(struct sge
*, struct sge_params
*);
67 void t1_sge_destroy(struct sge
*);
68 irqreturn_t
t1_interrupt_thread(int irq
, void *data
);
69 irqreturn_t
t1_interrupt(int irq
, void *cookie
);
70 int t1_poll(struct napi_struct
*, int);
72 netdev_tx_t
t1_start_xmit(struct sk_buff
*skb
, struct net_device
*dev
);
73 void t1_vlan_mode(struct adapter
*adapter
, netdev_features_t features
);
74 void t1_sge_start(struct sge
*);
75 void t1_sge_stop(struct sge
*);
76 bool t1_sge_intr_error_handler(struct sge
*sge
);
77 void t1_sge_intr_enable(struct sge
*);
78 void t1_sge_intr_disable(struct sge
*);
79 void t1_sge_intr_clear(struct sge
*);
80 const struct sge_intr_counts
*t1_sge_get_intr_counts(const struct sge
*sge
);
81 void t1_sge_get_port_stats(const struct sge
*sge
, int port
, struct sge_port_stats
*);
82 unsigned int t1_sched_update_parms(struct sge
*, unsigned int, unsigned int,
85 #endif /* _CXGB_SGE_H_ */