2005-03-30 16:34:31 -05:00
|
|
|
/*****************************************************************************
|
|
|
|
* *
|
|
|
|
* File: gmac.h *
|
Update Chelsio gige net driver.
- Use extern prefix for functions required.
- Removed a lot of wrappers, including t1_read/write_reg_4.
- Removed various macros, using native kernel calls now.
- Enumerated various #defines.
- Removed a lot of shared code which is not currently used in "NIC only" mode.
- Removed dead code.
Documentation/networking/cxgb.txt:
- Updated release notes for version 2.1.1
drivers/net/chelsio/ch_ethtool.h
- removed file, no longer using ETHTOOL namespace.
drivers/net/chelsio/common.h
- moved code from osdep.h to common.h
- added comment to #endif indicating which symbol it closes.
drivers/net/chelsio/cphy.h
- removed dead code.
- added comment to #endif indicating which symbol it closes.
drivers/net/chelsio/cxgb2.c
- use DMA_{32,64}BIT_MASK in include/linux/dma-mapping.h.
- removed unused code.
- use printk message for link info resembling drivers/net/mii.c.
- no longer using the MODULE_xxx namespace.
- no longer using "pci_" namespace.
- no longer using ETHTOOL namespace.
drivers/net/chelsio/cxgb2.h
- removed file, merged into common.h
drivers/net/chelsio/elmer0.h
- removed dead code.
- added various enums.
- added comment to #endif indicating which symbol it closes.
drivers/net/chelsio/espi.c
- removed various macros, using native kernel calls now.
- removed a lot of wrappers, including t1_read/write_reg_4.
drivers/net/chelsio/espi.h
- added comment to #endif indicating which symbol it closes.
drivers/net/chelsio/gmac.h
- added comment to #endif indicating which symbol it closes.
drivers/net/chelsio/mv88x201x.c
- changes to sync with Chelsio TOT.
drivers/net/chelsio/osdep.h
- removed file, consolidation. osdep was used to translate wrapper functions
since our code supports multiple OSs. removed wrappers.
drivers/net/chelsio/pm3393.c
- removed various macros, using native kernel calls now.
- removed a lot of wrappers, including t1_read/write_reg_4.
- removed unused code.
drivers/net/chelsio/regs.h
- added a few register entries for future and current feature support.
- added comment to #endif indicating which symbol it closes.
drivers/net/chelsio/sge.c
- rewrote large portion of scatter-gather engine to stabilize
performance.
- using u8/u16/u32 kernel types instead of __u8/__u16/__u32 compiler
types.
drivers/net/chelsio/sge.h
- rewrote large portion of scatter-gather engine to stabilize
performance.
- added comment to #endif indicating which symbol it closes.
drivers/net/chelsio/subr.c
- merged tp.c into subr.c
- removed various macros, using native kernel calls now.
- removed a lot of wrappers, including t1_read/write_reg_4.
- removed unused code.
drivers/net/chelsio/suni1x10gexp_regs.h
- modified copyright and authorship of file.
- added comment to #endif indicating which symbol it closes.
drivers/net/chelsio/tp.c
- removed file, merged into subr.c.
drivers/net/chelsio/tp.h
- removed file.
include/linux/pci_ids.h
- patched to include PCI_VENDOR_ID_CHELSIO 0x1425, removed define from
our code.
2005-06-23 01:40:19 -04:00
|
|
|
* $Revision: 1.6 $ *
|
|
|
|
* $Date: 2005/06/21 18:29:47 $ *
|
2005-03-30 16:34:31 -05:00
|
|
|
* Description: *
|
|
|
|
* Generic MAC functionality. *
|
|
|
|
* part of the Chelsio 10Gb Ethernet Driver. *
|
|
|
|
* *
|
|
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU General Public License, version 2, as *
|
|
|
|
* published by the Free Software Foundation. *
|
|
|
|
* *
|
|
|
|
* You should have received a copy of the GNU General Public License along *
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc., *
|
|
|
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
|
|
|
* *
|
|
|
|
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED *
|
|
|
|
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF *
|
|
|
|
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. *
|
|
|
|
* *
|
|
|
|
* http://www.chelsio.com *
|
|
|
|
* *
|
|
|
|
* Copyright (c) 2003 - 2005 Chelsio Communications, Inc. *
|
|
|
|
* All rights reserved. *
|
|
|
|
* *
|
|
|
|
* Maintainers: maintainers@chelsio.com *
|
|
|
|
* *
|
|
|
|
* Authors: Dimitrios Michailidis <dm@chelsio.com> *
|
|
|
|
* Tina Yang <tainay@chelsio.com> *
|
|
|
|
* Felix Marti <felix@chelsio.com> *
|
|
|
|
* Scott Bardone <sbardone@chelsio.com> *
|
|
|
|
* Kurt Ottaway <kottaway@chelsio.com> *
|
|
|
|
* Frank DiMambro <frank@chelsio.com> *
|
|
|
|
* *
|
|
|
|
* History: *
|
|
|
|
* *
|
|
|
|
****************************************************************************/
|
|
|
|
|
Update Chelsio gige net driver.
- Use extern prefix for functions required.
- Removed a lot of wrappers, including t1_read/write_reg_4.
- Removed various macros, using native kernel calls now.
- Enumerated various #defines.
- Removed a lot of shared code which is not currently used in "NIC only" mode.
- Removed dead code.
Documentation/networking/cxgb.txt:
- Updated release notes for version 2.1.1
drivers/net/chelsio/ch_ethtool.h
- removed file, no longer using ETHTOOL namespace.
drivers/net/chelsio/common.h
- moved code from osdep.h to common.h
- added comment to #endif indicating which symbol it closes.
drivers/net/chelsio/cphy.h
- removed dead code.
- added comment to #endif indicating which symbol it closes.
drivers/net/chelsio/cxgb2.c
- use DMA_{32,64}BIT_MASK in include/linux/dma-mapping.h.
- removed unused code.
- use printk message for link info resembling drivers/net/mii.c.
- no longer using the MODULE_xxx namespace.
- no longer using "pci_" namespace.
- no longer using ETHTOOL namespace.
drivers/net/chelsio/cxgb2.h
- removed file, merged into common.h
drivers/net/chelsio/elmer0.h
- removed dead code.
- added various enums.
- added comment to #endif indicating which symbol it closes.
drivers/net/chelsio/espi.c
- removed various macros, using native kernel calls now.
- removed a lot of wrappers, including t1_read/write_reg_4.
drivers/net/chelsio/espi.h
- added comment to #endif indicating which symbol it closes.
drivers/net/chelsio/gmac.h
- added comment to #endif indicating which symbol it closes.
drivers/net/chelsio/mv88x201x.c
- changes to sync with Chelsio TOT.
drivers/net/chelsio/osdep.h
- removed file, consolidation. osdep was used to translate wrapper functions
since our code supports multiple OSs. removed wrappers.
drivers/net/chelsio/pm3393.c
- removed various macros, using native kernel calls now.
- removed a lot of wrappers, including t1_read/write_reg_4.
- removed unused code.
drivers/net/chelsio/regs.h
- added a few register entries for future and current feature support.
- added comment to #endif indicating which symbol it closes.
drivers/net/chelsio/sge.c
- rewrote large portion of scatter-gather engine to stabilize
performance.
- using u8/u16/u32 kernel types instead of __u8/__u16/__u32 compiler
types.
drivers/net/chelsio/sge.h
- rewrote large portion of scatter-gather engine to stabilize
performance.
- added comment to #endif indicating which symbol it closes.
drivers/net/chelsio/subr.c
- merged tp.c into subr.c
- removed various macros, using native kernel calls now.
- removed a lot of wrappers, including t1_read/write_reg_4.
- removed unused code.
drivers/net/chelsio/suni1x10gexp_regs.h
- modified copyright and authorship of file.
- added comment to #endif indicating which symbol it closes.
drivers/net/chelsio/tp.c
- removed file, merged into subr.c.
drivers/net/chelsio/tp.h
- removed file.
include/linux/pci_ids.h
- patched to include PCI_VENDOR_ID_CHELSIO 0x1425, removed define from
our code.
2005-06-23 01:40:19 -04:00
|
|
|
#ifndef _CXGB_GMAC_H_
|
|
|
|
#define _CXGB_GMAC_H_
|
2005-03-30 16:34:31 -05:00
|
|
|
|
|
|
|
#include "common.h"
|
|
|
|
|
2006-12-11 17:47:00 -05:00
|
|
|
enum {
|
|
|
|
MAC_STATS_UPDATE_FAST,
|
|
|
|
MAC_STATS_UPDATE_FULL
|
|
|
|
};
|
|
|
|
|
|
|
|
enum {
|
|
|
|
MAC_DIRECTION_RX = 1,
|
|
|
|
MAC_DIRECTION_TX = 2
|
|
|
|
};
|
2005-03-30 16:34:31 -05:00
|
|
|
|
|
|
|
struct cmac_statistics {
|
|
|
|
/* Transmit */
|
|
|
|
u64 TxOctetsOK;
|
|
|
|
u64 TxOctetsBad;
|
|
|
|
u64 TxUnicastFramesOK;
|
|
|
|
u64 TxMulticastFramesOK;
|
|
|
|
u64 TxBroadcastFramesOK;
|
|
|
|
u64 TxPauseFrames;
|
|
|
|
u64 TxFramesWithDeferredXmissions;
|
|
|
|
u64 TxLateCollisions;
|
|
|
|
u64 TxTotalCollisions;
|
|
|
|
u64 TxFramesAbortedDueToXSCollisions;
|
|
|
|
u64 TxUnderrun;
|
|
|
|
u64 TxLengthErrors;
|
|
|
|
u64 TxInternalMACXmitError;
|
|
|
|
u64 TxFramesWithExcessiveDeferral;
|
|
|
|
u64 TxFCSErrors;
|
2006-12-01 19:36:16 -05:00
|
|
|
u64 TxJumboFramesOK;
|
|
|
|
u64 TxJumboOctetsOK;
|
2005-03-30 16:34:31 -05:00
|
|
|
|
|
|
|
/* Receive */
|
|
|
|
u64 RxOctetsOK;
|
|
|
|
u64 RxOctetsBad;
|
|
|
|
u64 RxUnicastFramesOK;
|
|
|
|
u64 RxMulticastFramesOK;
|
|
|
|
u64 RxBroadcastFramesOK;
|
|
|
|
u64 RxPauseFrames;
|
|
|
|
u64 RxFCSErrors;
|
|
|
|
u64 RxAlignErrors;
|
|
|
|
u64 RxSymbolErrors;
|
|
|
|
u64 RxDataErrors;
|
|
|
|
u64 RxSequenceErrors;
|
|
|
|
u64 RxRuntErrors;
|
|
|
|
u64 RxJabberErrors;
|
|
|
|
u64 RxInternalMACRcvError;
|
|
|
|
u64 RxInRangeLengthErrors;
|
|
|
|
u64 RxOutOfRangeLengthField;
|
|
|
|
u64 RxFrameTooLongErrors;
|
2006-12-01 19:36:16 -05:00
|
|
|
u64 RxJumboFramesOK;
|
|
|
|
u64 RxJumboOctetsOK;
|
2005-03-30 16:34:31 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
struct cmac_ops {
|
|
|
|
void (*destroy)(struct cmac *);
|
|
|
|
int (*reset)(struct cmac *);
|
|
|
|
int (*interrupt_enable)(struct cmac *);
|
|
|
|
int (*interrupt_disable)(struct cmac *);
|
|
|
|
int (*interrupt_clear)(struct cmac *);
|
|
|
|
int (*interrupt_handler)(struct cmac *);
|
|
|
|
|
|
|
|
int (*enable)(struct cmac *, int);
|
|
|
|
int (*disable)(struct cmac *, int);
|
|
|
|
|
|
|
|
int (*loopback_enable)(struct cmac *);
|
|
|
|
int (*loopback_disable)(struct cmac *);
|
|
|
|
|
|
|
|
int (*set_mtu)(struct cmac *, int mtu);
|
|
|
|
int (*set_rx_mode)(struct cmac *, struct t1_rx_mode *rm);
|
|
|
|
|
|
|
|
int (*set_speed_duplex_fc)(struct cmac *, int speed, int duplex, int fc);
|
|
|
|
int (*get_speed_duplex_fc)(struct cmac *, int *speed, int *duplex,
|
|
|
|
int *fc);
|
|
|
|
|
|
|
|
const struct cmac_statistics *(*statistics_update)(struct cmac *, int);
|
|
|
|
|
|
|
|
int (*macaddress_get)(struct cmac *, u8 mac_addr[6]);
|
|
|
|
int (*macaddress_set)(struct cmac *, u8 mac_addr[6]);
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct _cmac_instance cmac_instance;
|
|
|
|
|
|
|
|
struct cmac {
|
|
|
|
struct cmac_statistics stats;
|
|
|
|
adapter_t *adapter;
|
2007-02-20 18:58:02 -05:00
|
|
|
const struct cmac_ops *ops;
|
2005-03-30 16:34:31 -05:00
|
|
|
cmac_instance *instance;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct gmac {
|
|
|
|
unsigned int stats_update_period;
|
|
|
|
struct cmac *(*create)(adapter_t *adapter, int index);
|
|
|
|
int (*reset)(adapter_t *);
|
|
|
|
};
|
|
|
|
|
2007-02-20 18:58:02 -05:00
|
|
|
extern const struct gmac t1_pm3393_ops;
|
|
|
|
extern const struct gmac t1_vsc7326_ops;
|
Update Chelsio gige net driver.
- Use extern prefix for functions required.
- Removed a lot of wrappers, including t1_read/write_reg_4.
- Removed various macros, using native kernel calls now.
- Enumerated various #defines.
- Removed a lot of shared code which is not currently used in "NIC only" mode.
- Removed dead code.
Documentation/networking/cxgb.txt:
- Updated release notes for version 2.1.1
drivers/net/chelsio/ch_ethtool.h
- removed file, no longer using ETHTOOL namespace.
drivers/net/chelsio/common.h
- moved code from osdep.h to common.h
- added comment to #endif indicating which symbol it closes.
drivers/net/chelsio/cphy.h
- removed dead code.
- added comment to #endif indicating which symbol it closes.
drivers/net/chelsio/cxgb2.c
- use DMA_{32,64}BIT_MASK in include/linux/dma-mapping.h.
- removed unused code.
- use printk message for link info resembling drivers/net/mii.c.
- no longer using the MODULE_xxx namespace.
- no longer using "pci_" namespace.
- no longer using ETHTOOL namespace.
drivers/net/chelsio/cxgb2.h
- removed file, merged into common.h
drivers/net/chelsio/elmer0.h
- removed dead code.
- added various enums.
- added comment to #endif indicating which symbol it closes.
drivers/net/chelsio/espi.c
- removed various macros, using native kernel calls now.
- removed a lot of wrappers, including t1_read/write_reg_4.
drivers/net/chelsio/espi.h
- added comment to #endif indicating which symbol it closes.
drivers/net/chelsio/gmac.h
- added comment to #endif indicating which symbol it closes.
drivers/net/chelsio/mv88x201x.c
- changes to sync with Chelsio TOT.
drivers/net/chelsio/osdep.h
- removed file, consolidation. osdep was used to translate wrapper functions
since our code supports multiple OSs. removed wrappers.
drivers/net/chelsio/pm3393.c
- removed various macros, using native kernel calls now.
- removed a lot of wrappers, including t1_read/write_reg_4.
- removed unused code.
drivers/net/chelsio/regs.h
- added a few register entries for future and current feature support.
- added comment to #endif indicating which symbol it closes.
drivers/net/chelsio/sge.c
- rewrote large portion of scatter-gather engine to stabilize
performance.
- using u8/u16/u32 kernel types instead of __u8/__u16/__u32 compiler
types.
drivers/net/chelsio/sge.h
- rewrote large portion of scatter-gather engine to stabilize
performance.
- added comment to #endif indicating which symbol it closes.
drivers/net/chelsio/subr.c
- merged tp.c into subr.c
- removed various macros, using native kernel calls now.
- removed a lot of wrappers, including t1_read/write_reg_4.
- removed unused code.
drivers/net/chelsio/suni1x10gexp_regs.h
- modified copyright and authorship of file.
- added comment to #endif indicating which symbol it closes.
drivers/net/chelsio/tp.c
- removed file, merged into subr.c.
drivers/net/chelsio/tp.h
- removed file.
include/linux/pci_ids.h
- patched to include PCI_VENDOR_ID_CHELSIO 0x1425, removed define from
our code.
2005-06-23 01:40:19 -04:00
|
|
|
|
|
|
|
#endif /* _CXGB_GMAC_H_ */
|