[ide] remove ide_hwif_t->sg_dma_active

It is always equal to zero.
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@elka.pw.edu.pl>
parent fc5e1865
...@@ -215,8 +215,6 @@ static void icside_build_sglist(ide_drive_t *drive, struct request *rq) ...@@ -215,8 +215,6 @@ static void icside_build_sglist(ide_drive_t *drive, struct request *rq)
struct scatterlist *sg = hwif->sg_table; struct scatterlist *sg = hwif->sg_table;
int nents; int nents;
BUG_ON(hwif->sg_dma_active);
if (rq->flags & REQ_DRIVE_TASKFILE) { if (rq->flags & REQ_DRIVE_TASKFILE) {
ide_task_t *args = rq->special; ide_task_t *args = rq->special;
...@@ -401,8 +399,6 @@ static int icside_dma_end(ide_drive_t *drive) ...@@ -401,8 +399,6 @@ static int icside_dma_end(ide_drive_t *drive)
dma_unmap_sg(state->dev, hwif->sg_table, hwif->sg_nents, dma_unmap_sg(state->dev, hwif->sg_table, hwif->sg_nents,
hwif->sg_dma_direction); hwif->sg_dma_direction);
hwif->sg_dma_active = 0;
return get_dma_residue(hwif->hw.dma) != 0; return get_dma_residue(hwif->hw.dma) != 0;
} }
...@@ -454,7 +450,6 @@ icside_dma_common(ide_drive_t *drive, struct request *rq, ...@@ -454,7 +450,6 @@ icside_dma_common(ide_drive_t *drive, struct request *rq,
/* /*
* We can not enable DMA on both channels. * We can not enable DMA on both channels.
*/ */
BUG_ON(hwif->sg_dma_active);
BUG_ON(dma_channel_active(hwif->hw.dma)); BUG_ON(dma_channel_active(hwif->hw.dma));
icside_build_sglist(drive, rq); icside_build_sglist(drive, rq);
......
...@@ -208,9 +208,6 @@ int ide_build_sglist(ide_drive_t *drive, struct request *rq) ...@@ -208,9 +208,6 @@ int ide_build_sglist(ide_drive_t *drive, struct request *rq)
struct scatterlist *sg = hwif->sg_table; struct scatterlist *sg = hwif->sg_table;
int nents; int nents;
if (hwif->sg_dma_active)
BUG();
nents = blk_rq_map_sg(drive->queue, rq, hwif->sg_table); nents = blk_rq_map_sg(drive->queue, rq, hwif->sg_table);
if (rq_data_dir(rq) == READ) if (rq_data_dir(rq) == READ)
...@@ -366,7 +363,6 @@ int ide_build_dmatable (ide_drive_t *drive, struct request *rq) ...@@ -366,7 +363,6 @@ int ide_build_dmatable (ide_drive_t *drive, struct request *rq)
hwif->sg_table, hwif->sg_table,
hwif->sg_nents, hwif->sg_nents,
hwif->sg_dma_direction); hwif->sg_dma_direction);
hwif->sg_dma_active = 0;
return 0; /* revert to PIO for this request */ return 0; /* revert to PIO for this request */
} }
...@@ -390,7 +386,6 @@ void ide_destroy_dmatable (ide_drive_t *drive) ...@@ -390,7 +386,6 @@ void ide_destroy_dmatable (ide_drive_t *drive)
int nents = HWIF(drive)->sg_nents; int nents = HWIF(drive)->sg_nents;
pci_unmap_sg(dev, sg, nents, HWIF(drive)->sg_dma_direction); pci_unmap_sg(dev, sg, nents, HWIF(drive)->sg_dma_direction);
HWIF(drive)->sg_dma_active = 0;
} }
EXPORT_SYMBOL_GPL(ide_destroy_dmatable); EXPORT_SYMBOL_GPL(ide_destroy_dmatable);
......
...@@ -570,7 +570,6 @@ sgiioc4_build_dma_table(ide_drive_t * drive, struct request *rq, int ddir) ...@@ -570,7 +570,6 @@ sgiioc4_build_dma_table(ide_drive_t * drive, struct request *rq, int ddir)
use_pio_instead: use_pio_instead:
pci_unmap_sg(hwif->pci_dev, hwif->sg_table, hwif->sg_nents, pci_unmap_sg(hwif->pci_dev, hwif->sg_table, hwif->sg_nents,
hwif->sg_dma_direction); hwif->sg_dma_direction);
hwif->sg_dma_active = 0;
return 0; /* revert to PIO for this request */ return 0; /* revert to PIO for this request */
} }
......
...@@ -1578,9 +1578,6 @@ pmac_ide_build_sglist(ide_drive_t *drive, struct request *rq) ...@@ -1578,9 +1578,6 @@ pmac_ide_build_sglist(ide_drive_t *drive, struct request *rq)
struct scatterlist *sg = pmif->sg_table; struct scatterlist *sg = pmif->sg_table;
int nents; int nents;
if (hwif->sg_dma_active)
BUG();
nents = blk_rq_map_sg(drive->queue, rq, sg); nents = blk_rq_map_sg(drive->queue, rq, sg);
if (rq_data_dir(rq) == READ) if (rq_data_dir(rq) == READ)
...@@ -1715,7 +1712,6 @@ pmac_ide_build_dmatable(ide_drive_t *drive, struct request *rq) ...@@ -1715,7 +1712,6 @@ pmac_ide_build_dmatable(ide_drive_t *drive, struct request *rq)
pmif->sg_table, pmif->sg_table,
pmif->sg_nents, pmif->sg_nents,
pmif->sg_dma_direction); pmif->sg_dma_direction);
hwif->sg_dma_active = 0;
return 0; /* revert to PIO for this request */ return 0; /* revert to PIO for this request */
} }
...@@ -1731,7 +1727,6 @@ pmac_ide_destroy_dmatable (ide_drive_t *drive) ...@@ -1731,7 +1727,6 @@ pmac_ide_destroy_dmatable (ide_drive_t *drive)
if (nents) { if (nents) {
pci_unmap_sg(dev, sg, nents, pmif->sg_dma_direction); pci_unmap_sg(dev, sg, nents, pmif->sg_dma_direction);
pmif->sg_nents = 0; pmif->sg_nents = 0;
HWIF(drive)->sg_dma_active = 0;
} }
} }
......
...@@ -929,7 +929,6 @@ typedef struct hwif_s { ...@@ -929,7 +929,6 @@ typedef struct hwif_s {
struct scatterlist *sg_table; struct scatterlist *sg_table;
int sg_nents; /* Current number of entries in it */ int sg_nents; /* Current number of entries in it */
int sg_dma_direction; /* dma transfer direction */ int sg_dma_direction; /* dma transfer direction */
int sg_dma_active; /* is it in use */
/* data phase of the active command (currently only valid for PIO/DMA) */ /* data phase of the active command (currently only valid for PIO/DMA) */
int data_phase; int data_phase;
......
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