mirror of
https://github.com/torvalds/linux.git
synced 2024-12-26 12:52:30 +00:00
37448f7d39
This patch replaces current PowerPC 4xx EMAC driver with new, re-written from the scratch version. This patch is quite big (~234K) because there is virtualy 0% of common code between old and new version. New driver uses NAPI, it solves stability problems under heavy packet load and low memory, corrects chip register access and fixes numerous small bugs I don't even remember now. This patch has been tested on all supported in 2.6 PPC 4xx boards. It's been used in production for almost a year now on custom 4xx hardware. PPC32 specific parts are already upstream. Patch was acked by the current EMAC driver maintainer (Matt Porter). I will be maintaining this new version. Signed-off-by: Eugene Surovegin <ebs@ebshome.net> -- Kconfig | 72 ibm_emac/Makefile | 13 ibm_emac/ibm_emac.h | 418 +++-- ibm_emac/ibm_emac_core.c | 3414 ++++++++++++++++++++++++---------------------- ibm_emac/ibm_emac_core.h | 313 ++-- ibm_emac/ibm_emac_debug.c | 377 ++--- ibm_emac/ibm_emac_debug.h | 63 ibm_emac/ibm_emac_mal.c | 674 +++++---- ibm_emac/ibm_emac_mal.h | 336 +++- ibm_emac/ibm_emac_phy.c | 335 ++-- ibm_emac/ibm_emac_phy.h | 105 - ibm_emac/ibm_emac_rgmii.c | 201 ++ ibm_emac/ibm_emac_rgmii.h | 68 ibm_emac/ibm_emac_tah.c | 111 + ibm_emac/ibm_emac_tah.h | 96 - ibm_emac/ibm_emac_zmii.c | 255 +++ ibm_emac/ibm_emac_zmii.h | 114 - 17 files changed, 4114 insertions(+), 2851 deletions(-) Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
64 lines
1.9 KiB
C
64 lines
1.9 KiB
C
/*
|
|
* drivers/net/ibm_emac/ibm_ocp_debug.h
|
|
*
|
|
* Driver for PowerPC 4xx on-chip ethernet controller, debug print routines.
|
|
*
|
|
* Copyright (c) 2004, 2005 Zultys Technologies
|
|
* Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
* under the terms of the GNU General Public License as published by the
|
|
* Free Software Foundation; either version 2 of the License, or (at your
|
|
* option) any later version.
|
|
*
|
|
*/
|
|
#ifndef __IBM_EMAC_DEBUG_H_
|
|
#define __IBM_EMAC_DEBUG_H_
|
|
|
|
#include <linux/config.h>
|
|
#include <linux/init.h>
|
|
#include "ibm_emac_core.h"
|
|
#include "ibm_emac_mal.h"
|
|
|
|
#if defined(CONFIG_IBM_EMAC_DEBUG)
|
|
void emac_dbg_register(int idx, struct ocp_enet_private *dev);
|
|
void mal_dbg_register(int idx, struct ibm_ocp_mal *mal);
|
|
int emac_init_debug(void) __init;
|
|
void emac_fini_debug(void) __exit;
|
|
void emac_dbg_dump_all(void);
|
|
# define DBG_LEVEL 1
|
|
#else
|
|
# define emac_dbg_register(x,y) ((void)0)
|
|
# define mal_dbg_register(x,y) ((void)0)
|
|
# define emac_init_debug() ((void)0)
|
|
# define emac_fini_debug() ((void)0)
|
|
# define emac_dbg_dump_all() ((void)0)
|
|
# define DBG_LEVEL 0
|
|
#endif
|
|
|
|
#if DBG_LEVEL > 0
|
|
# define DBG(f,x...) printk("emac" f, ##x)
|
|
# define MAL_DBG(f,x...) printk("mal" f, ##x)
|
|
# define ZMII_DBG(f,x...) printk("zmii" f, ##x)
|
|
# define RGMII_DBG(f,x...) printk("rgmii" f, ##x)
|
|
# define NL "\n"
|
|
#else
|
|
# define DBG(f,x...) ((void)0)
|
|
# define MAL_DBG(f,x...) ((void)0)
|
|
# define ZMII_DBG(f,x...) ((void)0)
|
|
# define RGMII_DBG(f,x...) ((void)0)
|
|
#endif
|
|
#if DBG_LEVEL > 1
|
|
# define DBG2(f,x...) DBG(f, ##x)
|
|
# define MAL_DBG2(f,x...) MAL_DBG(f, ##x)
|
|
# define ZMII_DBG2(f,x...) ZMII_DBG(f, ##x)
|
|
# define RGMII_DBG2(f,x...) RGMII_DBG(f, ##x)
|
|
#else
|
|
# define DBG2(f,x...) ((void)0)
|
|
# define MAL_DBG2(f,x...) ((void)0)
|
|
# define ZMII_DBG2(f,x...) ((void)0)
|
|
# define RGMII_DBG2(f,x...) ((void)0)
|
|
#endif
|
|
|
|
#endif /* __IBM_EMAC_DEBUG_H_ */
|