Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 82137
b: refs/heads/master
c: f6fb786
h: refs/heads/master
i:
  82135: b7406ac
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Feb 1, 2008
1 parent b180404 commit aec0f20
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fcc1175947510d7d7dc82d5c1b8315cb8fcb96ca
refs/heads/master: f6fb786d6dcdd7d730e4fba620b071796f487e1b
8 changes: 4 additions & 4 deletions trunk/drivers/ide/ide-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,12 +282,12 @@ int ide_build_dmatable (ide_drive_t *drive, struct request *rq)
*--table |= cpu_to_le32(0x80000000);
return count;
}

printk(KERN_ERR "%s: empty DMA table?\n", drive->name);

use_pio_instead:
pci_unmap_sg(hwif->pci_dev,
hwif->sg_table,
hwif->sg_nents,
hwif->sg_dma_direction);
ide_destroy_dmatable(drive);

return 0; /* revert to PIO for this request */
}

Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/ide/pci/sgiioc4.c
Original file line number Diff line number Diff line change
Expand Up @@ -517,8 +517,7 @@ sgiioc4_build_dma_table(ide_drive_t * drive, struct request *rq, int ddir)
}

use_pio_instead:
pci_unmap_sg(hwif->pci_dev, hwif->sg_table, hwif->sg_nents,
hwif->sg_dma_direction);
ide_destroy_dmatable(drive);

return 0; /* revert to PIO for this request */
}
Expand Down
16 changes: 6 additions & 10 deletions trunk/drivers/ide/ppc/pmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1535,11 +1535,10 @@ pmac_ide_build_dmatable(ide_drive_t *drive, struct request *rq)
}

printk(KERN_DEBUG "%s: empty DMA table?\n", drive->name);
use_pio_instead:
pci_unmap_sg(hwif->pci_dev,
hwif->sg_table,
hwif->sg_nents,
hwif->sg_dma_direction);

use_pio_instead:
ide_destroy_dmatable(drive);

return 0; /* revert to PIO for this request */
}

Expand All @@ -1548,12 +1547,9 @@ static void
pmac_ide_destroy_dmatable (ide_drive_t *drive)
{
ide_hwif_t *hwif = drive->hwif;
struct pci_dev *dev = HWIF(drive)->pci_dev;
struct scatterlist *sg = hwif->sg_table;
int nents = hwif->sg_nents;

if (nents) {
pci_unmap_sg(dev, sg, nents, hwif->sg_dma_direction);
if (hwif->sg_nents) {
ide_destroy_dmatable(drive);
hwif->sg_nents = 0;
}
}
Expand Down

0 comments on commit aec0f20

Please sign in to comment.