Date: Thu, 23 Aug 2007 19:27:30 GMT From: Peter Wemm <peter@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 125593 for review Message-ID: <200708231927.l7NJRUuU054118@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=125593 Change 125593 by peter@peter_overcee on 2007/08/23 19:27:17 Actually change the PLX register to the good value. Affected files ... .. //depot/projects/hammer/sys/dev/si/si_pci.c#9 edit Differences ... ==== //depot/projects/hammer/sys/dev/si/si_pci.c#9 (text+ko) ==== @@ -106,16 +106,24 @@ } if (pci_get_devid(dev) == 0x200011cb) { + int rid; + struct resource *plx_res; + uint32_t *addr; + uint32_t oldvalue; + /* Perform a PLX control register fixup */ - int rid = PCIR_BAR(0); - plx_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, - &rid, RF_ACTIVE); + rid = PCIR_BAR(0); + plx_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE); if (plx_res == NULL) { device_printf(dev, "couldn't map plx registers\n"); } else { - uint32_t *maddr; addr = rman_get_virtual(plx_res); - device_printf(dev, "PLX register 0x50: 0x%08x\n", addr[0x50 / 4]); + oldvalue = addr[0x50 / 4]; + if (oldvalue != 0x18260000) { + device_printf(dev, "PLX register 0x50: 0x%08x changed to 0x%08x\n", oldvalue, 0x18260000); + addr[0x50 / 4] = 0x18260000; + } bus_release_resource(dev, SYS_RES_MEMORY, rid, plx_res); } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200708231927.l7NJRUuU054118>