From 0abd5201528f0cceabc5b42ce649cc1ccc049d59 Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Sun, 17 Jan 1999 05:18:54 +0000 Subject: [PATCH] Fixed a 2-bit error in initializing MWDMA mode for VIA chipsets. Prefetch/postwrite was enabled for the wrong controller. (VIA is bitwise big endian and we confused ourself by shifting left instead of right.) Extracted from: last set of patches from the author (john hood ) on 7 Feb 1998 --- sys/pci/ide_pci.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/pci/ide_pci.c b/sys/pci/ide_pci.c index 583ecbc00a5a..099aed4628ec 100644 --- a/sys/pci/ide_pci.c +++ b/sys/pci/ide_pci.c @@ -26,7 +26,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ide_pci.c,v 1.25 1999/01/16 03:55:46 msmith Exp $ + * $Id: ide_pci.c,v 1.26 1999/01/16 19:48:01 bde Exp $ */ #include "pci.h" @@ -452,8 +452,7 @@ via_571_dmainit(struct ide_pci_cookie *cookie, * enable prefetch/postwrite-- XXX may cause problems * with CD-ROMs? */ - workword &= ~(3 << (cookie->ctlr * 2 + 12)); - workword |= 3 << (cookie->ctlr * 2 + 12); + workword |= 0xc000 >> (cookie->ctlr * 2); /* FIFO configurations-- equal split, threshold 1/2 */ workword &= 0x90ffffff;