aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2002-11-27 07:04:10 +0000
committerWarner Losh <imp@FreeBSD.org>2002-11-27 07:04:10 +0000
commite7b01d072749777c4d94e71f6231c4861857af3e (patch)
tree9a772503fa7ca5f10363710021c5b4a5fd4f6e6d
parentfbe9cff1126706cdcbba767a29814b2eb4083625 (diff)
Notes
-rw-r--r--sys/dev/dc/if_dc.c10
-rw-r--r--sys/pci/if_dc.c10
2 files changed, 16 insertions, 4 deletions
diff --git a/sys/dev/dc/if_dc.c b/sys/dev/dc/if_dc.c
index 6b2d86c0cf21..d1355584b478 100644
--- a/sys/dev/dc/if_dc.c
+++ b/sys/dev/dc/if_dc.c
@@ -1901,6 +1901,7 @@ dc_attach(dev)
struct ifnet *ifp;
u_int32_t revision;
int unit, error = 0, rid, mac_offset;
+ u_int8_t *mac;
sc = device_get_softc(dev);
unit = device_get_unit(dev);
@@ -2078,7 +2079,6 @@ dc_attach(dev)
* The DC_TX_COALESCE flag is required.
*/
sc->dc_pmode = DC_PMODE_MII;
- /* XXX Call the cardbus function to get nic from the CIS */
break;
case DC_DEVICEID_RS7112:
sc->dc_type = DC_TYPE_CONEXANT;
@@ -2158,7 +2158,13 @@ dc_attach(dev)
bcopy(sc->dc_srom + DC_CONEXANT_EE_NODEADDR, &eaddr, 6);
break;
case DC_TYPE_XIRCOM:
-
+ /* The MAC comes from the CIS */
+ mac = pci_get_ether(dev);
+ if (!mac) {
+ device_printf(dev, "No station address in CIS!\n");
+ goto fail;
+ }
+ bcopy(mac, eaddr, ETHER_ADDR_LEN);
break;
default:
dc_read_eeprom(sc, (caddr_t)&eaddr, DC_EE_NODEADDR, 3, 0);
diff --git a/sys/pci/if_dc.c b/sys/pci/if_dc.c
index 6b2d86c0cf21..d1355584b478 100644
--- a/sys/pci/if_dc.c
+++ b/sys/pci/if_dc.c
@@ -1901,6 +1901,7 @@ dc_attach(dev)
struct ifnet *ifp;
u_int32_t revision;
int unit, error = 0, rid, mac_offset;
+ u_int8_t *mac;
sc = device_get_softc(dev);
unit = device_get_unit(dev);
@@ -2078,7 +2079,6 @@ dc_attach(dev)
* The DC_TX_COALESCE flag is required.
*/
sc->dc_pmode = DC_PMODE_MII;
- /* XXX Call the cardbus function to get nic from the CIS */
break;
case DC_DEVICEID_RS7112:
sc->dc_type = DC_TYPE_CONEXANT;
@@ -2158,7 +2158,13 @@ dc_attach(dev)
bcopy(sc->dc_srom + DC_CONEXANT_EE_NODEADDR, &eaddr, 6);
break;
case DC_TYPE_XIRCOM:
-
+ /* The MAC comes from the CIS */
+ mac = pci_get_ether(dev);
+ if (!mac) {
+ device_printf(dev, "No station address in CIS!\n");
+ goto fail;
+ }
+ bcopy(mac, eaddr, ETHER_ADDR_LEN);
break;
default:
dc_read_eeprom(sc, (caddr_t)&eaddr, DC_EE_NODEADDR, 3, 0);