Commit 0a9b6f88 authored by Borislav Petkov's avatar Borislav Petkov Committed by Bartlomiej Zolnierkiewicz

ide: add ide_drive_t.dma flag

This flag is to accomodate ide-cd functionality into ide atapi.

There should be no functionality change resulting from this patch.
Signed-off-by: default avatarBorislav Petkov <petkovbb@gmail.com>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent 35d9b17f
...@@ -545,7 +545,7 @@ ide_startstop_t ide_issue_pc(ide_drive_t *drive, unsigned int timeout, ...@@ -545,7 +545,7 @@ ide_startstop_t ide_issue_pc(ide_drive_t *drive, unsigned int timeout,
struct ide_atapi_pc *pc = drive->pc; struct ide_atapi_pc *pc = drive->pc;
ide_hwif_t *hwif = drive->hwif; ide_hwif_t *hwif = drive->hwif;
u16 bcount; u16 bcount;
u8 dma = 0, scsi = !!(drive->dev_flags & IDE_DFLAG_SCSI); u8 scsi = !!(drive->dev_flags & IDE_DFLAG_SCSI);
/* We haven't transferred any data yet */ /* We haven't transferred any data yet */
pc->xferred = 0; pc->xferred = 0;
...@@ -566,15 +566,16 @@ ide_startstop_t ide_issue_pc(ide_drive_t *drive, unsigned int timeout, ...@@ -566,15 +566,16 @@ ide_startstop_t ide_issue_pc(ide_drive_t *drive, unsigned int timeout,
(drive->dev_flags & IDE_DFLAG_USING_DMA)) { (drive->dev_flags & IDE_DFLAG_USING_DMA)) {
if (scsi) if (scsi)
hwif->sg_mapped = 1; hwif->sg_mapped = 1;
dma = !hwif->dma_ops->dma_setup(drive); drive->dma = !hwif->dma_ops->dma_setup(drive);
if (scsi) if (scsi)
hwif->sg_mapped = 0; hwif->sg_mapped = 0;
} }
if (!dma) if (!drive->dma)
pc->flags &= ~PC_FLAG_DMA_OK; pc->flags &= ~PC_FLAG_DMA_OK;
ide_pktcmd_tf_load(drive, scsi ? 0 : IDE_TFLAG_OUT_DEVICE, bcount, dma); ide_pktcmd_tf_load(drive, scsi ? 0 : IDE_TFLAG_OUT_DEVICE, bcount,
drive->dma);
/* Issue the packet command */ /* Issue the packet command */
if (drive->atapi_flags & IDE_AFLAG_DRQ_INTERRUPT) { if (drive->atapi_flags & IDE_AFLAG_DRQ_INTERRUPT) {
......
...@@ -603,6 +603,7 @@ struct ide_drive_s { ...@@ -603,6 +603,7 @@ struct ide_drive_s {
u8 select; /* basic drive/head select reg value */ u8 select; /* basic drive/head select reg value */
u8 retry_pio; /* retrying dma capable host in pio */ u8 retry_pio; /* retrying dma capable host in pio */
u8 waiting_for_dma; /* dma currently in progress */ u8 waiting_for_dma; /* dma currently in progress */
u8 dma; /* atapi dma flag */
u8 quirk_list; /* considered quirky, set for a specific host */ u8 quirk_list; /* considered quirky, set for a specific host */
u8 init_speed; /* transfer rate set at boot */ u8 init_speed; /* transfer rate set at boot */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment