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 <cgull@smoke.marlboro.vt.us>) on 7 Feb 1998
This commit is contained in:
Bruce Evans 1999-01-17 05:18:54 +00:00
parent f10d3a9382
commit 0abd520152
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=42742

View File

@ -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;