]> git.hungrycats.org Git - linux/commitdiff
[ide] convert ide_hwif_t->ide_dma_begin() to ->dma_start()
authorBartlomiej Zolnierkiewicz <bzolnier@trik.(none)>
Wed, 20 Oct 2004 00:06:01 +0000 (02:06 +0200)
committerBartlomiej Zolnierkiewicz <bzolnier@trik.(none)>
Wed, 20 Oct 2004 00:06:01 +0000 (02:06 +0200)
Make ->ide_dma_begin() functions void and rename them to ->dma_start().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 files changed:
arch/cris/arch-v10/drivers/ide.c
drivers/ide/arm/icside.c
drivers/ide/ide-cd.c
drivers/ide/ide-disk.c
drivers/ide/ide-dma.c
drivers/ide/ide-floppy.c
drivers/ide/ide-tape.c
drivers/ide/ide-taskfile.c
drivers/ide/ide.c
drivers/ide/pci/hpt366.c
drivers/ide/pci/pdc202xx_old.c
drivers/ide/pci/sgiioc4.c
drivers/ide/pci/sl82c105.c
drivers/ide/pci/trm290.c
drivers/ide/ppc/pmac.c
drivers/scsi/ide-scsi.c
include/linux/ide.h

index 155b3e679dab5af32c08661add932aab524089ff..cd9c0fa9899f6bd276a4d7a02539ddcc3a450309 100644 (file)
@@ -208,7 +208,7 @@ etrax100_ide_inb(ide_ioreg_t reg)
 #define ATA_PIO0_HOLD    4
 
 static int e100_dma_check (ide_drive_t *drive);
-static int e100_dma_begin (ide_drive_t *drive);
+static void e100_dma_start(ide_drive_t *drive);
 static int e100_dma_end (ide_drive_t *drive);
 static void e100_ide_input_data (ide_drive_t *drive, void *, unsigned int);
 static void e100_ide_output_data (ide_drive_t *drive, void *, unsigned int);
@@ -335,7 +335,7 @@ init_e100_ide (void)
                 hwif->ide_dma_end = &e100_dma_end;
                hwif->dma_setup = &e100_dma_setup;
                hwif->dma_exec_cmd = &e100_dma_exec_cmd;
-               hwif->ide_dma_begin = &e100_dma_begin;
+               hwif->dma_start = &e100_dma_start;
                hwif->OUTB = &etrax100_ide_outb;
                hwif->OUTW = &etrax100_ide_outw;
                hwif->OUTBSYNC = &etrax100_ide_outbsync;
@@ -815,7 +815,7 @@ static int e100_dma_end(ide_drive_t *drive)
        return 0;
 }
 
-static int e100_dma_begin(ide_drive_t *drive)
+static void e100_dma_start(ide_drive_t *drive)
 {
        if (e100_read_command) {
                /* begin DMA */
@@ -872,5 +872,4 @@ static int e100_dma_begin(ide_drive_t *drive)
 
                D(printk("dma write of %d bytes.\n", ata_tot_size));
        }
-       return 0;
 }
index 0abc096dfbf2af4ef22bfbdb209c5d15688b2ac5..330167da729056031a290a21475d95dcde91d365 100644 (file)
@@ -400,14 +400,13 @@ static int icside_dma_end(ide_drive_t *drive)
        return get_dma_residue(hwif->hw.dma) != 0;
 }
 
