]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
ide: add ->dma_timer_expiry method and remove ->dma_exec_cmd one (v2)
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 27 Mar 2009 11:46:47 +0000 (12:46 +0100)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 27 Mar 2009 11:46:47 +0000 (12:46 +0100)
* Rename dma_timer_expiry() to ide_dma_sff_timer_expiry() and export it.

* Add ->dma_timer_expiry method and use it to set hwif->expiry for
  ATA_PROT_DMA protocol in do_rw_taskfile().

* Initialize ->dma_timer_expiry to ide_dma_sff_timer_expiry() for SFF hosts.

* Move setting hwif->expiry from ide_execute_command() to its users and drop
  'expiry' argument.

* Use ide_execute_command() instead of ->dma_exec_cmd in do_rw_taskfile().

* Remove ->dma_exec_cmd method and its implementations.

* Unexport ide_execute_command() and ide_dma_intr().

v2:
* Fix CONFIG_BLK_DEV_IDEDMA=n build (noticed by Randy Dunlap).

* Fix *dma_expiry naming (suggested by Sergei Shtylyov).

There should be no functional changes caused by this patch.

Cc: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
23 files changed:
drivers/ide/alim15x3.c
drivers/ide/au1xxx-ide.c
drivers/ide/cmd64x.c
drivers/ide/cs5536.c
drivers/ide/hpt366.c
drivers/ide/icside.c
drivers/ide/ide-atapi.c
drivers/ide/ide-dma-sff.c
drivers/ide/ide-dma.c
drivers/ide/ide-iops.c
drivers/ide/ide-taskfile.c
drivers/ide/it821x.c
drivers/ide/ns87415.c
drivers/ide/pdc202xx_old.c
drivers/ide/pmac.c
drivers/ide/sc1200.c
drivers/ide/scc_pata.c
drivers/ide/siimage.c
drivers/ide/sl82c105.c
drivers/ide/tc86c001.c
drivers/ide/trm290.c
drivers/ide/tx4939ide.c
include/linux/ide.h

index e837fd9f196f0af01d16c184c725e01cdc586426..d516168464fcea89cf2256cf433a08ad6f619c77 100644 (file)
@@ -504,11 +504,11 @@ static const struct ide_port_ops ali_port_ops = {
 static const struct ide_dma_ops ali_dma_ops = {
        .dma_host_set           = ide_dma_host_set,
        .dma_setup              = ali15x3_dma_setup,
-       .dma_exec_cmd           = ide_dma_exec_cmd,
        .dma_start              = ide_dma_start,
        .dma_end                = ide_dma_end,
        .dma_test_irq           = ide_dma_test_irq,
        .dma_lost_irq           = ide_dma_lost_irq,
+       .dma_timer_expiry       = ide_dma_sff_timer_expiry,
        .dma_timeout            = ide_dma_timeout,
        .dma_sff_read_status    = ide_dma_sff_read_status,
 };
index 58485d6cb0267f7f1a82b5f2b0849a9d3002a05d..d3a9d6c15328de9b11f545160624a67e914d8401 100644 (file)
@@ -290,13 +290,6 @@ static void auide_dma_start(ide_drive_t *drive )
 }
 
 
