diff options
author | bde <bde@FreeBSD.org> | 1999-01-16 19:48:01 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1999-01-16 19:48:01 +0000 |
commit | 4c421a34f878bd6571afd4405d4be6d6521ef664 (patch) | |
tree | 33d23b509860d26be40d533242b8818fdba78ef7 /sys/pci | |
parent | 22c5421f9162d04ffc32456dd60c3445f1c7c75f (diff) | |
download | FreeBSD-src-4c421a34f878bd6571afd4405d4be6d6521ef664.zip FreeBSD-src-4c421a34f878bd6571afd4405d4be6d6521ef664.tar.gz |
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.
Diffstat (limited to 'sys/pci')
-rw-r--r-- | sys/pci/ide_pci.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/pci/ide_pci.c b/sys/pci/ide_pci.c index 5a6ad0b..583ecbc 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.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; |