-static int icside_dma_begin(ide_drive_t *drive)
+static void icside_dma_start(ide_drive_t *drive)
 {
        ide_hwif_t *hwif = HWIF(drive);
 
        /* We can not enable DMA on both channels simultaneously. */
        BUG_ON(dma_channel_active(hwif->hw.dma));
        enable_dma(hwif->hw.dma);
-       return 0;
 }
 
 /*
@@ -559,7 +558,7 @@ static int icside_dma_init(ide_hwif_t *hwif)
        hwif->ide_dma_on        = icside_dma_on;
        hwif->dma_setup         = icside_dma_setup;
        hwif->dma_exec_cmd      = icside_dma_exec_cmd;
-       hwif->ide_dma_begin     = icside_dma_begin;
+       hwif->dma_start         = icside_dma_start;
        hwif->ide_dma_end       = icside_dma_end;
        hwif->ide_dma_test_irq  = icside_dma_test_irq;
        hwif->ide_dma_verbose   = icside_dma_verbose;
index 820178c1134d13c8dbed6ef8e6cdd94ea32991d3..d6397420196271a4add976eaa70540a4f8ac9172 100644 (file)
@@ -910,6 +910,7 @@ static ide_startstop_t cdrom_transfer_packet_command (ide_drive_t *drive,
                                          struct request *rq,
                                          ide_handler_t *handler)
 {
+       ide_hwif_t *hwif = drive->hwif;
        int cmd_len;
        struct cdrom_info *info = drive->driver_data;
        ide_startstop_t startstop;
@@ -941,7 +942,7 @@ static ide_startstop_t cdrom_transfer_packet_command (ide_drive_t *drive,
 
        /* Start the DMA if need be */
        if (info->dma)
-               (void) HWIF(drive)->ide_dma_begin(drive);
+               hwif->dma_start(drive);
 
        return ide_started;
 }
index ebc4dbb07bcea80208a15d2e9f23fc9deac897af..70e93aa031cb7661d82116adf1abf5c5f9285b1c 100644 (file)
@@ -431,7 +431,7 @@ ide_startstop_t __ide_do_rw_disk (ide_drive_t *drive, struct request *rq, sector
                                        command = lba48 ? WIN_READ_EXT: WIN_READ;
                        }
                        hwif->dma_exec_cmd(drive, command);
-                       hwif->ide_dma_begin(drive);
+                       hwif->dma_start(drive);
                        return ide_started;
                }
                /* fallback to PIO */
index d2d4d3bf114cd98f47e42a48e81a3014955e29e6..d041da5674e0756346eae45c74ba35592967c759 100644 (file)
@@ -636,7 +636,7 @@ static void ide_dma_exec_cmd(ide_drive_t *drive, u8 command)
        ide_execute_command(drive, command, &ide_dma_intr, 2*WAIT_CMD, dma_timer_expiry);
 }
 
-int __ide_dma_begin (ide_drive_t *drive)
+void ide_dma_start(ide_drive_t *drive)
 {
        ide_hwif_t *hwif        = HWIF(drive);
        u8 dma_cmd              = hwif->INB(hwif->dma_command);
@@ -650,10 +650,9 @@ int __ide_dma_begin (ide_drive_t *drive)
        hwif->OUTB(dma_cmd|1, hwif->dma_command);
        hwif->dma = 1;
        wmb();
-       return 0;
 }
 
-EXPORT_SYMBOL(__ide_dma_begin);
+EXPORT_SYMBOL_GPL(ide_dma_start);
 
 /* returns 1 on error, 0 otherwise */
 int __ide_dma_end (ide_drive_t *drive)
