Change the default to switch on DMA on ATAPI devices if they can
do UDMA2 (ATA33) mode and beyond.
This commit is contained in:
parent
d064d6db4b
commit
601d3a344e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=132958
@ -84,7 +84,7 @@ int ata_wc = 1;
|
||||
|
||||
/* local vars */
|
||||
static int ata_dma = 1;
|
||||
static int atapi_dma = 0;
|
||||
static int atapi_dma = 1;
|
||||
|
||||
/* sysctl vars */
|
||||
SYSCTL_NODE(_hw, OID_AUTO, ata, CTLFLAG_RD, 0, "ATA driver parameters");
|
||||
@ -682,7 +682,8 @@ ata_identify_devices(struct ata_channel *ch)
|
||||
if (ch->device[MASTER].param) {
|
||||
ch->device[MASTER].setmode(&ch->device[MASTER], ATA_PIO_MAX);
|
||||
if ((((ch->devices & ATA_ATAPI_MASTER) && atapi_dma &&
|
||||
(ch->device[MASTER].param->config&ATA_DRQ_MASK) != ATA_DRQ_INTR)||
|
||||
(ch->device[MASTER].param->config&ATA_DRQ_MASK) != ATA_DRQ_INTR &&
|
||||
ata_umode(ch->device[MASTER].param) >= ATA_UDMA2) ||
|
||||
((ch->devices & ATA_ATA_MASTER) && ata_dma)) && ch->dma)
|
||||
ch->device[MASTER].setmode(&ch->device[MASTER], ATA_DMA_MAX);
|
||||
|
||||
@ -690,7 +691,8 @@ ata_identify_devices(struct ata_channel *ch)
|
||||
if (ch->device[SLAVE].param) {
|
||||
ch->device[SLAVE].setmode(&ch->device[SLAVE], ATA_PIO_MAX);
|
||||
if ((((ch->devices & ATA_ATAPI_SLAVE) && atapi_dma &&
|
||||
(ch->device[SLAVE].param->config&ATA_DRQ_MASK) != ATA_DRQ_INTR) ||
|
||||
(ch->device[SLAVE].param->config&ATA_DRQ_MASK) != ATA_DRQ_INTR &&
|
||||
ata_umode(ch->device[SLAVE].param) >= ATA_UDMA2) ||
|
||||
((ch->devices & ATA_ATA_SLAVE) && ata_dma)) && ch->dma)
|
||||
ch->device[SLAVE].setmode(&ch->device[SLAVE], ATA_DMA_MAX);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user