patch-2.3.15 linux/drivers/net/acenic.c
Next file: linux/drivers/net/acenic_firmware.h
Previous file: linux/drivers/net/a2065.h
Back to the patch index
Back to the overall index
- Lines: 116
- Date:
Mon Aug 23 10:12:37 1999
- Orig file:
v2.3.14/linux/drivers/net/acenic.c
- Orig date:
Wed Aug 18 11:36:41 1999
diff -u --recursive --new-file v2.3.14/linux/drivers/net/acenic.c linux/drivers/net/acenic.c
@@ -2,7 +2,7 @@
* acenic.c: Linux driver for the Alteon AceNIC Gigabit Ethernet card
* and other Tigon based cards.
*
- * Copyright 1998 by Jes Sorensen, <Jes.Sorensen@cern.ch>.
+ * Copyright 1998, 1999 by Jes Sorensen, <Jes.Sorensen@cern.ch>.
*
* Thanks to Alteon and 3Com for providing hardware and documentation
* enabling me to write this driver.
@@ -67,6 +67,15 @@
#define PCI_VENDOR_ID_NETGEAR 0x1385
#define PCI_DEVICE_ID_NETGEAR_GA620 0x620a
#endif
+/*
+ * They used the DEC vendor ID by mistake
+ */
+#ifndef PCI_DEVICE_ID_FARALLON_PN9000SX
+#define PCI_DEVICE_ID_FARALLON_PN9000SX 0x1a
+#endif
+#ifndef PCI_VENDOR_ID_SGI_ACENIC
+#define PCI_DEVICE_ID_SGI_ACENIC 0x0009
+#endif
/*
* This driver currently supports Tigon I and Tigon II based cards
@@ -156,10 +165,10 @@
* Default values for tuning parameters
*/
#define DEF_TX_RATIO 31
-#define DEF_TX_COAL TICKS_PER_SEC / 500
-#define DEF_TX_MAX_DESC 7
-#define DEF_RX_COAL TICKS_PER_SEC / 10000
-#define DEF_RX_MAX_DESC 2
+#define DEF_TX_COAL 1000
+#define DEF_TX_MAX_DESC 40
+#define DEF_RX_COAL 1000
+#define DEF_RX_MAX_DESC 20
#define DEF_TRACE 0
#define DEF_STAT 2 * TICKS_PER_SEC
@@ -171,7 +180,7 @@
static int max_rx_desc[8] = {0, };
static int tx_ratio[8] = {0, };
-static const char __initdata *version = "acenic.c: v0.32 03/15/99 Jes Sorensen (Jes.Sorensen@cern.ch)\n";
+static const char __initdata *version = "acenic.c: v0.33a 08/16/99 Jes Sorensen (Jes.Sorensen@cern.ch)\n";
static struct net_device *root_dev = NULL;
@@ -208,7 +217,15 @@
!((pdev->vendor == PCI_VENDOR_ID_3COM) &&
(pdev->device == PCI_DEVICE_ID_3COM_3C985)) &&
!((pdev->vendor == PCI_VENDOR_ID_NETGEAR) &&
- (pdev->device == PCI_DEVICE_ID_NETGEAR_GA620)))
+ (pdev->device == PCI_DEVICE_ID_NETGEAR_GA620)) &&
+ /*
+ * Farallon used the DEC vendor ID on their cards by
+ * mistake for a while
+ */
+ !((pdev->vendor == PCI_VENDOR_ID_DEC) &&
+ (pdev->device == PCI_DEVICE_ID_FARALLON_PN9000SX)) &&
+ !((pdev->vendor == PCI_VENDOR_ID_SGI) &&
+ (pdev->device == PCI_DEVICE_ID_SGI_ACENIC)))
continue;
dev = init_etherdev(dev, sizeof(struct ace_private));
@@ -282,6 +299,18 @@
sprintf(ap->name, "NetGear GA620 Gigabit Ethernet");
printk(KERN_INFO "%s: NetGear GA620 ", dev->name);
break;
+ case PCI_VENDOR_ID_DEC:
+ if (pdev->device == PCI_DEVICE_ID_FARALLON_PN9000SX) {
+ sprintf(ap->name, "Farallon PN9000-SX "
+ "Gigabit Ethernet");
+ printk(KERN_INFO "%s: Farallon PN9000-SX ",
+ dev->name);
+ break;
+ }
+ case PCI_VENDOR_ID_SGI:
+ sprintf(ap->name, "SGI AceNIC Gigabit Ethernet");
+ printk(KERN_INFO "%s: SGI AceNIC ", dev->name);
+ break;
default:
sprintf(ap->name, "Unknown AceNIC based Gigabit Ethernet");
printk(KERN_INFO "%s: Unknown AceNIC ", dev->name);
@@ -569,7 +598,7 @@
* and the control blocks for the transmit and receive rings
* as they need to be setup once and for all.
*/
- if (!(info = kmalloc(sizeof(struct ace_info), GFP_KERNEL | GFP_DMA))){
+ if (!(info = kmalloc(sizeof(struct ace_info), GFP_KERNEL))){
free_irq(dev->irq, dev);
return -EAGAIN;
}
@@ -1162,6 +1191,12 @@
skb->dev = dev;
skb->protocol = eth_type_trans(skb, dev);
+#if 0
+ /*
+ * This was never actually enabled in the RX descriptors
+ * anyway - it requires a bit more testing before enabling
+ * it again.
+ */
/*
* If the checksum is correct and this is not a
* fragment, tell the stack that the data is correct.
@@ -1172,7 +1207,7 @@
skb->ip_summed = CHECKSUM_UNNECESSARY;
else
skb->ip_summed = CHECKSUM_NONE;
-
+#endif
netif_rx(skb); /* send it up */
ap->stats.rx_packets++;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)