disable (U)DMA for ATAPI on aceride(4), the chip doesn't support it
PR port-sparc64/55540
This commit is contained in:
parent
374368e991
commit
7919cd9239
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: aceride.c,v 1.37 2017/07/21 21:01:13 nakayama Exp $ */
|
||||
/* $NetBSD: aceride.c,v 1.38 2020/12/20 19:30:03 jdolecek Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999, 2000, 2001 Manuel Bouyer.
|
||||
@ -25,7 +25,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: aceride.c,v 1.37 2017/07/21 21:01:13 nakayama Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: aceride.c,v 1.38 2020/12/20 19:30:03 jdolecek Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -298,6 +298,13 @@ acer_setup_channel(struct ata_channel *chp)
|
||||
ACER_UDMA_EN(chp->ch_channel, drive) |
|
||||
ACER_UDMA_TIM(chp->ch_channel, drive, 0x7));
|
||||
|
||||
/* (U)DMA doesn't work with ATAPI devices */
|
||||
if (drvp->drive_type == ATA_DRIVET_ATAPI) {
|
||||
s = splbio();
|
||||
drvp->drive_flags &= ~(ATA_DRIVE_DMA|ATA_DRIVE_UDMA);
|
||||
splx(s);
|
||||
}
|
||||
|
||||
/* add timing values, setup DMA if needed */
|
||||
if ((drvp->drive_flags & ATA_DRIVE_DMA) == 0 &&
|
||||
(drvp->drive_flags & ATA_DRIVE_UDMA) == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user