aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-dma.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-10-18 18:30:06 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-10-18 18:30:06 -0400
commit33c1002ed912ac9dacedd5d5b166da3b72d18460 (patch)
treec129987c6935542a8bd95924873ac6bf0e1e756c /drivers/ide/ide-dma.c
parent1c3dd326ad790934fd88ec086e75a9d61ddaef8a (diff)
ide: add IDE_HFLAG_NO_ATAPI_DMA host flag
Add IDE_HFLAG_NO_ATAPI_DMA host flag and set it in host drivers which don't support ATAPI DMA. Then remove no longer needed hwif->atapi_dma. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-dma.c')
-rw-r--r--drivers/ide/ide-dma.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c
index bc57ce6bf0b3..80b4f17f3941 100644
--- a/drivers/ide/ide-dma.c
+++ b/drivers/ide/ide-dma.c
@@ -338,8 +338,10 @@ static int config_drive_for_dma (ide_drive_t *drive)
338 ide_hwif_t *hwif = drive->hwif; 338 ide_hwif_t *hwif = drive->hwif;
339 struct hd_driveid *id = drive->id; 339 struct hd_driveid *id = drive->id;
340 340
341 if (drive->media != ide_disk && hwif->atapi_dma == 0) 341 if (drive->media != ide_disk) {
342 return 0; 342 if (hwif->host_flags & IDE_HFLAG_NO_ATAPI_DMA)
343 return -1;
344 }
343 345
344 /* 346 /*
345 * Enable DMA on any drive that has 347 * Enable DMA on any drive that has
@@ -726,8 +728,10 @@ u8 ide_find_dma_mode(ide_drive_t *drive, u8 req_mode)
726 int x, i; 728 int x, i;
727 u8 mode = 0; 729 u8 mode = 0;
728 730
729 if (drive->media != ide_disk && hwif->atapi_dma == 0) 731 if (drive->media != ide_disk) {
730 return 0; 732 if (hwif->host_flags & IDE_HFLAG_NO_ATAPI_DMA)
733 return 0;
734 }
731 735
732 for (i = 0; i < ARRAY_SIZE(xfer_mode_bases); i++) { 736 for (i = 0; i < ARRAY_SIZE(xfer_mode_bases); i++) {
733 if (req_mode < xfer_mode_bases[i]) 737 if (req_mode < xfer_mode_bases[i])