Fixed a 1-bit error in initializing UDMA mode for VIA chipsets.

Instead of initializing UDMA mode, we turned it off and made sure that
it stays off by turning on the "UDMA enable by SET FEATURES" disable.

The damage was limited by bugs in cookie lookup, and suitable
initialization by some BIOSes.  The cookie list has slaves before
masters, and the unit number is ignored when cookies are looked up,
so cookie lookup always finds cookies for slaves and the bug only
clobbers slaves, so the bug was harmless for common configurations
with no slaves or only non-UDMA slaves.  UDMA initialization for
masters actually worked if the BIOS turns on the UDMA mode bit and
turns off the "UDMA enable by SET FEATURES" disable.
This commit is contained in:
Bruce Evans 1999-01-16 19:48:01 +00:00
parent 15da947cba
commit 0c63b25bd1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=42736

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.24 1999/01/16 00:36:53 msmith Exp $
* $Id: ide_pci.c,v 1.25 1999/01/16 03:55:46 msmith Exp $
*/
#include "pci.h"
@ -404,7 +404,7 @@ via_571_dmainit(struct ide_pci_cookie *cookie,
/* UDMA enable by SET FEATURES, DMA cycles, cycle time 2T */
mask = 0xe3000000 >> (unitno * 8);
new = 0x80000000 >> (unitno * 8);
new = 0x40000000 >> (unitno * 8);
word50 &= ~mask;
word50 |= new;