From ccad98c30fbc520241547f7020324b5446981d6e Mon Sep 17 00:00:00 2001 From: Chris Cappuccio Date: Tue, 11 Jan 2000 01:14:53 +0000 Subject: use PCI_REVISION macro --- sys/dev/pci/pciide.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sys/dev/pci') diff --git a/sys/dev/pci/pciide.c b/sys/dev/pci/pciide.c index b21751f9117..5d9f67cc935 100644 --- a/sys/dev/pci/pciide.c +++ b/sys/dev/pci/pciide.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pciide.c,v 1.17 2000/01/10 23:28:35 chris Exp $ */ +/* $OpenBSD: pciide.c,v 1.18 2000/01/11 01:14:52 chris Exp $ */ /* $NetBSD: pciide.c,v 1.48 1999/11/28 20:05:18 bouyer Exp $ */ /* @@ -2184,12 +2184,15 @@ sis_chip_map(sc, pa) { struct pciide_channel *cp; int channel; - u_int32_t rev; u_int8_t sis_ctr0 = pciide_pci_read(sc->sc_pc, sc->sc_tag, SIS_CTRL0); pcireg_t interface = PCI_INTERFACE(pci_conf_read(sc->sc_pc, sc->sc_tag, PCI_CLASS_REG)); + pcireg_t rev = PCI_REVISION(pci_conf_read(sc->sc_pc, sc->sc_tag, + PCI_CLASS_REG)); bus_size_t cmdsize, ctlsize; + printf("\nrevision: i:%i h:%x i:%i h:%x i:%i h:%x\n",rev,rev,interface,interface,interface & PCI_REVISION_MASK, interface & PCI_REVISION_MASK); + if (pciide_chipen(sc, pa) == 0) return; @@ -2203,10 +2206,7 @@ sis_chip_map(sc, pa) WDC_CAPABILITY_MODE; sc->sc_wdcdev.PIO_cap = 4; sc->sc_wdcdev.DMA_cap = 2; - - rev = pci_conf_read(sc->sc_pc, sc->sc_tag, PCI_CLASS_REG) & PCI_REVISION_MASK; sc->sc_wdcdev.UDMA_cap = (rev >= 0xd0) ? 2 : 0; - sc->sc_wdcdev.set_modes = sis_setup_channel; sc->sc_wdcdev.channels = sc->wdc_chanarray; sc->sc_wdcdev.nchannels = PCIIDE_NUM_CHANNELS; -- cgit v1.2.3