@@ -955,8 +954,8 @@ void ide_setup_dma (ide_hwif_t *hwif, unsigned long dma_base, unsigned int num_p
                hwif->dma_setup = &ide_dma_setup;
        if (!hwif->dma_exec_cmd)
                hwif->dma_exec_cmd = &ide_dma_exec_cmd;
-       if (!hwif->ide_dma_begin)
-               hwif->ide_dma_begin = &__ide_dma_begin;
+       if (!hwif->dma_start)
+               hwif->dma_start = &ide_dma_start;
        if (!hwif->ide_dma_end)
                hwif->ide_dma_end = &__ide_dma_end;
        if (!hwif->ide_dma_test_irq)
index ded2893cc8d20bb00f53b90ce709f6dfeefa848a..99eef3064b0462308d9d68411bd4b255fabd8c7f 100644 (file)
@@ -1063,7 +1063,7 @@ static ide_startstop_t idefloppy_issue_pc (ide_drive_t *drive, idefloppy_pc_t *p
 
        if (feature.b.dma) {    /* Begin DMA, if necessary */
                set_bit(PC_DMA_IN_PROGRESS, &pc->flags);
-               (void) (HWIF(drive)->ide_dma_begin(drive));
+               hwif->dma_start(drive);
        }
 
        /* Can we transfer the packet when we get the interrupt or wait? */
index 8422980eade73a9ec59955eccfbc19fb606eac45..3ec7ff671c65262fbebf104b89cf67528c04774a 100644 (file)
@@ -2067,7 +2067,7 @@ static ide_startstop_t idetape_transfer_pc(ide_drive_t *drive)
 #ifdef CONFIG_BLK_DEV_IDEDMA
        /* Begin DMA, if necessary */
        if (test_bit(PC_DMA_IN_PROGRESS, &pc->flags))
-               (void) (HWIF(drive)->ide_dma_begin(drive));
+               hwif->dma_start(drive);
 #endif
        /* Send the actual packet */
        HWIF(drive)->atapi_output_bytes(drive, pc->c, 12);
index 69547858dfab10819cc83e8170fe6dcf1b7c91a7..4a8019475c02684de1eb69bcee245a761062ec6f 100644 (file)
@@ -156,7 +156,7 @@ ide_startstop_t do_rw_taskfile (ide_drive_t *drive, ide_task_t *task)
                case WIN_IDENTIFY_DMA:
                        if (!hwif->dma_setup(drive)) {
                                hwif->dma_exec_cmd(drive, taskfile->command);
-                               hwif->ide_dma_begin(drive);
+                               hwif->dma_start(drive);
                                return ide_started;
                        }
                        break;
@@ -903,7 +903,7 @@ ide_startstop_t flagged_taskfile (ide_drive_t *drive, ide_task_t *task)
                case TASKFILE_IN_DMA:
                        hwif->dma_setup(drive);
                        hwif->dma_exec_cmd(drive, taskfile->command);
-                       hwif->ide_dma_begin(drive);
+                       hwif->dma_start(drive);
                        break;
 
                default:
index 3ce862997c5b532db1b3c693a6528cd0a11ea1bb..5f0a4352721985cb4d154bf5a8404e01fbb56813 100644 (file)
@@ -687,7 +687,7 @@ static void ide_hwif_restore(ide_hwif_t *hwif, ide_hwif_t *tmp_hwif)
 
        hwif->dma_setup                 = tmp_hwif->dma_setup;
        hwif->dma_exec_cmd              = tmp_hwif->dma_exec_cmd;
-       hwif->ide_dma_begin             = tmp_hwif->ide_dma_begin;
+       hwif->dma_start                 = tmp_hwif->dma_start;
        hwif->ide_dma_end               = tmp_hwif->ide_dma_end;
        hwif->ide_dma_check             = tmp_hwif->ide_dma_check;
        hwif->ide_dma_on                = tmp_hwif->ide_dma_on;
index d1e8adbe779dec68e4c3f3e3a030a9e6edbf838b..5597ecf031ddd78916a5eb21ff8a82c70b73dfe3 100644 (file)
@@ -577,7 +577,7 @@ static int hpt366_ide_dma_lostirq (ide_drive_t *drive)
        /* how about we flush and reset, mmmkay? */
        pci_write_config_byte(dev, 0x51, 0x1F);
        /* fall through to a reset */
-       case ide_dma_begin:
+       case dma_start:
        case ide_dma_end:
        /* reset the chips state over and over.. */
        pci_write_config_byte(dev, 0x51, 0x13);
@@ -592,12 +592,12 @@ static void hpt370_clear_engine (ide_drive_t *drive)
        udelay(10);
 }
 
-static int hpt370_ide_dma_begin (ide_drive_t *drive)
+static void hpt370_ide_dma_start(ide_drive_t *drive)
 {
 #ifdef HPT_RESET_STATE_ENGINE
        hpt370_clear_engine(drive);
 #endif
-       return __ide_dma_begin(drive);
+       ide_dma_start(drive);
 }
 
 static int hpt370_ide_dma_end (ide_drive_t *drive)
@@ -1230,7 +1230,7 @@ static void __devinit init_hwif_hpt366(ide_hwif_t *hwif)
                hwif->ide_dma_test_irq = &hpt374_ide_dma_test_irq;
                hwif->ide_dma_end = &hpt374_ide_dma_end;
        } else if (hpt_minimum_revision(dev,3)) {
-               hwif->ide_dma_begin = &hpt370_ide_dma_begin;
+               hwif->dma_start = &hpt370_ide_dma_start;
                hwif->ide_dma_end = &hpt370_ide_dma_end;
                hwif->ide_dma_timeout = &hpt370_ide_dma_timeout;
                hwif->ide_dma_lostirq = &hpt370_ide_dma_lostirq;
index 651879a49832f1ac1d186fb78df914e0d18f1905..d139727318e2a16584e654124e1be5a3392fc9e1 100644 (file)
@@ -494,7 +494,7 @@ static int pdc202xx_quirkproc (ide_drive_t *drive)
        return ((int) check_in_drive_lists(drive, pdc_quirk_drives));
 }
 
