diff options
author | jkh <jkh@FreeBSD.org> | 1996-01-28 20:31:11 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1996-01-28 20:31:11 +0000 |
commit | da1e719a0fc2bcd98548af0330db9bd384d6dbee (patch) | |
tree | 25e71135f6b6b1090b0323438a91026d005aeb8c /sys/pci | |
parent | 3a9c20a29c4fafd2860a78bbe15ef5f05a68ef72 (diff) | |
download | FreeBSD-src-da1e719a0fc2bcd98548af0330db9bd384d6dbee.zip FreeBSD-src-da1e719a0fc2bcd98548af0330db9bd384d6dbee.tar.gz |
3c590 driver for FreeBSD
Submitted by: Frederick Earl Gray <fgray@owlnet.rice.edu>
Diffstat (limited to 'sys/pci')
-rw-r--r-- | sys/pci/if_vx.c | 17 | ||||
-rw-r--r-- | sys/pci/if_vxreg.h | 1 |
2 files changed, 12 insertions, 6 deletions
diff --git a/sys/pci/if_vx.c b/sys/pci/if_vx.c index 5c7b08f..fb9b305 100644 --- a/sys/pci/if_vx.c +++ b/sys/pci/if_vx.c @@ -172,8 +172,9 @@ vx_pci_probe( { if(device_id == 0x590010b7ul) return "3Com 3c590 EtherLink III PCI"; - if(device_id == 0x595010b7ul) - return "3Com 3c595 EtherLink III PCI"; + if(device_id == 0x595010b7ul || device_id == 0x595110b7ul || + device_id == 0x595210b7ul) + return "3Com 3c595 Fast EtherLink III PCI"; return NULL; } @@ -186,7 +187,8 @@ vx_pci_attach( { struct vx_softc *sc; struct ifnet *ifp; - u_short i, j, *p; + u_short i, *p; + u_long j; struct ifaddr *ifa; struct sockaddr_dl *sdl; @@ -206,7 +208,9 @@ vx_pci_attach( sc->vx_connectors = 0; i = pci_conf_read(config_id, 0x48); - j = inw(BASE + VX_W3_INTERNAL_CFG) >> INTERNAL_CONNECTOR_BITS; + GO_WINDOW(3); + j = (inl(BASE + VX_W3_INTERNAL_CFG) & INTERNAL_CONNECTOR_MASK) + >> INTERNAL_CONNECTOR_BITS; if (i & RS_AUI) { printf("aui"); sc->vx_connectors |= AUI; @@ -402,8 +406,9 @@ vxinit(unit) outw(BASE + VX_W4_MEDIA_TYPE, ENABLE_UTP); GO_WINDOW(1); } else { - GO_WINDOW(0); - j = inw(BASE + VX_W3_INTERNAL_CFG) >> INTERNAL_CONNECTOR_BITS; + GO_WINDOW(3); + j = (inl(BASE + VX_W3_INTERNAL_CFG) & INTERNAL_CONNECTOR_MASK) + >> INTERNAL_CONNECTOR_BITS; GO_WINDOW(1); switch(j) { case ACF_CONNECTOR_UTP: diff --git a/sys/pci/if_vxreg.h b/sys/pci/if_vxreg.h index 2f53985..a979564 100644 --- a/sys/pci/if_vxreg.h +++ b/sys/pci/if_vxreg.h @@ -342,6 +342,7 @@ struct vx_softc { #define ACF_CONNECTOR_BNC 3 #define INTERNAL_CONNECTOR_BITS 20 +#define INTERNAL_CONNECTOR_MASK 0x00700000 /* Resource configuration register. * Window 0/Port 08 |