diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-02-02 19:56:47 +0100 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-02-02 19:56:47 +0100 |
commit | 578cfa0d72f81526b2fcb1dd2463c47bbf633989 (patch) | |
tree | 045e7d196e79f6cec24d486d5df9e2fbd8dc29d6 /drivers/ide/ide-iops.c | |
parent | 296921a4ca01612cb1d9a43343b33a33eb7697ff (diff) | |
download | op-kernel-dev-578cfa0d72f81526b2fcb1dd2463c47bbf633989.zip op-kernel-dev-578cfa0d72f81526b2fcb1dd2463c47bbf633989.tar.gz |
ide: move check_dma_crc() to ide-dma.c
* Move check_dma_crc() to ide-dma.c and add inline version for
CONFIG_BLK_DEV_IDEDMA=n case.
* Rename check_dma_crc() to ide_check_dma_crc().
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-iops.c')
-rw-r--r-- | drivers/ide/ide-iops.c | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index b7da44c..a95178f 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c @@ -938,28 +938,6 @@ static ide_startstop_t reset_pollfunc (ide_drive_t *drive) return ide_stopped; } -static void check_dma_crc(ide_drive_t *drive) -{ -#ifdef CONFIG_BLK_DEV_IDEDMA - u8 mode; - - ide_dma_off_quietly(drive); - drive->crc_count = 0; - mode = drive->current_speed; - /* - * Don't try non Ultra-DMA modes without iCRC's. Force the - * device to PIO and make the user enable SWDMA/MWDMA modes. - */ - if (mode > XFER_UDMA_0 && mode <= XFER_UDMA_7) - mode--; - else - mode = XFER_PIO_4; - ide_set_xfer_rate(drive, mode); - if (drive->current_speed >= XFER_SW_DMA_0) - ide_dma_on(drive); -#endif -} - static void ide_disk_pre_reset(ide_drive_t *drive) { int legacy = (drive->id->cfs_enable_2 & 0x0400) ? 0 : 1; @@ -983,7 +961,7 @@ static void pre_reset(ide_drive_t *drive) if (drive->using_dma) { if (drive->crc_count) - check_dma_crc(drive); + ide_check_dma_crc(drive); else ide_dma_off(drive); } |