Add PCI device-ids to sys/dev/pci/pcidevs for newer Broadcom gigabit

ethernet devices: bcm5714, bcm5752 (previously the 5789, but fvdl
committed that whilst I was musing).

Add definitions to sys/dev/pci/if_bgereg.h for the Broadcom 57xx-family
ASIC revisions on these newer chips.

Add entries to the PCI-device-version and bge-internal-asic-revision
tables in sys/dev/pci/if_bge.c to use these new devices. Pending
further information, follow the lead of FreeBSD's if_bge.c driver and,
pending further info, treat these new chips as we do the 5750.
This commit is contained in:
jonathan 2005-12-07 04:43:05 +00:00
parent fa63539af8
commit cf16a10aad
3 changed files with 35 additions and 5 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_bge.c,v 1.97 2005/12/06 20:56:42 fvdl Exp $ */
/* $NetBSD: if_bge.c,v 1.98 2005/12/07 04:43:05 jonathan Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
@ -79,7 +79,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.97 2005/12/06 20:56:42 fvdl Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.98 2005/12/07 04:43:05 jonathan Exp $");
#include "bpfilter.h"
#include "vlan.h"
@ -2058,7 +2058,20 @@ static const struct bge_revision bge_majorrevs[] = {
{ BGE_ASICREV_BCM5750,
BGE_QUIRK_ONLY_PHY_1|BGE_QUIRK_5705_CORE,
"unknown BCM5750" },
"unknown BCM575x family" },
{ BGE_ASICREV_BCM5714,
BGE_QUIRK_ONLY_PHY_1|BGE_QUIRK_5705_CORE,
"unknown BCM5714" },
{ BGE_ASICREV_BCM5752,
BGE_QUIRK_ONLY_PHY_1|BGE_QUIRK_5705_CORE,
"unknown BCM5752 family" },
{ BGE_ASICREV_BCM5715,
BGE_QUIRK_ONLY_PHY_1|BGE_QUIRK_5705_CORE,
"unknown BCM5715" },
{ 0,
0,
@ -2172,6 +2185,11 @@ static const struct bge_product {
"Broadcom BCM5705M Gigabit Ethernet",
},
{ PCI_VENDOR_BROADCOM,
PCI_PRODUCT_BROADCOM_BCM5714,
"Broadcom BCM5714/5715 Gigabit Ethernet",
},
{ PCI_VENDOR_BROADCOM,
PCI_PRODUCT_BROADCOM_BCM5721,
"Broadcom BCM5721 Gigabit Ethernet",
@ -2197,6 +2215,11 @@ static const struct bge_product {
"Broadcom BCM5751M Gigabit Ethernet",
},
{ PCI_VENDOR_BROADCOM,
PCI_PRODUCT_BROADCOM_BCM5752,
"Broadcom BCM5752 Gigabit Ethernet",
},
{ PCI_VENDOR_BROADCOM,
PCI_PRODUCT_BROADCOM_BCM5782,
"Broadcom BCM5782 Gigabit Ethernet",

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_bgereg.h,v 1.29 2005/11/25 15:30:34 tsutsui Exp $ */
/* $NetBSD: if_bgereg.h,v 1.30 2005/12/07 04:43:05 jonathan Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
* Copyright (c) 1997, 1998, 1999, 2001
@ -258,6 +258,8 @@
#define BGE_CHIPID_BCM5750_A0 0x40000000
#define BGE_CHIPID_BCM5750_A1 0x40010000
#define BGE_CHIPID_BCM5751_A1 0x41010000
#define BGE_CHIPID_BCM5714_A0 0x50000000
#define BGE_CHIPID_BCM5715_xx 0x90010000
/* shorthand one */
#define BGE_ASICREV(x) ((x) >> 28)
@ -267,6 +269,9 @@
#define BGE_ASICREV_BCM5704 0x02
#define BGE_ASICREV_BCM5705 0x03
#define BGE_ASICREV_BCM5750 0x04
#define BGE_ASICREV_BCM5714 0x05
#define BGE_ASICREV_BCM5752 0x06
#define BGE_ASICREV_BCM5715 0x09 /* XXX ??? */
/* chip revisions */
#define BGE_CHIPREV(x) ((x) >> 24)

View File

@ -1,4 +1,4 @@
$NetBSD: pcidevs,v 1.741 2005/12/06 20:54:28 fvdl Exp $
$NetBSD: pcidevs,v 1.742 2005/12/07 04:43:05 jonathan Exp $
/*
* Copyright (c) 1995, 1996 Christopher G. Demetriou
@ -1185,9 +1185,11 @@ product BROADCOM BCM5705 0x1653 BCM5705 10/100/1000 Ethernet
product BROADCOM BCM5705K 0x1654 BCM5705K 10/100/1000 Ethernet
product BROADCOM BCM5705M 0x165d BCM5705M 10/100/1000 Ethernet
product BROADCOM BCM5705_ALT 0x165e BCM5705 10/100/1000 Ethernet
product BROADCOM BCM5714 0x1668 BCM5714C 10/100/1000 Ethernet
product BROADCOM BCM5721 0x1659 BCM5721 10/100/1000 Ethernet
product BROADCOM BCM5750 0x1676 BCM5750 10/100/1000 Ethernet
product BROADCOM BCM5751 0x1677 BCM5751 10/100/1000 Ethernet
product BROADCOM BCM5752 0x1600 BCM5752 10/100/1000 Ethernet
product BROADCOM BCM5750M 0x167c BCM5750M 10/100/1000 Ethernet
product BROADCOM BCM5751M 0x167d BCM5751M 10/100/1000 Ethernet
product BROADCOM BCM5782 0x1696 BCM5782 10/100/1000 Ethernet