Date: Sat, 7 Jan 2012 12:32:50 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r229772 - stable/9/sys/mips/atheros Message-ID: <201201071232.q07CWoSk039681@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201071232.q07CWoSk039681>