svn commit: r229772 - stable/9/sys/mips/atheros
Adrian Chadd
adrian at FreeBSD.org
Sat Jan 7 12:32:50 UTC 2012
Author: adrian
Date: Sat Jan 7 12:32:50 2012
New Revision: 229772
URL: http://svn.freebsd.org/changeset/base/229772
Log:
MFC r229765 - Fix the ar724x shift calculation when writing to the PCI config space.
Modified:
stable/9/sys/mips/atheros/ar724x_pci.c
Modified: stable/9/sys/mips/atheros/ar724x_pci.c
==============================================================================
--- stable/9/sys/mips/atheros/ar724x_pci.c Sat Jan 7 11:16:23 2012 (r229771)
+++ stable/9/sys/mips/atheros/ar724x_pci.c Sat Jan 7 12:32:50 2012 (r229772)
@@ -93,7 +93,7 @@ ar724x_pci_write(uint32_t reg, uint32_t
uint32_t val, mask, shift;
/* Register access is 32-bit aligned */
- shift = 8 * (offset & (bytes % 4));
+ shift = (offset & 3) * 8;
if (bytes % 4)
mask = (1 << (bytes * 8)) - 1;
else
More information about the svn-src-stable-9
mailing list