--- /dev/null
+/*\r
+ *\r
+ * ipg.h\r
+ *\r
+ * Include file for Gigabit Ethernet device driver for Network\r
+ * Interface Cards (NICs) utilizing the Tamarack Microelectronics\r
+ * Inc. IPG Gigabit or Triple Speed Ethernet Media Access\r
+ * Controller.\r
+ *\r
+ * Craig Rich\r
+ * Sundance Technology, Inc.\r
+ * 1485 Saratoga Avenue\r
+ * Suite 200\r
+ * San Jose, CA 95129\r
+ * 408 873 4117\r
+ * www.sundanceti.com\r
+ * craig_rich@sundanceti.com\r
+ *\r
+ * Rev Date Description\r
+ * --------------------------------------------------------------\r
+ * 0.1 11/8/99 Initial revision work begins\r
+ *\r
+ * 0.2 12/1/99 Minor update to modversions.h inclusion.\r
+ *\r
+ * 0.3 12/30/99 Updates to fully comply with IPG spec.\r
+ *\r
+ * 0.4 4/24/00 Updates to allow for removal of FCS generation\r
+ * and verification.\r
+ * 0.5 8/15/00 Updates for MII PHY registers and fields.\r
+ *\r
+ * 0.6 8/31/00 Updates to change to using 64 bit data types\r
+ *\r
+ * 0.7 10/31/00 Added DDEBUG_MSG to allow for easy activation of\r
+ * individual DEBUG_MSGs.\r
+ *\r
+ * 0.8 11/06/00 Changed LastFreedRxBuff to LastRestoredRxBuff for\r
+ * clarity.\r
+ *\r
+ * 0.9 11/10/00 Changed Sundance DeviceID to 0x9020\r
+ *\r
+ * 0.10 2/14/01 Changed "DROP_ON_ERRORS", breaking out Ethernet from\r
+ * TCP/IP errors.\r
+ *\r
+ * 0.11 3/16/01 Changed "IPG_FRAMESBETWEENTXCOMPLETES" to\r
+ * "IPG_FRAMESBETWEENTXDMACOMPLETES" since will\r
+ * be using TxDMAIndicate instead of TxIndicate to\r
+ * improve performance. Added TFDunavailCount and\r
+ * RFDlistendCount to aid in performance improvement.\r
+ *\r
+ * 0.12 3/22/01 Removed IPG_DROP_ON_RX_TCPIP_ERRORS.\r
+ *\r
+ * 0.13 3/23/01 Removed IPG_TXQUEUE_MARGIN.\r
+ *\r
+ * 0.14 3/30/01 Broke out sections into multiple files and added\r
+ * OS version specific detection and settings.\r
+ */\r
+\r
+\r
+/*\r
+ * Linux header utilization:\r
+ *\r
+ * config.h For PCI support, namely CONFIG_PCI macro.\r
+ *\r
+ * version.h For Linux kernel version detection.\r
+ *\r
+ * module.h For modularized driver support.\r
+ *\r
+ * kernel.h For 'printk'.\r
+ *\r
+ * pci.h PCI support, including ID, VENDOR, and CLASS\r
+ * standard definitions; PCI specific structures,\r
+ * including pci_dev struct.\r
+ *\r
+ * ioport.h I/O ports, check_region, request_region,\r
+ * release_region.\r
+ *\r
+ * errno.h Standard error numbers, e.g. ENODEV.\r
+ *\r
+ * asm/io.h For reading/writing I/O ports, and for virt_to_bus\r
+ * function.\r
+ *\r
+ * delay.h For milisecond delays.\r
+ *\r
+ * types.h For specific typedefs (i.e. u32, u16, u8).\r
+ *\r
+ * netdevice.h For device structure needed for network support.\r
+ *\r
+ * etherdevice.h For ethernet device support.\r
+ *\r
+ * init.h For __initfunc.\r
+ *\r
+ * skbuff.h Socket buffer (skbuff) definition.\r
+ *\r
+ * asm/bitops.h For test_and_set_bit, clear_bit functions.\r
+ *\r
+ * asm/spinlock.h For spin_lock_irqsave, spin_lock_irqrestore functions.\r
+ *\r
+ */\r
+\r
+\r
+#include <linux/config.h>\r
+#include <linux/version.h>\r
+#include <linux/module.h>\r
+\r
+#if ((LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0)) && defined(MODVERSIONS))\r
+ #include <linux/modversions.h>\r
+#endif\r
+\r
+#include <linux/kernel.h>\r
+#include <linux/pci.h>\r
+#include <linux/ioport.h>\r
+#include <linux/errno.h>\r
+#include <asm/io.h>\r
+#include <linux/delay.h>\r
+#include <linux/types.h>\r
+#include <linux/netdevice.h>\r
+#include <linux/etherdevice.h>\r
+#include <linux/init.h>\r
+#include <linux/skbuff.h>\r
+#include <linux/version.h>\r
+#include <asm/bitops.h>\r
+/*#include <asm/spinlock.h>*/\r
+\r
+#define DrvVer "2.09d"\r
+\r
+const char *version =\r
+"ipg : "DrvVer" Written by Craig Rich, www.sundanceti.com\n";\r
+\r
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,0))\r
+ char kernel_version[] = UTS_RELEASE;\r
+#endif\r
+\r
+#if (defined(MODULE) && (LINUX_VERSION_CODE > KERNEL_VERSION(2,1,15)))\r
+ MODULE_AUTHOR("IC Plus Corp. 2003 ");\r
+ MODULE_DESCRIPTION("IC Plus IP1000 Gigabit Ethernet Adapter Linux Driver "DrvVer);\r
+#endif\r
+\r
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0))\r
+ #define IPG_LINUX2_2\r
+ #undef IPG_LINUX2_4\r
+\r
+ #define IPG_DEV_KFREE_SKB(skb) dev_kfree_skb(skb)\r
+\r
+ #define IPG_HOST2BUS_MAP(addr) virt_to_bus(addr)\r
+\r
+ #define IPG_PCI_RESOURCE_START(dev, bar) dev->base_address[bar]\r
+\r
+ #define IPG_TX_NOTBUSY(dev) clear_bit(0,(void*)&dev->tbusy)\r
+ #define IPG_IS_TX_BUSY(dev) test_and_set_bit(0, (void*)&dev->tbusy)\r
+\r
+ #define IPG_DEVICE_TYPE struct device\r
+ #define IPG_STATS_TYPE struct enet_statistics\r
+#else\r
+ #undef IPG_LINUX2_2\r
+ #define IPG_LINUX2_4\r
+\r
+ #define IPG_DEV_KFREE_SKB(skb) dev_kfree_skb_irq(skb)\r
+\r
+ #define IPG_HOST2BUS_MAP(addr) addr\r
+\r
+ #define IPG_PCI_RESOURCE_START(dev, bar) dev->resource[bar].start\r
+\r
+ #define IPG_TX_NOTBUSY(dev) netif_wake_queue(dev)\r
+ #define IPG_IS_TX_BUSY(dev) netif_queue_stopped(dev)\r
+\r
+ #define IPG_DEVICE_TYPE struct net_device\r
+ #define IPG_STATS_TYPE struct net_device_stats\r
+#endif\r
+\r
+/* Order of the following includes is important, the following must\r
+ * appear first:\r
+ * ipg_constants.h\r
+ * ipg_tune.h\r
+ */\r
+#include "ipg_constants.h"\r
+#include "ipg_tune.h"\r
+#include "ipg_macros.h"\r
+#include "ipg_structs.h"\r
+#include "PhyParam.h"\r
+\r
+/* end ipg.h */\r