aboutsummaryrefslogtreecommitdiff
path: root/sys/pci/if_vr.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/pci/if_vr.c')
-rw-r--r--sys/pci/if_vr.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/pci/if_vr.c b/sys/pci/if_vr.c
index e82b6c7f5b6b..81e00b520445 100644
--- a/sys/pci/if_vr.c
+++ b/sys/pci/if_vr.c
@@ -602,8 +602,15 @@ vr_reset(sc)
if (!(CSR_READ_2(sc, VR_COMMAND) & VR_CMD_RESET))
break;
}
- if (i == VR_TIMEOUT)
- printf("vr%d: reset never completed!\n", sc->vr_unit);
+ if (i == VR_TIMEOUT) {
+ if (sc->vr_revid < REV_ID_VT3065_A)
+ printf("vr%d: reset never completed!\n", sc->vr_unit);
+ else {
+ /* Use newer force reset command */
+ printf("vr%d: Using force reset command.\n", sc->vr_unit);
+ VR_SETBIT(sc, VR_MISC_CR1, VR_MISCCR1_FORSRST);
+ }
+ }
/* Wait a little while for the chip to get its brains in order. */
DELAY(1000);
@@ -688,6 +695,7 @@ vr_attach(dev)
pci_enable_io(dev, SYS_RES_IOPORT);
pci_enable_io(dev, SYS_RES_MEMORY);
command = pci_read_config(dev, PCIR_COMMAND, 4);
+ sc->vr_revid = pci_read_config(dev, VR_PCI_REVID, 4) & 0x000000FF;
#ifdef VR_USEIOSPACE
if (!(command & PCIM_CMD_PORTEN)) {