xref: /linux/drivers/net/ethernet/chelsio/cxgb/espi.h (revision 24168c5e6dfbdd5b414f048f47f75d64533296ca)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*****************************************************************************
3  *                                                                           *
4  * File: espi.h                                                              *
5  * $Revision: 1.7 $                                                          *
6  * $Date: 2005/06/21 18:29:47 $                                              *
7  * Description:                                                              *
8  *  part of the Chelsio 10Gb Ethernet Driver.                                *
9  *                                                                           *
10  *                                                                           *
11  * http://www.chelsio.com                                                    *
12  *                                                                           *
13  * Copyright (c) 2003 - 2005 Chelsio Communications, Inc.                    *
14  * All rights reserved.                                                      *
15  *                                                                           *
16  * Maintainers: maintainers@chelsio.com                                      *
17  *                                                                           *
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>                      *
24  *                                                                           *
25  * History:                                                                  *
26  *                                                                           *
27  ****************************************************************************/
28 
29 #ifndef _CXGB_ESPI_H_
30 #define _CXGB_ESPI_H_
31 
32 #include "common.h"
33 
34 struct espi_intr_counts {
35 	unsigned int DIP4_err;
36 	unsigned int rx_drops;
37 	unsigned int tx_drops;
38 	unsigned int rx_ovflw;
39 	unsigned int parity_err;
40 	unsigned int DIP2_parity_err;
41 };
42 
43 struct peespi;
44 
45 struct peespi *t1_espi_create(adapter_t *adapter);
46 void t1_espi_destroy(struct peespi *espi);
47 int t1_espi_init(struct peespi *espi, int mac_type, int nports);
48 
49 void t1_espi_intr_enable(struct peespi *);
50 void t1_espi_intr_clear(struct peespi *);
51 void t1_espi_intr_disable(struct peespi *);
52 int t1_espi_intr_handler(struct peespi *);
53 const struct espi_intr_counts *t1_espi_get_intr_counts(struct peespi *espi);
54 
55 u32 t1_espi_get_mon(adapter_t *adapter, u32 addr, u8 wait);
56 int t1_espi_get_mon_t204(adapter_t *, u32 *, u8);
57 
58 #endif /* _CXGB_ESPI_H_ */
59