Date: Sun, 2 Apr 2006 08:19:31 GMT From: John-Mark Gurney <jmg@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 94453 for review Message-ID: <200604020819.k328JUQn021184@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=94453 Change 94453 by jmg@jmg_carbon-60 on 2006/04/02 08:19:24 remove the enum size stuff, turned out that wasn't a good idea.. Affected files ... .. //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/hv_pci.c#10 edit Differences ... ==== //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/hv_pci.c#10 (text+ko) ==== @@ -157,29 +157,14 @@ int width) { struct hvpci_softc *sc; - pci_config_size_t size; uint32_t data; uint32_t ret; int r; sc = device_get_softc(dev); - switch (width) { - case 1: - size = PCI_CFG_SIZE_BYTE; - break; - case 2: - size = PCI_CFG_SIZE_WORD; - break; - case 4: - size = PCI_CFG_SIZE_DWORD; - break; - default: - panic("unsupported width: %d", width); - } - r = hvio_config_get(sc->hs_devhandle, HVPCI_BDF(bus, slot, func), - reg, size, &data); + reg, width, &data); printf("%d = read_config(%#x, %#x, %d, %d) = %#x\n", r, sc->hs_devhandle, HVPCI_BDF(bus, slot, func), reg, width, data); @@ -212,7 +197,6 @@ uint32_t val, int width) { struct hvpci_softc *sc; - pci_config_size_t size; uint32_t data; uint32_t err_flags; @@ -220,15 +204,12 @@ switch (width) { case 1: - size = PCI_CFG_SIZE_BYTE; *(uint8_t *)&data = val; break; case 2: - size = PCI_CFG_SIZE_WORD; *(uint16_t *)&data = val; break; case 4: - size = PCI_CFG_SIZE_DWORD; data = val; break; default: @@ -236,7 +217,7 @@ } hvio_config_put(sc->hs_devhandle, HVPCI_BDF(bus, slot, func), reg, - size, data, &err_flags); + width, data, &err_flags); } #ifdef notyet
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604020819.k328JUQn021184>