Fix the bug that prevented DMA from working on old Acer chips.

Found by: Andrew Gallatin <gallatin@cs.duke.edu>
Pointy hat to: sos
This commit is contained in:
Søren Schmidt 2003-10-09 14:33:06 +00:00
parent ea924c4cd3
commit fa9dc8d090

View File

@ -73,8 +73,9 @@ ata_transaction(struct ata_request *request)
request->device->channel->running = request;
/* disable ATAPI DMA writes if HW doesn't support it */
if (request->flags & (ATA_R_ATAPI | ATA_R_DMA | ATA_R_WRITE) &&
request->device->channel->flags & ATA_ATAPI_DMA_RO)
if ((request->device->channel->flags & ATA_ATAPI_DMA_RO) &&
((request->flags & (ATA_R_ATAPI | ATA_R_DMA | ATA_R_WRITE)) ==
(ATA_R_ATAPI | ATA_R_DMA | ATA_R_WRITE)))
request->flags &= ~ATA_R_DMA;
switch (request->flags & (ATA_R_ATAPI | ATA_R_DMA)) {