From 95771ee153fc60e2025cf02b022fc75928ce33ec Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Mon, 26 Nov 2007 15:56:00 +0000 Subject: Avoid resetting PCS. Don't do loopback at the serial link. --- sys/dev/pci/if_cas.c | 9 +++------ sys/dev/pci/if_casreg.h | 3 ++- 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/pci/if_cas.c b/sys/dev/pci/if_cas.c index 292edd72648..522eb6193ab 100644 --- a/sys/dev/pci/if_cas.c +++ b/sys/dev/pci/if_cas.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_cas.c,v 1.10 2007/11/26 15:36:22 kettenis Exp $ */ +/* $OpenBSD: if_cas.c,v 1.11 2007/11/26 15:55:59 kettenis Exp $ */ /* * @@ -522,10 +522,6 @@ cas_config(struct cas_softc *sc) bus_space_write_4(sc->sc_memt, sc->sc_memh, CAS_MII_DATAPATH_MODE, CAS_MII_DATAPATH_SERDES); - bus_space_write_4(sc->sc_memt, sc->sc_memh, - CAS_MII_SLINK_CONTROL, - CAS_MII_SLINK_LOOPBACK|CAS_MII_SLINK_EN_SYNC_D); - bus_space_write_4(sc->sc_memt, sc->sc_memh, CAS_MII_CONFIG, CAS_MII_CONFIG_ENABLE); @@ -672,7 +668,8 @@ cas_reset(struct cas_softc *sc) cas_reset_tx(sc); /* Do a full reset */ - bus_space_write_4(t, h, CAS_RESET, CAS_RESET_RX|CAS_RESET_TX); + bus_space_write_4(t, h, CAS_RESET, + CAS_RESET_RX | CAS_RESET_TX | CAS_RESET_BLOCK_PCS); if (!cas_bitwait(sc, h, CAS_RESET, CAS_RESET_RX | CAS_RESET_TX, 0)) printf("%s: cannot reset device\n", sc->sc_dev.dv_xname); splx(s); diff --git a/sys/dev/pci/if_casreg.h b/sys/dev/pci/if_casreg.h index 929112045bf..16e6fc0462b 100644 --- a/sys/dev/pci/if_casreg.h +++ b/sys/dev/pci/if_casreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_casreg.h,v 1.7 2007/11/26 15:24:35 kettenis Exp $ */ +/* $OpenBSD: if_casreg.h,v 1.8 2007/11/26 15:55:59 kettenis Exp $ */ /* * @@ -113,6 +113,7 @@ #define CAS_RESET_TX 0x000000001 /* Reset TX half */ #define CAS_RESET_RX 0x000000002 /* Reset RX half */ #define CAS_RESET_RSTOUT 0x000000004 /* Force PCI RSTOUT# */ +#define CAS_RESET_BLOCK_PCS 0x00000008 /* Block PCS reset */ /* TX DMA registers */ #define CAS_TX_CONFIG 0x2004 -- cgit v1.2.3