-static int pdc202xx_old_ide_dma_begin(ide_drive_t *drive)
+static void pdc202xx_old_ide_dma_start(ide_drive_t *drive)
 {
        if (drive->current_speed > XFER_UDMA_2)
                pdc_old_enable_66MHz_clock(drive->hwif);
@@ -515,7 +515,7 @@ static int pdc202xx_old_ide_dma_begin(ide_drive_t *drive)
                                        word_count | 0x06000000;
                hwif->OUTL(word_count, atapi_reg);
        }
-       return __ide_dma_begin(drive);
+       ide_dma_start(drive);
 }
 
 static int pdc202xx_old_ide_dma_end(ide_drive_t *drive)
@@ -736,7 +736,7 @@ static void __devinit init_hwif_pdc202xx(ide_hwif_t *hwif)
        if (hwif->pci_dev->device != PCI_DEVICE_ID_PROMISE_20246) {
                if (!(hwif->udma_four))
                        hwif->udma_four = (pdc202xx_old_cable_detect(hwif)) ? 0 : 1;
-               hwif->ide_dma_begin = &pdc202xx_old_ide_dma_begin;
+               hwif->dma_start = &pdc202xx_old_ide_dma_start;
                hwif->ide_dma_end = &pdc202xx_old_ide_dma_end;
        } 
        hwif->ide_dma_test_irq = &pdc202xx_old_ide_dma_test_irq;
index e8c19d2c8cd969287819a18670ff677a2751c694..ca2ef5404a5a51d5695589bd4635338aa2cbdc3e 100644 (file)
@@ -192,16 +192,13 @@ sgiioc4_clearirq(ide_drive_t * drive)
        return intr_reg & 3;
 }
 
-static int
-sgiioc4_ide_dma_begin(ide_drive_t * drive)
+static void sgiioc4_ide_dma_start(ide_drive_t * drive)
 {
        ide_hwif_t *hwif = HWIF(drive);
        unsigned int reg = hwif->INL(hwif->dma_base + IOC4_DMA_CTRL * 4);
        unsigned int temp_reg = reg | IOC4_S_DMA_START;
 
        hwif->OUTL(temp_reg, hwif->dma_base + IOC4_DMA_CTRL * 4);
-
-       return 0;
 }
 
 static u32
@@ -625,7 +622,7 @@ ide_init_sgiioc4(ide_hwif_t * hwif)
        hwif->busproc = NULL;
 
        hwif->dma_setup = &sgiioc4_ide_dma_setup;
