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.
This commit is contained in:
parent
c8c827cc94
commit
e0b8bc252f
@ -44,8 +44,8 @@
|
||||
The
|
||||
.Nm
|
||||
driver provides support for PCI ethernet adapters and embedded
|
||||
controllers based on the AMD PCnet/FAST, PCnet/FAST+ and PCnet/Home
|
||||
ethernet controller chips.
|
||||
controllers based on the AMD PCnet/FAST, PCnet/FAST+, PCnet/PRO
|
||||
and PCnet/Home ethernet controller chips.
|
||||
.Pp
|
||||
The PCnet/PCI chips include a 100Mbps ethernet MAC and support
|
||||
both a serial and MII-compliant transceiver interface.
|
||||
|
@ -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. */
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user