-static void auide_dma_exec_cmd(ide_drive_t *drive, u8 command)
-{
-       /* issue cmd to drive */
-       ide_execute_command(drive, command, &ide_dma_intr,
-                           (2*WAIT_CMD), NULL);
-}
-
 static int auide_dma_setup(ide_drive_t *drive, struct ide_cmd *cmd)
 {
        if (auide_build_dmatable(drive, cmd) == 0) {
@@ -356,7 +349,6 @@ static void auide_init_dbdma_dev(dbdev_tab_t *dev, u32 dev_id, u32 tsize, u32 de
 static const struct ide_dma_ops au1xxx_dma_ops = {
        .dma_host_set           = auide_dma_host_set,
        .dma_setup              = auide_dma_setup,
-       .dma_exec_cmd           = auide_dma_exec_cmd,
        .dma_start              = auide_dma_start,
        .dma_end                = auide_dma_end,
        .dma_test_irq           = auide_dma_test_irq,
index aeee036b15035594432ff8de3bc5e0c5c9ab4946..bf0e3f4708242320b75a7dc705be76ef6174b13b 100644 (file)
@@ -379,11 +379,11 @@ static const struct ide_port_ops cmd64x_port_ops = {
 static const struct ide_dma_ops cmd64x_dma_ops = {
        .dma_host_set           = ide_dma_host_set,
        .dma_setup              = ide_dma_setup,
-       .dma_exec_cmd           = ide_dma_exec_cmd,
        .dma_start              = ide_dma_start,
        .dma_end                = cmd64x_dma_end,
        .dma_test_irq           = cmd64x_dma_test_irq,
        .dma_lost_irq           = ide_dma_lost_irq,
+       .dma_timer_expiry       = ide_dma_sff_timer_expiry,
        .dma_timeout            = ide_dma_timeout,
        .dma_sff_read_status    = ide_dma_sff_read_status,
 };
@@ -391,11 +391,11 @@ static const struct ide_dma_ops cmd64x_dma_ops = {
 static const struct ide_dma_ops cmd646_rev1_dma_ops = {
        .dma_host_set           = ide_dma_host_set,
        .dma_setup              = ide_dma_setup,
-       .dma_exec_cmd           = ide_dma_exec_cmd,
        .dma_start              = ide_dma_start,
        .dma_end                = cmd646_1_dma_end,
        .dma_test_irq           = ide_dma_test_irq,
        .dma_lost_irq           = ide_dma_lost_irq,
+       .dma_timer_expiry       = ide_dma_sff_timer_expiry,
        .dma_timeout            = ide_dma_timeout,
        .dma_sff_read_status    = ide_dma_sff_read_status,
 };
@@ -403,11 +403,11 @@ static const struct ide_dma_ops cmd646_rev1_dma_ops = {
 static const struct ide_dma_ops cmd648_dma_ops = {
        .dma_host_set           = ide_dma_host_set,
        .dma_setup              = ide_dma_setup,
-       .dma_exec_cmd           = ide_dma_exec_cmd,
        .dma_start              = ide_dma_start,
        .dma_end                = cmd648_dma_end,
        .dma_test_irq           = cmd648_dma_test_irq,
        .dma_lost_irq           = ide_dma_lost_irq,
+       .dma_timer_expiry       = ide_dma_sff_timer_expiry,
        .dma_timeout            = ide_dma_timeout,
        .dma_sff_read_status    = ide_dma_sff_read_status,
 };
index 7a62db719a46320e6ab5039cd7ebd27b8b3bc3e4..d5dcf4899607a2fffc8d73af02f9113b29a6460d 100644 (file)
@@ -231,11 +231,11 @@ static const struct ide_port_ops cs5536_port_ops = {
 static const struct ide_dma_ops cs5536_dma_ops = {
        .dma_host_set           = ide_dma_host_set,
        .dma_setup              = ide_dma_setup,
-       .dma_exec_cmd           = ide_dma_exec_cmd,
        .dma_start              = cs5536_dma_start,
        .dma_end                = cs5536_dma_end,
        .dma_test_irq           = ide_dma_test_irq,
        .dma_lost_irq           = ide_dma_lost_irq,
+       .dma_timer_expiry       = ide_dma_sff_timer_expiry,
        .dma_timeout            = ide_dma_timeout,
 };
 
index d3b3e824f445e53bae0270152b6bb185d5fb889e..dbaf184ed9c5a47f74be619ebabb612c344379d5 100644 (file)
@@ -1418,11 +1418,11 @@ static const struct ide_port_ops hpt3xx_port_ops = {
 static const struct ide_dma_ops hpt37x_dma_ops = {
        .dma_host_set           = ide_dma_host_set,
        .dma_setup              = ide_dma_setup,
-       .dma_exec_cmd           = ide_dma_exec_cmd,
        .dma_start              = ide_dma_start,
        .dma_end                = hpt374_dma_end,
        .dma_test_irq           = hpt374_dma_test_irq,
        .dma_lost_irq           = ide_dma_lost_irq,
+       .dma_timer_expiry       = ide_dma_sff_timer_expiry,
        .dma_timeout            = ide_dma_timeout,
        .dma_sff_read_status    = ide_dma_sff_read_status,
 };
@@ -1430,11 +1430,11 @@ static const struct ide_dma_ops hpt37x_dma_ops = {
 static const struct ide_dma_ops hpt370_dma_ops = {
        .dma_host_set           = ide_dma_host_set,
        .dma_setup              = ide_dma_setup,
-       .dma_exec_cmd           = ide_dma_exec_cmd,
        .dma_start              = hpt370_dma_start,
        .dma_end                = hpt370_dma_end,
        .dma_test_irq           = ide_dma_test_irq,
        .dma_lost_irq           = ide_dma_lost_irq,
+       .dma_timer_expiry       = ide_dma_sff_timer_expiry,
        .dma_timeout            = hpt370_dma_timeout,
        .dma_sff_read_status    = ide_dma_sff_read_status,
 };
@@ -1442,11 +1442,11 @@ static const struct ide_dma_ops hpt370_dma_ops = {
 static const struct ide_dma_ops hpt36x_dma_ops = {
        .dma_host_set           = ide_dma_host_set,
        .dma_setup              = ide_dma_setup,
-       .dma_exec_cmd           = ide_dma_exec_cmd,
        .dma_start              = ide_dma_start,
        .dma_end                = ide_dma_end,
        .dma_test_irq           = ide_dma_test_irq,
        .dma_lost_irq           = hpt366_dma_lost_irq,
+       .dma_timer_expiry       = ide_dma_sff_timer_expiry,
        .dma_timeout            = ide_dma_timeout,
        .dma_sff_read_status    = ide_dma_sff_read_status,
 };
index 3628b214790236f5d76126a848c3fee814783e07..51ce404fe53234b976cf851dd0b482c5200302b9 100644 (file)
@@ -351,12 +351,6 @@ static int icside_dma_setup(ide_drive_t *drive, struct ide_cmd *cmd)
        return 0;
 }
 
-static void icside_dma_exec_cmd(ide_drive_t *drive, u8 cmd)
-{
-       /* issue cmd to drive */
-       ide_execute_command(drive, cmd, ide_dma_intr, 2 * WAIT_CMD, NULL);
-}
-
 static int icside_dma_test_irq(ide_drive_t *drive)
 {
        ide_hwif_t *hwif = drive->hwif;
@@ -380,7 +374,6 @@ static int icside_dma_init(ide_hwif_t *hwif, const struct ide_port_info *d)
 static const struct ide_dma_ops icside_v6_dma_ops = {
        .dma_host_set           = icside_dma_host_set,
        .dma_setup              = icside_dma_setup,
-       .dma_exec_cmd           = icside_dma_exec_cmd,
        .dma_start              = icside_dma_start,
        .dma_end                = icside_dma_end,
        .dma_test_irq           = icside_dma_test_irq,
index f1b1b71cb74caf4e27c32a42bf7a28989cfa7725..f7fe1decb59d4720e4a3ec86ee5e62d42e94eb86 100644 (file)
@@ -691,8 +691,9 @@ ide_startstop_t ide_issue_pc(ide_drive_t *drive, struct ide_cmd *cmd)
        if (drive->atapi_flags & IDE_AFLAG_DRQ_INTERRUPT) {
                if (drive->dma)
                        drive->waiting_for_dma = 0;
+               hwif->expiry = expiry;
                ide_execute_command(drive, ATA_CMD_PACKET, ide_transfer_pc,
-                                   timeout, expiry);
+                                   timeout);
                return ide_started;
        } else {
                ide_execute_pkt_cmd(drive);
index b7eb810c7b8f7d79f1e68ec060bbef1e41c41aca..75a9ea2e4c822e6f14988dbe5f296b85327893df 100644 (file)
@@ -224,7 +224,7 @@ int ide_dma_setup(ide_drive_t *drive, struct ide_cmd *cmd)
 EXPORT_SYMBOL_GPL(ide_dma_setup);
 
 /**
- *     dma_timer_expiry        -       handle a DMA timeout
+ *     ide_dma_sff_timer_expiry        -       handle a DMA timeout
  *     @drive: Drive that timed out
  *
  *     An IDE DMA transfer timed out. In the event of an error we ask
@@ -237,7 +237,7 @@ EXPORT_SYMBOL_GPL(ide_dma_setup);
  *     This can occur if an interrupt is lost or due to hang or bugs.
  */
 
-static int dma_timer_expiry(ide_drive_t *drive)
+int ide_dma_sff_timer_expiry(ide_drive_t *drive)
 {
        ide_hwif_t *hwif = drive->hwif;
        u8 dma_stat = hwif->dma_ops->dma_sff_read_status(hwif);
@@ -261,14 +261,7 @@ static int dma_timer_expiry(ide_drive_t *drive)
 
        return 0;       /* Status is unknown -- reset the bus */
 }
-
-void ide_dma_exec_cmd(ide_drive_t *drive, u8 command)
-{
-       /* issue cmd to drive */
-       ide_execute_command(drive, command, &ide_dma_intr, 2 * WAIT_CMD,
-                           dma_timer_expiry);
-}
-EXPORT_SYMBOL_GPL(ide_dma_exec_cmd);
+EXPORT_SYMBOL_GPL(ide_dma_sff_timer_expiry);
 
 void ide_dma_start(ide_drive_t *drive)
 {
@@ -342,10 +335,10 @@ EXPORT_SYMBOL_GPL(ide_dma_test_irq);
 const struct ide_dma_ops sff_dma_ops = {
        .dma_host_set           = ide_dma_host_set,
        .dma_setup              = ide_dma_setup,
-       .dma_exec_cmd           = ide_dma_exec_cmd,
        .dma_start              = ide_dma_start,
        .dma_end                = ide_dma_end,
        .dma_test_irq           = ide_dma_test_irq,
+       .dma_timer_expiry       = ide_dma_sff_timer_expiry,
        .dma_timeout            = ide_dma_timeout,
        .dma_lost_irq           = ide_dma_lost_irq,
        .dma_sff_read_status    = ide_dma_sff_read_status,
index ad4edab9b0a9a62481e5be63afecbd7dd80ed04f..3dbf80c15491573cf7188d8597ea2e4217f9d416 100644 (file)
@@ -110,7 +110,6 @@ ide_startstop_t ide_dma_intr(ide_drive_t *drive)
        }
        return ide_error(drive, "dma_intr", stat);
 }
-EXPORT_SYMBOL_GPL(ide_dma_intr);
 
 int ide_dma_good_drive(ide_drive_t *drive)
 {
index 916495ba45df52627abe6e622beb72ebd4127109..52c1258ba9f4c80bd58bdd4fc1dfa78209af4c0d 100644 (file)
@@ -454,7 +454,6 @@ EXPORT_SYMBOL(ide_set_handler);
  *     @command: command byte to write
  *     @handler: handler for next phase
  *     @timeout: timeout for command
- *     @expiry:  handler to run on timeout
  *
  *     Helper function to issue an IDE command. This handles the
  *     atomicity requirements, command timing and ensures that the
@@ -463,13 +462,11 @@ EXPORT_SYMBOL(ide_set_handler);
  */
 
 void ide_execute_command(ide_drive_t *drive, u8 cmd, ide_handler_t *handler,
-                        unsigned timeout, ide_expiry_t *expiry)
+                        unsigned timeout)
 {
        ide_hwif_t *hwif = drive->hwif;
        unsigned long flags;
 
-       hwif->expiry = expiry;
-
        spin_lock_irqsave(&hwif->lock, flags);
        __ide_set_handler(drive, handler, timeout);
        hwif->tp_ops->exec_command(hwif, cmd);
@@ -482,7 +479,6 @@ void ide_execute_command(ide_drive_t *drive, u8 cmd, ide_handler_t *handler,
        ndelay(400);
        spin_unlock_irqrestore(&hwif->lock, flags);
 }
-EXPORT_SYMBOL(ide_execute_command);
 
 void ide_execute_pkt_cmd(ide_drive_t *drive)
 {
index 286804142e4dc624f018e3efd82d0e995be51bbd..f5cf04cf5712ab9b01cc78da9dedeea00c310f80 100644 (file)
@@ -98,14 +98,16 @@ ide_startstop_t do_rw_taskfile(ide_drive_t *drive, struct ide_cmd *orig_cmd)
                if (handler == NULL)
                        handler = task_no_data_intr;
                ide_execute_command(drive, tf->command, handler,
-                                   WAIT_WORSTCASE, NULL);
+                                   WAIT_WORSTCASE);
                return ide_started;
        case ATA_PROT_DMA:
                if ((drive->dev_flags & IDE_DFLAG_USING_DMA) == 0 ||
                    ide_build_sglist(drive, cmd) == 0 ||
                    dma_ops->dma_setup(drive, cmd))
                        return ide_stopped;
-               dma_ops->dma_exec_cmd(drive, tf->command);
+               hwif->expiry = dma_ops->dma_timer_expiry;
+               ide_execute_command(drive, tf->command, ide_dma_intr,
+                                   2 * WAIT_CMD);
                dma_ops->dma_start(drive);
        default:
                return ide_started;
index 6b9fc950b4af7af786e36e2858a3246979ee48a4..0d4ac65cf9494fe1a8bb0e0a231ef0229c8fb599 100644 (file)
@@ -508,10 +508,10 @@ static void it821x_quirkproc(ide_drive_t *drive)
 static struct ide_dma_ops it821x_pass_through_dma_ops = {
        .dma_host_set           = ide_dma_host_set,
        .dma_setup              = ide_dma_setup,
-       .dma_exec_cmd           = ide_dma_exec_cmd,
        .dma_start              = it821x_dma_start,
        .dma_end                = it821x_dma_end,
        .dma_test_irq           = ide_dma_test_irq,
+       .dma_timer_expiry       = ide_dma_sff_timer_expiry,
        .dma_timeout            = ide_dma_timeout,
        .dma_lost_irq           = ide_dma_lost_irq,
        .dma_sff_read_status    = ide_dma_sff_read_status,
index cf6d9a9c8a27b761cb3afaa88330119be4fe69a6..7b65fe5bf4490c8edd3839859c66e07397bc6cb1 100644 (file)
@@ -301,11 +301,11 @@ static const struct ide_port_ops ns87415_port_ops = {
 static const struct ide_dma_ops ns87415_dma_ops = {
        .dma_host_set           = ide_dma_host_set,
        .dma_setup              = ns87415_dma_setup,
-       .dma_exec_cmd           = ide_dma_exec_cmd,
        .dma_start              = ide_dma_start,
        .dma_end                = ns87415_dma_end,
        .dma_test_irq           = ide_dma_test_irq,
        .dma_lost_irq           = ide_dma_lost_irq,
+       .dma_timer_expiry       = ide_dma_sff_timer_expiry,
        .dma_timeout            = ide_dma_timeout,
        .dma_sff_read_status    = superio_dma_sff_read_status,
 };
index cba66ebce4e341c977baff6b8d311c56c2074382..f7536d1943f7ddd2001f73fd8f0dafe431290899 100644 (file)
@@ -331,11 +331,11 @@ static const struct ide_port_ops pdc2026x_port_ops = {
 static const struct ide_dma_ops pdc20246_dma_ops = {
        .dma_host_set           = ide_dma_host_set,
        .dma_setup              = ide_dma_setup,
-       .dma_exec_cmd           = ide_dma_exec_cmd,
        .dma_start              = ide_dma_start,
        .dma_end                = ide_dma_end,
        .dma_test_irq           = pdc202xx_dma_test_irq,
        .dma_lost_irq           = pdc202xx_dma_lost_irq,
+       .dma_timer_expiry       = ide_dma_sff_timer_expiry,
        .dma_timeout            = pdc202xx_dma_timeout,
        .dma_sff_read_status    = ide_dma_sff_read_status,
 };
@@ -343,11 +343,11 @@ static const struct ide_dma_ops pdc20246_dma_ops = {
 static const struct ide_dma_ops pdc2026x_dma_ops = {
        .dma_host_set           = ide_dma_host_set,
        .dma_setup              = ide_dma_setup,
-       .dma_exec_cmd           = ide_dma_exec_cmd,
        .dma_start              = pdc202xx_dma_start,
        .dma_end                = pdc202xx_dma_end,
        .dma_test_irq           = pdc202xx_dma_test_irq,
        .dma_lost_irq           = pdc202xx_dma_lost_irq,
+       .dma_timer_expiry       = ide_dma_sff_timer_expiry,
        .dma_timeout            = pdc202xx_dma_timeout,
        .dma_sff_read_status    = ide_dma_sff_read_status,
 };
index 337d2d5b30286710fe493c84a3a582a1bdc87a47..2bfcfedaa0762399278b36aee7d27fa5eaebc7b1 100644 (file)
@@ -1527,13 +1527,6 @@ static int pmac_ide_dma_setup(ide_drive_t *drive, struct ide_cmd *cmd)
        return 0;
 }
 
-static void
-pmac_ide_dma_exec_cmd(ide_drive_t *drive, u8 command)
-{
-       /* issue cmd to drive */
-       ide_execute_command(drive, command, &ide_dma_intr, 2*WAIT_CMD, NULL);
-}
-
 /*
  * Kick the DMA controller into life after the DMA command has been issued
  * to the drive.
@@ -1654,7 +1647,6 @@ pmac_ide_dma_lost_irq (ide_drive_t *drive)
 static const struct ide_dma_ops pmac_dma_ops = {
        .dma_host_set           = pmac_ide_dma_host_set,
        .dma_setup              = pmac_ide_dma_setup,
-       .dma_exec_cmd           = pmac_ide_dma_exec_cmd,
        .dma_start              = pmac_ide_dma_start,
        .dma_end                = pmac_ide_dma_end,
        .dma_test_irq           = pmac_ide_dma_test_irq,
index dbdd2985a0d8f7f89b58df5cd9a440dc74df9918..1c3a82914999fa7aba1c533c3571736551cd3c57 100644 (file)
@@ -286,11 +286,11 @@ static const struct ide_port_ops sc1200_port_ops = {
 static const struct ide_dma_ops sc1200_dma_ops = {
        .dma_host_set           = ide_dma_host_set,
        .dma_setup              = ide_dma_setup,
-       .dma_exec_cmd           = ide_dma_exec_cmd,
        .dma_start              = ide_dma_start,
        .dma_end                = sc1200_dma_end,
        .dma_test_irq           = ide_dma_test_irq,
        .dma_lost_irq           = ide_dma_lost_irq,
+       .dma_timer_expiry       = ide_dma_sff_timer_expiry,
        .dma_timeout            = ide_dma_timeout,
        .dma_sff_read_status    = ide_dma_sff_read_status,
 };
index 1f2805ce9889c5a58570316193dd9c0dca4cbf07..0cc137cfe76d57f60577de9a8043ea29cb475d31 100644 (file)
@@ -868,12 +868,12 @@ static const struct ide_port_ops scc_port_ops = {
 static const struct ide_dma_ops scc_dma_ops = {
        .dma_host_set           = scc_dma_host_set,
        .dma_setup              = scc_dma_setup,
-       .dma_exec_cmd           = ide_dma_exec_cmd,
        .dma_start              = scc_dma_start,
        .dma_end                = scc_dma_end,
        .dma_test_irq           = scc_dma_test_irq,
        .dma_lost_irq           = ide_dma_lost_irq,
        .dma_timeout            = ide_dma_timeout,
+       .dma_timer_expiry       = ide_dma_sff_timer_expiry,
        .dma_sff_read_status    = scc_dma_sff_read_status,
 };
 
index 1811ae9cd8430a60367a93e281f9c7d3c34157f9..075cb1243b2a6a117e1eaa7324b3805973166417 100644 (file)
@@ -711,10 +711,10 @@ static const struct ide_port_ops sil_sata_port_ops = {
 static const struct ide_dma_ops sil_dma_ops = {
        .dma_host_set           = ide_dma_host_set,
        .dma_setup              = ide_dma_setup,
-       .dma_exec_cmd           = ide_dma_exec_cmd,
        .dma_start              = ide_dma_start,
        .dma_end                = ide_dma_end,
        .dma_test_irq           = siimage_dma_test_irq,
+       .dma_timer_expiry       = ide_dma_sff_timer_expiry,
        .dma_timeout            = ide_dma_timeout,
        .dma_lost_irq           = ide_dma_lost_irq,
        .dma_sff_read_status    = ide_dma_sff_read_status,
index dba213c51baa98f293e007a6b69b3a87ccd1607a..d25137b04e7a2d357bba29c7d798b864d55ad629 100644 (file)
@@ -293,11 +293,11 @@ static const struct ide_port_ops sl82c105_port_ops = {
 static const struct ide_dma_ops sl82c105_dma_ops = {
        .dma_host_set           = ide_dma_host_set,
        .dma_setup              = ide_dma_setup,
-       .dma_exec_cmd           = ide_dma_exec_cmd,
        .dma_start              = sl82c105_dma_start,
        .dma_end                = sl82c105_dma_end,
        .dma_test_irq           = ide_dma_test_irq,
        .dma_lost_irq           = sl82c105_dma_lost_irq,
+       .dma_timer_expiry       = ide_dma_sff_timer_expiry,
        .dma_timeout            = sl82c105_dma_timeout,
        .dma_sff_read_status    = ide_dma_sff_read_status,
 };
index 84109f5a163228989711b073c7a4b5ffc1e741b9..427d4b3c2c636d37c3888464c3ce42b37290e7c8 100644 (file)
@@ -182,11 +182,11 @@ static const struct ide_port_ops tc86c001_port_ops = {
 static const struct ide_dma_ops tc86c001_dma_ops = {
        .dma_host_set           = ide_dma_host_set,
        .dma_setup              = ide_dma_setup,
-       .dma_exec_cmd           = ide_dma_exec_cmd,
        .dma_start              = tc86c001_dma_start,
        .dma_end                = ide_dma_end,
        .dma_test_irq           = ide_dma_test_irq,
        .dma_lost_irq           = ide_dma_lost_irq,
+       .dma_timer_expiry       = ide_dma_sff_timer_expiry,
        .dma_timeout            = ide_dma_timeout,
        .dma_sff_read_status    = ide_dma_sff_read_status,
 };
index 746858a7338dc6456ea71b30bd4721cae4afd0d0..ed1496845a9395b379d5b572d6ac098ec5457ca4 100644 (file)
@@ -176,11 +176,6 @@ static void trm290_selectproc (ide_drive_t *drive)
        trm290_prepare_drive(drive, !!(drive->dev_flags & IDE_DFLAG_USING_DMA));
 }
 
-static void trm290_dma_exec_cmd(ide_drive_t *drive, u8 command)
-{
-       ide_execute_command(drive, command, &ide_dma_intr, WAIT_CMD, NULL);
-}
-
 static int trm290_dma_setup(ide_drive_t *drive, struct ide_cmd *cmd)
 {
        ide_hwif_t *hwif = drive->hwif;
@@ -315,7 +310,6 @@ static const struct ide_port_ops trm290_port_ops = {
 static struct ide_dma_ops trm290_dma_ops = {
        .dma_host_set           = trm290_dma_host_set,
        .dma_setup              = trm290_dma_setup,
-       .dma_exec_cmd           = trm290_dma_exec_cmd,
        .dma_start              = trm290_dma_start,
        .dma_end                = trm290_dma_end,
        .dma_test_irq           = trm290_dma_test_irq,
index 39e3316ab63f7ea3111dd4aa5c933f80aa6b82af..e0e0a803dde38d92de14f620eb5f3fe798d1bd69 100644 (file)
@@ -627,11 +627,11 @@ static const struct ide_port_ops tx4939ide_port_ops = {
 static const struct ide_dma_ops tx4939ide_dma_ops = {
        .dma_host_set           = tx4939ide_dma_host_set,
        .dma_setup              = tx4939ide_dma_setup,
-       .dma_exec_cmd           = ide_dma_exec_cmd,
        .dma_start              = ide_dma_start,
        .dma_end                = tx4939ide_dma_end,
        .dma_test_irq           = tx4939ide_dma_test_irq,
        .dma_lost_irq           = ide_dma_lost_irq,
+       .dma_timer_expiry       = ide_dma_sff_timer_expiry,
        .dma_timeout            = ide_dma_timeout,
        .dma_sff_read_status    = tx4939ide_dma_sff_read_status,
 };
index 476f59885fda4579fab0ade9dfbc5c4e24e01f9d..9476939101be7c3a2e48c4e2506a942b5213b37e 100644 (file)
@@ -715,11 +715,11 @@ struct ide_port_ops {
 struct ide_dma_ops {
        void    (*dma_host_set)(struct ide_drive_s *, int);
        int     (*dma_setup)(struct ide_drive_s *, struct ide_cmd *);
-       void    (*dma_exec_cmd)(struct ide_drive_s *, u8);
        void    (*dma_start)(struct ide_drive_s *);
        int     (*dma_end)(struct ide_drive_s *);
        int     (*dma_test_irq)(struct ide_drive_s *);
        void    (*dma_lost_irq)(struct ide_drive_s *);
+       int     (*dma_timer_expiry)(struct ide_drive_s *);
        void    (*dma_timeout)(struct ide_drive_s *);
        /*
         * The following method is optional and only required to be
@@ -1138,8 +1138,7 @@ void ide_kill_rq(ide_drive_t *, struct request *);
 void __ide_set_handler(ide_drive_t *, ide_handler_t *, unsigned int);
 void ide_set_handler(ide_drive_t *, ide_handler_t *, unsigned int);
 
-void ide_execute_command(ide_drive_t *, u8, ide_handler_t *, unsigned int,
-                        ide_expiry_t *);
+void ide_execute_command(ide_drive_t *, u8, ide_handler_t *, unsigned int);
 
 void ide_execute_pkt_cmd(ide_drive_t *);
 
@@ -1453,10 +1452,10 @@ int config_drive_for_dma(ide_drive_t *);
 int ide_build_dmatable(ide_drive_t *, struct ide_cmd *);
 void ide_dma_host_set(ide_drive_t *, int);
 int ide_dma_setup(ide_drive_t *, struct ide_cmd *);
-void ide_dma_exec_cmd(ide_drive_t *, u8);
 extern void ide_dma_start(ide_drive_t *);
 int ide_dma_end(ide_drive_t *);
 int ide_dma_test_irq(ide_drive_t *);
+int ide_dma_sff_timer_expiry(ide_drive_t *);
 u8 ide_dma_sff_read_status(ide_hwif_t *);
 extern const struct ide_dma_ops sff_dma_ops;
 #else
@@ -1477,6 +1476,7 @@ static inline void ide_dma_on(ide_drive_t *drive) { ; }
 static inline void ide_dma_verbose(ide_drive_t *drive) { ; }
 static inline int ide_set_dma(ide_drive_t *drive) { return 1; }
 static inline void ide_check_dma_crc(ide_drive_t *drive) { ; }
+static inline ide_startstop_t ide_dma_intr(ide_drive_t *drive) { return ide_stopped; }
 static inline ide_startstop_t ide_dma_timeout_retry(ide_drive_t *drive, int error) { return ide_stopped; }
 static inline void ide_release_dma_engine(ide_hwif_t *hwif) { ; }
 static inline int ide_build_sglist(ide_drive_t *drive,