-       hwif->ide_dma_begin = &sgiioc4_ide_dma_begin;
+       hwif->dma_start = &sgiioc4_ide_dma_start;
        hwif->ide_dma_end = &sgiioc4_ide_dma_end;
        hwif->ide_dma_check = &sgiioc4_ide_dma_check;
        hwif->ide_dma_on = &sgiioc4_ide_dma_on;
index 563c44c7dae8d7b1f6d023a1522535af72645e89..d0cfec0559aa532b067bd7dd700eeeda90cd4625 100644 (file)
@@ -236,15 +236,13 @@ static int sl82c105_ide_dma_lost_irq(ide_drive_t *drive)
  * The generic IDE core will have disabled the BMEN bit before this
  * function is called.
  */
-static int sl82c105_ide_dma_begin(ide_drive_t *drive)
+static void sl82c105_ide_dma_start(ide_drive_t *drive)
 {
        ide_hwif_t *hwif = HWIF(drive);
        struct pci_dev *dev = hwif->pci_dev;
 
-//     DBG(("sl82c105_ide_dma_begin(drive:%s)\n", drive->name));
-
        sl82c105_reset_host(dev);
-       return __ide_dma_begin(drive);
+       ide_dma_start(drive);
 }
 
 static int sl82c105_ide_dma_timeout(ide_drive_t *drive)
@@ -469,7 +467,7 @@ static void __init init_hwif_sl82c105(ide_hwif_t *hwif)
        hwif->ide_dma_on = &sl82c105_ide_dma_on;
        hwif->ide_dma_off_quietly = &sl82c105_ide_dma_off_quietly;
        hwif->ide_dma_lostirq = &sl82c105_ide_dma_lost_irq;
-       hwif->ide_dma_begin = &sl82c105_ide_dma_begin;
+       hwif->dma_start = &sl82c105_ide_dma_start;
        hwif->ide_dma_timeout = &sl82c105_ide_dma_timeout;
 
        if (!noautodma)
index fa12ce293cd4d03533b254e008144bb36904ac47..17250160029e5eade4cfc4e3714b50b5ff543b7f 100644 (file)
@@ -220,9 +220,8 @@ static int trm290_ide_dma_setup(ide_drive_t *drive)
        return 0;
 }
 
-static int trm290_ide_dma_begin (ide_drive_t *drive)
+static void trm290_ide_dma_start(ide_drive_t *drive)
 {
-       return 0;
 }
 
 static int trm290_ide_dma_end (ide_drive_t *drive)
@@ -295,7 +294,7 @@ void __devinit init_hwif_trm290(ide_hwif_t *hwif)
 #ifdef CONFIG_BLK_DEV_IDEDMA
        hwif->dma_setup = &trm290_ide_dma_setup;
        hwif->dma_exec_cmd = &trm290_ide_dma_exec_cmd;
-       hwif->ide_dma_begin = &trm290_ide_dma_begin;
+       hwif->dma_start = &trm290_ide_dma_start;
        hwif->ide_dma_end = &trm290_ide_dma_end;
        hwif->ide_dma_test_irq = &trm290_ide_dma_test_irq;
 #endif /* CONFIG_BLK_DEV_IDEDMA */
index 0043bb35d2fb290fe21a2c240f2241c2212e0806..643bbc3a6267a7e946020ce8ae6ab385a8898c81 100644 (file)
@@ -362,7 +362,6 @@ static int pmac_ide_tune_chipset(ide_drive_t *drive, u8 speed);
 static void pmac_ide_tuneproc(ide_drive_t *drive, u8 pio);
 static void pmac_ide_selectproc(ide_drive_t *drive);
 static void pmac_ide_kauai_selectproc(ide_drive_t *drive);
-static int pmac_ide_dma_begin (ide_drive_t *drive);
 
 #endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */
 
