/* * Aeroflex Gaisler GRETH 10/100/1G Ethernet MAC. * * 2005-2010 (c) Aeroflex Gaisler AB * * This driver supports GRETH 10/100 and GRETH 10/100/1G Ethernet MACs * available in the GRLIB VHDL IP core library. * * Full documentation of both cores can be found here: * http://www.gaisler.com/products/grlib/grip.pdf * * The Gigabit version supports scatter/gather DMA, any alignment of * buffers and checksum offloading. * * 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. * * Contributors: Kristoffer Glembo * Daniel Hellstrom * Marko Isomaki */#include <linux/dma-mapping.h>#include <linux/module.h>#include <linux/uaccess.h>#include <linux/init.h>#include <linux/interrupt.h>#include <linux/netdevice.h>#include <linux/etherdevice.h>#include <linux/ethtool.h>#include <linux/skbuff.h>#include <linux/io.h>#include <linux/crc32.h>#include <linux/mii.h>#include <linux/of_device.h>#include <linux/of_platform.h>#include <linux/slab.h>#include <asm/cacheflush.h>#include <asm/byteorder.h>#ifdef CONFIG_SPARC#include <asm/idprom.h>#endif#include"greth.h"#define GRETH_DEF_MSG_ENABLE \ (NETIF_MSG_DRV | \ NETIF_MSG_PROBE | \ NETIF_MSG_LINK | \ NETIF_MSG_IFDOWN | \ NETIF_MSG_IFUP | \ NETIF_MSG_RX_ERR | \ NETIF_MSG_TX_ERR)static int greth_debug = -1;/* -1 == use GRETH_DEF_MSG_ENABLE as value */module_param(greth_debug,int,0);MODULE_PARM_DESC(gre