diff options
author | wpaul <wpaul@FreeBSD.org> | 2000-10-03 18:11:36 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 2000-10-03 18:11:36 +0000 |
commit | c9ba51721d535762e8575c00ae2fa0ffe7d9d6c9 (patch) | |
tree | c7a12088b11f66126cb6cd480d10395266b21adb /sys/pci/if_pcn.c | |
parent | dddf40beaa3d682895e990fc971e648e654774fb (diff) | |
download | FreeBSD-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/pci/if_pcn.c')
-rw-r--r-- | sys/pci/if_pcn.c | 10 |
1 files changed, 9 insertions, 1 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. */ |