summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>2000-10-03 18:11:36 +0000
committerwpaul <wpaul@FreeBSD.org>2000-10-03 18:11:36 +0000
commitc9ba51721d535762e8575c00ae2fa0ffe7d9d6c9 (patch)
treec7a12088b11f66126cb6cd480d10395266b21adb /sys
parentdddf40beaa3d682895e990fc971e648e654774fb (diff)
downloadFreeBSD-src-c9ba51721d535762e8575c00ae2fa0ffe7d9d6c9.zip
FreeBSD-src-c9ba51721d535762e8575c00ae2fa0ffe7d9d6c9.tar.gz
Add support for the AMD Am79c976 PCnet/PRO controller chip. For now
this just involves adding the chip ID to the supported list: the PCnet/PRO is compatible with the PCnet/FAST+ and friends and should "just work" with this driver. Also try to handle mbuf allocation failures in the receive handler more gracefully.
Diffstat (limited to 'sys')
-rw-r--r--sys/pci/if_pcn.c10
-rw-r--r--sys/pci/if_pcnreg.h14
2 files changed, 10 insertions, 14 deletions
diff --git a/sys/pci/if_pcn.c b/sys/pci/if_pcn.c
index 1bfcbed..a2eb8ef 100644
--- a/sys/pci/if_pcn.c
+++ b/sys/pci/if_pcn.c
@@ -410,6 +410,7 @@ static int pcn_probe(dev)
case Am79C971:
case Am79C972:
case Am79C973:
+ case Am79C976:
case Am79C978:
break;
default:
@@ -761,7 +762,14 @@ static void pcn_rxeof(sc)
continue;
}
- pcn_newbuf(sc, i, NULL);
+ if (pcn_newbuf(sc, i, NULL)) {
+ /* Ran out of mbufs; recycle this one. */
+ pcn_newbuf(sc, i, m);
+ ifp->if_ierrors++;
+ PCN_INC(i, PCN_RX_LIST_CNT);
+ continue;
+ }
+
PCN_INC(i, PCN_RX_LIST_CNT);
/* No errors; receive the packet. */
diff --git a/sys/pci/if_pcnreg.h b/sys/pci/if_pcnreg.h
index dc234b6..0b0a79a 100644
--- a/sys/pci/if_pcnreg.h
+++ b/sys/pci/if_pcnreg.h
@@ -212,19 +212,6 @@
/*
* Chip ID values.
*/
-/* Chip types */
-#define LANCE 1 /* Am7990 */
-#define C_LANCE 2 /* Am79C90 */
-#define PCnet_ISA 3 /* Am79C960 */
-#define PCnet_ISAplus 4 /* Am79C961 */
-#define PCnet_ISA_II 5 /* Am79C961A */
-#define PCnet_32 6 /* Am79C965 */
-#define PCnet_PCI 7 /* Am79C970 */
-#define PCnet_PCI_II 8 /* Am79C970A */
-#define PCnet_FAST 9 /* Am79C971 */
-#define PCnet_FASTplus 10 /* Am79C972 */
-#define PCnet_Home 11 /* Am79C978 */
-
/* CSR88-89: Chip ID masks */
#define AMD_MASK 0x003
#define PART_MASK 0xffff
@@ -238,6 +225,7 @@
#define Am79C972 0x2624
#define Am79C973 0x2625
#define Am79C978 0x2626
+#define Am79C976 0x2628
/*
* Advanced feature control (CSR122)
OpenPOWER on IntegriCloud