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
ef9866e04f
commit
12d6bd3743
@ -84,7 +84,7 @@ int ata_wc = 1;
|
|||||||
|
|
||||||
/* local vars */
|
/* local vars */
|
||||||
static int ata_dma = 1;
|
static int ata_dma = 1;
|
||||||
static int atapi_dma = 0;
|
static int atapi_dma = 1;
|
||||||
|
|
||||||
/* sysctl vars */
|
/* sysctl vars */
|
||||||
SYSCTL_NODE(_hw, OID_AUTO, ata, CTLFLAG_RD, 0, "ATA driver parameters");
|
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) {
|
if (ch->device[MASTER].param) {
|
||||||
ch->device[MASTER].setmode(&ch->device[MASTER], ATA_PIO_MAX);
|
ch->device[MASTER].setmode(&ch->device[MASTER], ATA_PIO_MAX);
|
||||||
if ((((ch->devices & ATA_ATAPI_MASTER) && atapi_dma &&
|
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->devices & ATA_ATA_MASTER) && ata_dma)) && ch->dma)
|
||||||
ch->device[MASTER].setmode(&ch->device[MASTER], ATA_DMA_MAX);
|
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) {
|
if (ch->device[SLAVE].param) {
|
||||||
ch->device[SLAVE].setmode(&ch->device[SLAVE], ATA_PIO_MAX);
|
ch->device[SLAVE].setmode(&ch->device[SLAVE], ATA_PIO_MAX);
|
||||||
if ((((ch->devices & ATA_ATAPI_SLAVE) && atapi_dma &&
|
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->devices & ATA_ATA_SLAVE) && ata_dma)) && ch->dma)
|
||||||
ch->device[SLAVE].setmode(&ch->device[SLAVE], ATA_DMA_MAX);
|
ch->device[SLAVE].setmode(&ch->device[SLAVE], ATA_DMA_MAX);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user