18c2ecf20Sopenharmony_ci/***************************************************************************** 28c2ecf20Sopenharmony_ci * * 38c2ecf20Sopenharmony_ci * File: sge.h * 48c2ecf20Sopenharmony_ci * $Revision: 1.11 $ * 58c2ecf20Sopenharmony_ci * $Date: 2005/06/21 22:10:55 $ * 68c2ecf20Sopenharmony_ci * Description: * 78c2ecf20Sopenharmony_ci * part of the Chelsio 10Gb Ethernet Driver. * 88c2ecf20Sopenharmony_ci * * 98c2ecf20Sopenharmony_ci * This program is free software; you can redistribute it and/or modify * 108c2ecf20Sopenharmony_ci * it under the terms of the GNU General Public License, version 2, as * 118c2ecf20Sopenharmony_ci * published by the Free Software Foundation. * 128c2ecf20Sopenharmony_ci * * 138c2ecf20Sopenharmony_ci * You should have received a copy of the GNU General Public License along * 148c2ecf20Sopenharmony_ci * with this program; if not, see <http://www.gnu.org/licenses/>. * 158c2ecf20Sopenharmony_ci * * 168c2ecf20Sopenharmony_ci * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED * 178c2ecf20Sopenharmony_ci * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * 188c2ecf20Sopenharmony_ci * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * 198c2ecf20Sopenharmony_ci * * 208c2ecf20Sopenharmony_ci * http://www.chelsio.com * 218c2ecf20Sopenharmony_ci * * 228c2ecf20Sopenharmony_ci * Copyright (c) 2003 - 2005 Chelsio Communications, Inc. * 238c2ecf20Sopenharmony_ci * All rights reserved. * 248c2ecf20Sopenharmony_ci * * 258c2ecf20Sopenharmony_ci * Maintainers: maintainers@chelsio.com * 268c2ecf20Sopenharmony_ci * * 278c2ecf20Sopenharmony_ci * Authors: Dimitrios Michailidis <dm@chelsio.com> * 288c2ecf20Sopenharmony_ci * Tina Yang <tainay@chelsio.com> * 298c2ecf20Sopenharmony_ci * Felix Marti <felix@chelsio.com> * 308c2ecf20Sopenharmony_ci * Scott Bardone <sbardone@chelsio.com> * 318c2ecf20Sopenharmony_ci * Kurt Ottaway <kottaway@chelsio.com> * 328c2ecf20Sopenharmony_ci * Frank DiMambro <frank@chelsio.com> * 338c2ecf20Sopenharmony_ci * * 348c2ecf20Sopenharmony_ci * History: * 358c2ecf20Sopenharmony_ci * * 368c2ecf20Sopenharmony_ci ****************************************************************************/ 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ci#ifndef _CXGB_SGE_H_ 398c2ecf20Sopenharmony_ci#define _CXGB_SGE_H_ 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_ci#include <linux/types.h> 428c2ecf20Sopenharmony_ci#include <linux/interrupt.h> 438c2ecf20Sopenharmony_ci#include <asm/byteorder.h> 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_cistruct sge_intr_counts { 468c2ecf20Sopenharmony_ci unsigned int rx_drops; /* # of packets dropped due to no mem */ 478c2ecf20Sopenharmony_ci unsigned int pure_rsps; /* # of non-payload responses */ 488c2ecf20Sopenharmony_ci unsigned int unhandled_irqs; /* # of unhandled interrupts */ 498c2ecf20Sopenharmony_ci unsigned int respQ_empty; /* # times respQ empty */ 508c2ecf20Sopenharmony_ci unsigned int respQ_overflow; /* # respQ overflow (fatal) */ 518c2ecf20Sopenharmony_ci unsigned int freelistQ_empty; /* # times freelist empty */ 528c2ecf20Sopenharmony_ci unsigned int pkt_too_big; /* packet too large (fatal) */ 538c2ecf20Sopenharmony_ci unsigned int pkt_mismatch; 548c2ecf20Sopenharmony_ci unsigned int cmdQ_full[3]; /* not HW IRQ, host cmdQ[] full */ 558c2ecf20Sopenharmony_ci unsigned int cmdQ_restarted[3];/* # of times cmdQ X was restarted */ 568c2ecf20Sopenharmony_ci}; 578c2ecf20Sopenharmony_ci 588c2ecf20Sopenharmony_cistruct sge_port_stats { 598c2ecf20Sopenharmony_ci u64 rx_cso_good; /* # of successful RX csum offloads */ 608c2ecf20Sopenharmony_ci u64 tx_cso; /* # of TX checksum offloads */ 618c2ecf20Sopenharmony_ci u64 tx_tso; /* # of TSO requests */ 628c2ecf20Sopenharmony_ci u64 vlan_xtract; /* # of VLAN tag extractions */ 638c2ecf20Sopenharmony_ci u64 vlan_insert; /* # of VLAN tag insertions */ 648c2ecf20Sopenharmony_ci u64 tx_need_hdrroom; /* # of TX skbs in need of more header room */ 658c2ecf20Sopenharmony_ci}; 668c2ecf20Sopenharmony_ci 678c2ecf20Sopenharmony_cistruct sk_buff; 688c2ecf20Sopenharmony_cistruct net_device; 698c2ecf20Sopenharmony_cistruct adapter; 708c2ecf20Sopenharmony_cistruct sge_params; 718c2ecf20Sopenharmony_cistruct sge; 728c2ecf20Sopenharmony_ci 738c2ecf20Sopenharmony_cistruct sge *t1_sge_create(struct adapter *, struct sge_params *); 748c2ecf20Sopenharmony_ciint t1_sge_configure(struct sge *, struct sge_params *); 758c2ecf20Sopenharmony_ciint t1_sge_set_coalesce_params(struct sge *, struct sge_params *); 768c2ecf20Sopenharmony_civoid t1_sge_destroy(struct sge *); 778c2ecf20Sopenharmony_ciirqreturn_t t1_interrupt(int irq, void *cookie); 788c2ecf20Sopenharmony_ciint t1_poll(struct napi_struct *, int); 798c2ecf20Sopenharmony_ci 808c2ecf20Sopenharmony_cinetdev_tx_t t1_start_xmit(struct sk_buff *skb, struct net_device *dev); 818c2ecf20Sopenharmony_civoid t1_vlan_mode(struct adapter *adapter, netdev_features_t features); 828c2ecf20Sopenharmony_civoid t1_sge_start(struct sge *); 838c2ecf20Sopenharmony_civoid t1_sge_stop(struct sge *); 848c2ecf20Sopenharmony_ciint t1_sge_intr_error_handler(struct sge *); 858c2ecf20Sopenharmony_civoid t1_sge_intr_enable(struct sge *); 868c2ecf20Sopenharmony_civoid t1_sge_intr_disable(struct sge *); 878c2ecf20Sopenharmony_civoid t1_sge_intr_clear(struct sge *); 888c2ecf20Sopenharmony_ciconst struct sge_intr_counts *t1_sge_get_intr_counts(const struct sge *sge); 898c2ecf20Sopenharmony_civoid t1_sge_get_port_stats(const struct sge *sge, int port, struct sge_port_stats *); 908c2ecf20Sopenharmony_ciunsigned int t1_sched_update_parms(struct sge *, unsigned int, unsigned int, 918c2ecf20Sopenharmony_ci unsigned int); 928c2ecf20Sopenharmony_ci 938c2ecf20Sopenharmony_ci#endif /* _CXGB_SGE_H_ */ 94