@@ -1918,8 +1917,8 @@ pmac_ide_dma_exec_cmd(ide_drive_t *drive, u8 command)
  * Kick the DMA controller into life after the DMA command has been issued
  * to the drive.
  */
-static int __pmac
-pmac_ide_dma_begin (ide_drive_t *drive)
+static void __pmac
+pmac_ide_dma_start(ide_drive_t *drive)
 {
        pmac_ide_hwif_t* pmif = (pmac_ide_hwif_t *)HWIF(drive)->hwif_data;
        volatile struct dbdma_regs __iomem *dma;
@@ -1929,7 +1928,6 @@ pmac_ide_dma_begin (ide_drive_t *drive)
        writel((RUN << 16) | RUN, &dma->control);
        /* Make sure it gets to the controller right now */
        (void)readl(&dma->control);
-       return 0;
 }
 
 /*
@@ -2087,7 +2085,7 @@ pmac_ide_setup_dma(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif)
        hwif->ide_dma_check = &pmac_ide_dma_check;
        hwif->dma_setup = &pmac_ide_dma_setup;
        hwif->dma_exec_cmd = &pmac_ide_dma_exec_cmd;
-       hwif->ide_dma_begin = &pmac_ide_dma_begin;
+       hwif->dma_start = &pmac_ide_dma_start;
        hwif->ide_dma_end = &pmac_ide_dma_end;
        hwif->ide_dma_test_irq = &pmac_ide_dma_test_irq;
        hwif->ide_dma_host_off = &pmac_ide_dma_host_off;
index 166e0a6ab95a159505a12cf2c9e2286456ac88e0..ea0527e9837e7f2596f30b53cd3a4cfc81f0e8c6 100644 (file)
@@ -555,6 +555,7 @@ static ide_startstop_t idescsi_pc_intr (ide_drive_t *drive)
 
 static ide_startstop_t idescsi_transfer_pc(ide_drive_t *drive)
 {
+       ide_hwif_t *hwif = drive->hwif;
        idescsi_scsi_t *scsi = drive_to_idescsi(drive);
        idescsi_pc_t *pc = scsi->pc;
        atapi_ireason_t ireason;
@@ -579,7 +580,7 @@ static ide_startstop_t idescsi_transfer_pc(ide_drive_t *drive)
        atapi_output_bytes(drive, scsi->pc->c, 12);
        if (test_bit (PC_DMA_OK, &pc->flags)) {
                set_bit (PC_DMA_IN_PROGRESS, &pc->flags);
-               (void) (HWIF(drive)->ide_dma_begin(drive));
+               hwif->dma_start(drive);
        }
        return ide_started;
 }
index d1a78fe8a1edbd3fca6afb47f6789864d00d6014..c05eb8673a4e6c55e5415a09b5501e7ce460e879 100644 (file)
@@ -889,7 +889,7 @@ typedef struct hwif_s {
 
        int (*dma_setup)(ide_drive_t *);
        void (*dma_exec_cmd)(ide_drive_t *, u8);
-       int (*ide_dma_begin)(ide_drive_t *drive);
+       void (*dma_start)(ide_drive_t *);
        int (*ide_dma_end)(ide_drive_t *drive);
        int (*ide_dma_check)(ide_drive_t *drive);
        int (*ide_dma_on)(ide_drive_t *drive);
@@ -1551,7 +1551,7 @@ extern int __ide_dma_host_on(ide_drive_t *);
 extern int __ide_dma_on(ide_drive_t *);
 extern int __ide_dma_check(ide_drive_t *);
 extern int ide_dma_setup(ide_drive_t *);
-extern int __ide_dma_begin(ide_drive_t *);
+extern void ide_dma_start(ide_drive_t *);
 extern int __ide_dma_end(ide_drive_t *);
 extern int __ide_dma_test_irq(ide_drive_t *);
 extern int __ide_dma_verbose(ide_drive_t *);