aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/alim15x3.c2
-rw-r--r--drivers/ide/au1xxx-ide.c8
-rw-r--r--drivers/ide/cmd64x.c6
-rw-r--r--drivers/ide/cs5536.c2
-rw-r--r--drivers/ide/hpt366.c6
-rw-r--r--drivers/ide/icside.c7
-rw-r--r--drivers/ide/ide-atapi.c3
-rw-r--r--drivers/ide/ide-dma-sff.c15
-rw-r--r--drivers/ide/ide-dma.c1
-rw-r--r--drivers/ide/ide-iops.c6
-rw-r--r--drivers/ide/ide-taskfile.c6
-rw-r--r--drivers/ide/it821x.c2
-rw-r--r--drivers/ide/ns87415.c2
-rw-r--r--drivers/ide/pdc202xx_old.c4
-rw-r--r--drivers/ide/pmac.c8
-rw-r--r--drivers/ide/sc1200.c2
-rw-r--r--drivers/ide/scc_pata.c2
-rw-r--r--drivers/ide/siimage.c2
-rw-r--r--drivers/ide/sl82c105.c2
-rw-r--r--drivers/ide/tc86c001.c2
-rw-r--r--drivers/ide/trm290.c6
-rw-r--r--drivers/ide/tx4939ide.c2
22 files changed, 29 insertions, 67 deletions
diff --git a/drivers/ide/alim15x3.c b/drivers/ide/alim15x3.c
index e837fd9f196f..d516168464fc 100644
--- a/drivers/ide/alim15x3.c
+++ b/drivers/ide/alim15x3.c
@@ -504,11 +504,11 @@ static const struct ide_port_ops ali_port_ops = {
504static const struct ide_dma_ops ali_dma_ops = { 504static const struct ide_dma_ops ali_dma_ops = {
505 .dma_host_set = ide_dma_host_set, 505 .dma_host_set = ide_dma_host_set,
506 .dma_setup = ali15x3_dma_setup, 506 .dma_setup = ali15x3_dma_setup,
507 .dma_exec_cmd = ide_dma_exec_cmd,
508 .dma_start = ide_dma_start, 507 .dma_start = ide_dma_start,
509 .dma_end = ide_dma_end, 508 .dma_end = ide_dma_end,
510 .dma_test_irq = ide_dma_test_irq, 509 .dma_test_irq = ide_dma_test_irq,
511 .dma_lost_irq = ide_dma_lost_irq, 510 .dma_lost_irq = ide_dma_lost_irq,
511 .dma_timer_expiry = ide_dma_sff_timer_expiry,
512 .dma_timeout = ide_dma_timeout, 512 .dma_timeout = ide_dma_timeout,
513 .dma_sff_read_status = ide_dma_sff_read_status, 513 .dma_sff_read_status = ide_dma_sff_read_status,
514}; 514};
diff --git a/drivers/ide/au1xxx-ide.c b/drivers/ide/au1xxx-ide.c
index 58485d6cb026..d3a9d6c15328 100644
--- a/drivers/ide/au1xxx-ide.c
+++ b/drivers/ide/au1xxx-ide.c
@@ -290,13 +290,6 @@ static void auide_dma_start(ide_drive_t *drive )
290} 290}
291 291
292 292
293static void auide_dma_exec_cmd(ide_drive_t *drive, u8 command)
294{
295 /* issue cmd to drive */
296 ide_execute_command(drive, command, &ide_dma_intr,
297 (2*WAIT_CMD), NULL);
298}
299
300static int auide_dma_setup(ide_drive_t *drive, struct ide_cmd *cmd) 293static int auide_dma_setup(ide_drive_t *drive, struct ide_cmd *cmd)
301{ 294{
302 if (auide_build_dmatable(drive, cmd) == 0) { 295 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
356static const struct ide_dma_ops au1xxx_dma_ops = { 349static const struct ide_dma_ops au1xxx_dma_ops = {
357 .dma_host_set = auide_dma_host_set, 350 .dma_host_set = auide_dma_host_set,
358 .dma_setup = auide_dma_setup, 351 .dma_setup = auide_dma_setup,
359 .dma_exec_cmd = auide_dma_exec_cmd,
360 .dma_start = auide_dma_start, 352 .dma_start = auide_dma_start,
361 .dma_end = auide_dma_end, 353 .dma_end = auide_dma_end,
362 .dma_test_irq = auide_dma_test_irq, 354 .dma_test_irq = auide_dma_test_irq,
diff --git a/drivers/ide/cmd64x.c b/drivers/ide/cmd64x.c
index aeee036b1503..bf0e3f470824 100644
--- a/drivers/ide/cmd64x.c
+++ b/drivers/ide/cmd64x.c
@@ -379,11 +379,11 @@ static const struct ide_port_ops cmd64x_port_ops = {
379static const struct ide_dma_ops cmd64x_dma_ops = { 379static const struct ide_dma_ops cmd64x_dma_ops = {
380 .dma_host_set = ide_dma_host_set, 380 .dma_host_set = ide_dma_host_set,
381 .dma_setup = ide_dma_setup, 381 .dma_setup = ide_dma_setup,
382 .dma_exec_cmd = ide_dma_exec_cmd,
383 .dma_start = ide_dma_start, 382 .dma_start = ide_dma_start,
384 .dma_end = cmd64x_dma_end, 383 .dma_end = cmd64x_dma_end,
385 .dma_test_irq = cmd64x_dma_test_irq, 384 .dma_test_irq = cmd64x_dma_test_irq,
386 .dma_lost_irq = ide_dma_lost_irq, 385 .dma_lost_irq = ide_dma_lost_irq,
386 .dma_timer_expiry = ide_dma_sff_timer_expiry,
387 .dma_timeout = ide_dma_timeout, 387 .dma_timeout = ide_dma_timeout,
388 .dma_sff_read_status = ide_dma_sff_read_status, 388 .dma_sff_read_status = ide_dma_sff_read_status,
389}; 389};
@@ -391,11 +391,11 @@ static const struct ide_dma_ops cmd64x_dma_ops = {
391static const struct ide_dma_ops cmd646_rev1_dma_ops = { 391static const struct ide_dma_ops cmd646_rev1_dma_ops = {
392 .dma_host_set = ide_dma_host_set, 392 .dma_host_set = ide_dma_host_set,
393 .dma_setup = ide_dma_setup, 393 .dma_setup = ide_dma_setup,
394 .dma_exec_cmd = ide_dma_exec_cmd,
395 .dma_start = ide_dma_start, 394 .dma_start = ide_dma_start,
396 .dma_end = cmd646_1_dma_end, 395 .dma_end = cmd646_1_dma_end,
397 .dma_test_irq = ide_dma_test_irq, 396 .dma_test_irq = ide_dma_test_irq,
398 .dma_lost_irq = ide_dma_lost_irq, 397 .dma_lost_irq = ide_dma_lost_irq,
398 .dma_timer_expiry = ide_dma_sff_timer_expiry,
399 .dma_timeout = ide_dma_timeout, 399 .dma_timeout = ide_dma_timeout,
400 .dma_sff_read_status = ide_dma_sff_read_status, 400 .dma_sff_read_status = ide_dma_sff_read_status,
401}; 401};
@@ -403,11 +403,11 @@ static const struct ide_dma_ops cmd646_rev1_dma_ops = {
403static const struct ide_dma_ops cmd648_dma_ops = { 403static const struct ide_dma_ops cmd648_dma_ops = {
404 .dma_host_set = ide_dma_host_set, 404 .dma_host_set = ide_dma_host_set,
405 .dma_setup = ide_dma_setup, 405 .dma_setup = ide_dma_setup,
406 .dma_exec_cmd = ide_dma_exec_cmd,
407 .dma_start = ide_dma_start, 406 .dma_start = ide_dma_start,
408 .dma_end = cmd648_dma_end, 407 .dma_end = cmd648_dma_end,
409 .dma_test_irq = cmd648_dma_test_irq, 408 .dma_test_irq = cmd648_dma_test_irq,
410 .dma_lost_irq = ide_dma_lost_irq, 409 .dma_lost_irq = ide_dma_lost_irq,
410 .dma_timer_expiry = ide_dma_sff_timer_expiry,
411 .dma_timeout = ide_dma_timeout, 411 .dma_timeout = ide_dma_timeout,
412 .dma_sff_read_status = ide_dma_sff_read_status, 412 .dma_sff_read_status = ide_dma_sff_read_status,
413}; 413};
diff --git a/drivers/ide/cs5536.c b/drivers/ide/cs5536.c
index 7a62db719a46..d5dcf4899607 100644
--- a/drivers/ide/cs5536.c
+++ b/drivers/ide/cs5536.c
@@ -231,11 +231,11 @@ static const struct ide_port_ops cs5536_port_ops = {
231static const struct ide_dma_ops cs5536_dma_ops = { 231static const struct ide_dma_ops cs5536_dma_ops = {
232 .dma_host_set = ide_dma_host_set, 232 .dma_host_set = ide_dma_host_set,
233 .dma_setup = ide_dma_setup, 233 .dma_setup = ide_dma_setup,
234 .dma_exec_cmd = ide_dma_exec_cmd,
235 .dma_start = cs5536_dma_start, 234 .dma_start = cs5536_dma_start,
236 .dma_end = cs5536_dma_end, 235 .dma_end = cs5536_dma_end,
237 .dma_test_irq = ide_dma_test_irq, 236 .dma_test_irq = ide_dma_test_irq,
238 .dma_lost_irq = ide_dma_lost_irq, 237 .dma_lost_irq = ide_dma_lost_irq,
238 .dma_timer_expiry = ide_dma_sff_timer_expiry,
239 .dma_timeout = ide_dma_timeout, 239 .dma_timeout = ide_dma_timeout,
240}; 240};
241 241
diff --git a/drivers/ide/hpt366.c b/drivers/ide/hpt366.c
index d3b3e824f445..dbaf184ed9c5 100644
--- a/drivers/ide/hpt366.c
+++ b/drivers/ide/hpt366.c
@@ -1418,11 +1418,11 @@ static const struct ide_port_ops hpt3xx_port_ops = {
1418static const struct ide_dma_ops hpt37x_dma_ops = { 1418static const struct ide_dma_ops hpt37x_dma_ops = {
1419 .dma_host_set = ide_dma_host_set, 1419 .dma_host_set = ide_dma_host_set,
1420 .dma_setup = ide_dma_setup, 1420 .dma_setup = ide_dma_setup,
1421 .dma_exec_cmd = ide_dma_exec_cmd,
1422 .dma_start = ide_dma_start, 1421 .dma_start = ide_dma_start,
1423 .dma_end = hpt374_dma_end, 1422 .dma_end = hpt374_dma_end,
1424 .dma_test_irq = hpt374_dma_test_irq, 1423 .dma_test_irq = hpt374_dma_test_irq,
1425 .dma_lost_irq = ide_dma_lost_irq, 1424 .dma_lost_irq = ide_dma_lost_irq,
1425 .dma_timer_expiry = ide_dma_sff_timer_expiry,
1426 .dma_timeout = ide_dma_timeout, 1426 .dma_timeout = ide_dma_timeout,
1427 .dma_sff_read_status = ide_dma_sff_read_status, 1427 .dma_sff_read_status = ide_dma_sff_read_status,
1428}; 1428};
@@ -1430,11 +1430,11 @@ static const struct ide_dma_ops hpt37x_dma_ops = {
1430static const struct ide_dma_ops hpt370_dma_ops = { 1430static const struct ide_dma_ops hpt370_dma_ops = {
1431 .dma_host_set = ide_dma_host_set, 1431 .dma_host_set = ide_dma_host_set,
1432 .dma_setup = ide_dma_setup, 1432 .dma_setup = ide_dma_setup,
1433 .dma_exec_cmd = ide_dma_exec_cmd,
1434 .dma_start = hpt370_dma_start, 1433 .dma_start = hpt370_dma_start,
1435 .dma_end = hpt370_dma_end, 1434 .dma_end = hpt370_dma_end,
1436 .dma_test_irq = ide_dma_test_irq, 1435 .dma_test_irq = ide_dma_test_irq,
1437 .dma_lost_irq = ide_dma_lost_irq, 1436 .dma_lost_irq = ide_dma_lost_irq,
1437 .dma_timer_expiry = ide_dma_sff_timer_expiry,
1438 .dma_timeout = hpt370_dma_timeout, 1438 .dma_timeout = hpt370_dma_timeout,
1439 .dma_sff_read_status = ide_dma_sff_read_status, 1439 .dma_sff_read_status = ide_dma_sff_read_status,
1440}; 1440};
@@ -1442,11 +1442,11 @@ static const struct ide_dma_ops hpt370_dma_ops = {
1442static const struct ide_dma_ops hpt36x_dma_ops = { 1442static const struct ide_dma_ops hpt36x_dma_ops = {
1443 .dma_host_set = ide_dma_host_set, 1443 .dma_host_set = ide_dma_host_set,
1444 .dma_setup = ide_dma_setup, 1444 .dma_setup = ide_dma_setup,
1445 .dma_exec_cmd = ide_dma_exec_cmd,
1446 .dma_start = ide_dma_start, 1445 .dma_start = ide_dma_start,
1447 .dma_end = ide_dma_end, 1446 .dma_end = ide_dma_end,
1448 .dma_test_irq = ide_dma_test_irq, 1447 .dma_test_irq = ide_dma_test_irq,
1449 .dma_lost_irq = hpt366_dma_lost_irq, 1448 .dma_lost_irq = hpt366_dma_lost_irq,
1449 .dma_timer_expiry = ide_dma_sff_timer_expiry,
1450 .dma_timeout = ide_dma_timeout, 1450 .dma_timeout = ide_dma_timeout,
1451 .dma_sff_read_status = ide_dma_sff_read_status, 1451 .dma_sff_read_status = ide_dma_sff_read_status,
1452}; 1452};
diff --git a/drivers/ide/icside.c b/drivers/ide/icside.c
index 3628b2147902..51ce404fe532 100644
--- a/drivers/ide/icside.c
+++ b/drivers/ide/icside.c
@@ -351,12 +351,6 @@ static int icside_dma_setup(ide_drive_t *drive, struct ide_cmd *cmd)
351 return 0; 351 return 0;
352} 352}
353 353
354static void icside_dma_exec_cmd(ide_drive_t *drive, u8 cmd)
355{
356 /* issue cmd to drive */
357 ide_execute_command(drive, cmd, ide_dma_intr, 2 * WAIT_CMD, NULL);
358}
359
360static int icside_dma_test_irq(ide_drive_t *drive) 354static int icside_dma_test_irq(ide_drive_t *drive)
361{ 355{
362 ide_hwif_t *hwif = drive->hwif; 356 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)
380static const struct ide_dma_ops icside_v6_dma_ops = { 374static const struct ide_dma_ops icside_v6_dma_ops = {
381 .dma_host_set = icside_dma_host_set, 375 .dma_host_set = icside_dma_host_set,
382 .dma_setup = icside_dma_setup, 376 .dma_setup = icside_dma_setup,
383 .dma_exec_cmd = icside_dma_exec_cmd,
384 .dma_start = icside_dma_start, 377 .dma_start = icside_dma_start,
385 .dma_end = icside_dma_end, 378 .dma_end = icside_dma_end,
386 .dma_test_irq = icside_dma_test_irq, 379 .dma_test_irq = icside_dma_test_irq,
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c
index f1b1b71cb74c..f7fe1decb59d 100644
--- a/drivers/ide/ide-atapi.c
+++ b/drivers/ide/ide-atapi.c
@@ -691,8 +691,9 @@ ide_startstop_t ide_issue_pc(ide_drive_t *drive, struct ide_cmd *cmd)
691 if (drive->atapi_flags & IDE_AFLAG_DRQ_INTERRUPT) { 691 if (drive->atapi_flags & IDE_AFLAG_DRQ_INTERRUPT) {
692 if (drive->dma) 692 if (drive->dma)
693 drive->waiting_for_dma = 0; 693 drive->waiting_for_dma = 0;
694 hwif->expiry = expiry;
694 ide_execute_command(drive, ATA_CMD_PACKET, ide_transfer_pc, 695 ide_execute_command(drive, ATA_CMD_PACKET, ide_transfer_pc,
695 timeout, expiry); 696 timeout);
696 return ide_started; 697 return ide_started;
697 } else { 698 } else {
698 ide_execute_pkt_cmd(drive); 699 ide_execute_pkt_cmd(drive);
diff --git a/drivers/ide/ide-dma-sff.c b/drivers/ide/ide-dma-sff.c
index b7eb810c7b8f..75a9ea2e4c82 100644
--- a/drivers/ide/ide-dma-sff.c
+++ b/drivers/ide/ide-dma-sff.c
@@ -224,7 +224,7 @@ int ide_dma_setup(ide_drive_t *drive, struct ide_cmd *cmd)
224EXPORT_SYMBOL_GPL(ide_dma_setup); 224EXPORT_SYMBOL_GPL(ide_dma_setup);
225 225
226/** 226/**
227 * dma_timer_expiry - handle a DMA timeout 227 * ide_dma_sff_timer_expiry - handle a DMA timeout
228 * @drive: Drive that timed out 228 * @drive: Drive that timed out
229 * 229 *
230 * An IDE DMA transfer timed out. In the event of an error we ask 230 * An IDE DMA transfer timed out. In the event of an error we ask
@@ -237,7 +237,7 @@ EXPORT_SYMBOL_GPL(ide_dma_setup);
237 * This can occur if an interrupt is lost or due to hang or bugs. 237 * This can occur if an interrupt is lost or due to hang or bugs.
238 */ 238 */
239 239
240static int dma_timer_expiry(ide_drive_t *drive) 240int ide_dma_sff_timer_expiry(ide_drive_t *drive)
241{ 241{
242 ide_hwif_t *hwif = drive->hwif; 242 ide_hwif_t *hwif = drive->hwif;
243 u8 dma_stat = hwif->dma_ops->dma_sff_read_status(hwif); 243 u8 dma_stat = hwif->dma_ops->dma_sff_read_status(hwif);
@@ -261,14 +261,7 @@ static int dma_timer_expiry(ide_drive_t *drive)
261 261
262 return 0; /* Status is unknown -- reset the bus */ 262 return 0; /* Status is unknown -- reset the bus */
263} 263}
264 264EXPORT_SYMBOL_GPL(ide_dma_sff_timer_expiry);
265void ide_dma_exec_cmd(ide_drive_t *drive, u8 command)
266{
267 /* issue cmd to drive */
268 ide_execute_command(drive, command, &ide_dma_intr, 2 * WAIT_CMD,
269 dma_timer_expiry);
270}
271EXPORT_SYMBOL_GPL(ide_dma_exec_cmd);
272 265
273void ide_dma_start(ide_drive_t *drive) 266void ide_dma_start(ide_drive_t *drive)
274{ 267{
@@ -342,10 +335,10 @@ EXPORT_SYMBOL_GPL(ide_dma_test_irq);
342const struct ide_dma_ops sff_dma_ops = { 335const struct ide_dma_ops sff_dma_ops = {
343 .dma_host_set = ide_dma_host_set, 336 .dma_host_set = ide_dma_host_set,
344 .dma_setup = ide_dma_setup, 337 .dma_setup = ide_dma_setup,
345 .dma_exec_cmd = ide_dma_exec_cmd,
346 .dma_start = ide_dma_start, 338 .dma_start = ide_dma_start,
347 .dma_end = ide_dma_end, 339 .dma_end = ide_dma_end,
348 .dma_test_irq = ide_dma_test_irq, 340 .dma_test_irq = ide_dma_test_irq,
341 .dma_timer_expiry = ide_dma_sff_timer_expiry,
349 .dma_timeout = ide_dma_timeout, 342 .dma_timeout = ide_dma_timeout,
350 .dma_lost_irq = ide_dma_lost_irq, 343 .dma_lost_irq = ide_dma_lost_irq,
351 .dma_sff_read_status = ide_dma_sff_read_status, 344 .dma_sff_read_status = ide_dma_sff_read_status,
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c
index ad4edab9b0a9..3dbf80c15491 100644
--- a/drivers/ide/ide-dma.c
+++ b/drivers/ide/ide-dma.c
@@ -110,7 +110,6 @@ ide_startstop_t ide_dma_intr(ide_drive_t *drive)
110 } 110 }
111 return ide_error(drive, "dma_intr", stat); 111 return ide_error(drive, "dma_intr", stat);
112} 112}
113EXPORT_SYMBOL_GPL(ide_dma_intr);
114 113
115int ide_dma_good_drive(ide_drive_t *drive) 114int ide_dma_good_drive(ide_drive_t *drive)
116{ 115{
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c
index 916495ba45df..52c1258ba9f4 100644
--- a/drivers/ide/ide-iops.c
+++ b/drivers/ide/ide-iops.c
@@ -454,7 +454,6 @@ EXPORT_SYMBOL(ide_set_handler);
454 * @command: command byte to write 454 * @command: command byte to write
455 * @handler: handler for next phase 455 * @handler: handler for next phase
456 * @timeout: timeout for command 456 * @timeout: timeout for command
457 * @expiry: handler to run on timeout
458 * 457 *
459 * Helper function to issue an IDE command. This handles the 458 * Helper function to issue an IDE command. This handles the
460 * atomicity requirements, command timing and ensures that the 459 * atomicity requirements, command timing and ensures that the
@@ -463,13 +462,11 @@ EXPORT_SYMBOL(ide_set_handler);
463 */ 462 */
464 463
465void ide_execute_command(ide_drive_t *drive, u8 cmd, ide_handler_t *handler, 464void ide_execute_command(ide_drive_t *drive, u8 cmd, ide_handler_t *handler,
466 unsigned timeout, ide_expiry_t *expiry) 465 unsigned timeout)
467{ 466{
468 ide_hwif_t *hwif = drive->hwif; 467 ide_hwif_t *hwif = drive->hwif;
469 unsigned long flags; 468 unsigned long flags;
470 469
471 hwif->expiry = expiry;
472
473 spin_lock_irqsave(&hwif->lock, flags); 470 spin_lock_irqsave(&hwif->lock, flags);
474 __ide_set_handler(drive, handler, timeout); 471 __ide_set_handler(drive, handler, timeout);
475 hwif->tp_ops->exec_command(hwif, cmd); 472 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,
482 ndelay(400); 479 ndelay(400);
483 spin_unlock_irqrestore(&hwif->lock, flags); 480 spin_unlock_irqrestore(&hwif->lock, flags);
484} 481}
485EXPORT_SYMBOL(ide_execute_command);
486 482
487void ide_execute_pkt_cmd(ide_drive_t *drive) 483void ide_execute_pkt_cmd(ide_drive_t *drive)
488{ 484{
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
index 286804142e4d..f5cf04cf5712 100644
--- a/drivers/ide/ide-taskfile.c
+++ b/drivers/ide/ide-taskfile.c
@@ -98,14 +98,16 @@ ide_startstop_t do_rw_taskfile(ide_drive_t *drive, struct ide_cmd *orig_cmd)
98 if (handler == NULL) 98 if (handler == NULL)
99 handler = task_no_data_intr; 99 handler = task_no_data_intr;
100 ide_execute_command(drive, tf->command, handler, 100 ide_execute_command(drive, tf->command, handler,
101 WAIT_WORSTCASE, NULL); 101 WAIT_WORSTCASE);
102 return ide_started; 102 return ide_started;
103 case ATA_PROT_DMA: 103 case ATA_PROT_DMA:
104 if ((drive->dev_flags & IDE_DFLAG_USING_DMA) == 0 || 104 if ((drive->dev_flags & IDE_DFLAG_USING_DMA) == 0 ||
105 ide_build_sglist(drive, cmd) == 0 || 105 ide_build_sglist(drive, cmd) == 0 ||
106 dma_ops->dma_setup(drive, cmd)) 106 dma_ops->dma_setup(drive, cmd))
107 return ide_stopped; 107 return ide_stopped;
108 dma_ops->dma_exec_cmd(drive, tf->command); 108 hwif->expiry = dma_ops->dma_timer_expiry;
109 ide_execute_command(drive, tf->command, ide_dma_intr,
110 2 * WAIT_CMD);
109 dma_ops->dma_start(drive); 111 dma_ops->dma_start(drive);
110 default: 112 default:
111 return ide_started; 113 return ide_started;
diff --git a/drivers/ide/it821x.c b/drivers/ide/it821x.c
index 6b9fc950b4af..0d4ac65cf949 100644
--- a/drivers/ide/it821x.c
+++ b/drivers/ide/it821x.c
@@ -508,10 +508,10 @@ static void it821x_quirkproc(ide_drive_t *drive)
508static struct ide_dma_ops it821x_pass_through_dma_ops = { 508static struct ide_dma_ops it821x_pass_through_dma_ops = {
509 .dma_host_set = ide_dma_host_set, 509 .dma_host_set = ide_dma_host_set,
510 .dma_setup = ide_dma_setup, 510 .dma_setup = ide_dma_setup,
511 .dma_exec_cmd = ide_dma_exec_cmd,
512 .dma_start = it821x_dma_start, 511 .dma_start = it821x_dma_start,
513 .dma_end = it821x_dma_end, 512 .dma_end = it821x_dma_end,
514 .dma_test_irq = ide_dma_test_irq, 513 .dma_test_irq = ide_dma_test_irq,
514 .dma_timer_expiry = ide_dma_sff_timer_expiry,
515 .dma_timeout = ide_dma_timeout, 515 .dma_timeout = ide_dma_timeout,
516 .dma_lost_irq = ide_dma_lost_irq, 516 .dma_lost_irq = ide_dma_lost_irq,
517 .dma_sff_read_status = ide_dma_sff_read_status, 517 .dma_sff_read_status = ide_dma_sff_read_status,
diff --git a/drivers/ide/ns87415.c b/drivers/ide/ns87415.c
index cf6d9a9c8a27..7b65fe5bf449 100644
--- a/drivers/ide/ns87415.c
+++ b/drivers/ide/ns87415.c
@@ -301,11 +301,11 @@ static const struct ide_port_ops ns87415_port_ops = {
301static const struct ide_dma_ops ns87415_dma_ops = { 301static const struct ide_dma_ops ns87415_dma_ops = {
302 .dma_host_set = ide_dma_host_set, 302 .dma_host_set = ide_dma_host_set,
303 .dma_setup = ns87415_dma_setup, 303 .dma_setup = ns87415_dma_setup,
304 .dma_exec_cmd = ide_dma_exec_cmd,
305 .dma_start = ide_dma_start, 304 .dma_start = ide_dma_start,
306 .dma_end = ns87415_dma_end, 305 .dma_end = ns87415_dma_end,
307 .dma_test_irq = ide_dma_test_irq, 306 .dma_test_irq = ide_dma_test_irq,
308 .dma_lost_irq = ide_dma_lost_irq, 307 .dma_lost_irq = ide_dma_lost_irq,
308 .dma_timer_expiry = ide_dma_sff_timer_expiry,
309 .dma_timeout = ide_dma_timeout, 309 .dma_timeout = ide_dma_timeout,
310 .dma_sff_read_status = superio_dma_sff_read_status, 310 .dma_sff_read_status = superio_dma_sff_read_status,
311}; 311};
diff --git a/drivers/ide/pdc202xx_old.c b/drivers/ide/pdc202xx_old.c
index cba66ebce4e3..f7536d1943f7 100644
--- a/drivers/ide/pdc202xx_old.c
+++ b/drivers/ide/pdc202xx_old.c
@@ -331,11 +331,11 @@ static const struct ide_port_ops pdc2026x_port_ops = {
331static const struct ide_dma_ops pdc20246_dma_ops = { 331static const struct ide_dma_ops pdc20246_dma_ops = {
332 .dma_host_set = ide_dma_host_set, 332 .dma_host_set = ide_dma_host_set,
333 .dma_setup = ide_dma_setup, 333 .dma_setup = ide_dma_setup,
334 .dma_exec_cmd = ide_dma_exec_cmd,
335 .dma_start = ide_dma_start, 334 .dma_start = ide_dma_start,
336 .dma_end = ide_dma_end, 335 .dma_end = ide_dma_end,
337 .dma_test_irq = pdc202xx_dma_test_irq, 336 .dma_test_irq = pdc202xx_dma_test_irq,
338 .dma_lost_irq = pdc202xx_dma_lost_irq, 337 .dma_lost_irq = pdc202xx_dma_lost_irq,
338 .dma_timer_expiry = ide_dma_sff_timer_expiry,
339 .dma_timeout = pdc202xx_dma_timeout, 339 .dma_timeout = pdc202xx_dma_timeout,
340 .dma_sff_read_status = ide_dma_sff_read_status, 340 .dma_sff_read_status = ide_dma_sff_read_status,
341}; 341};
@@ -343,11 +343,11 @@ static const struct ide_dma_ops pdc20246_dma_ops = {
343static const struct ide_dma_ops pdc2026x_dma_ops = { 343static const struct ide_dma_ops pdc2026x_dma_ops = {
344 .dma_host_set = ide_dma_host_set, 344 .dma_host_set = ide_dma_host_set,
345 .dma_setup = ide_dma_setup, 345 .dma_setup = ide_dma_setup,
346 .dma_exec_cmd = ide_dma_exec_cmd,
347 .dma_start = pdc202xx_dma_start, 346 .dma_start = pdc202xx_dma_start,
348 .dma_end = pdc202xx_dma_end, 347 .dma_end = pdc202xx_dma_end,
349 .dma_test_irq = pdc202xx_dma_test_irq, 348 .dma_test_irq = pdc202xx_dma_test_irq,
350 .dma_lost_irq = pdc202xx_dma_lost_irq, 349 .dma_lost_irq = pdc202xx_dma_lost_irq,
350 .dma_timer_expiry = ide_dma_sff_timer_expiry,
351 .dma_timeout = pdc202xx_dma_timeout, 351 .dma_timeout = pdc202xx_dma_timeout,
352 .dma_sff_read_status = ide_dma_sff_read_status, 352 .dma_sff_read_status = ide_dma_sff_read_status,
353}; 353};
diff --git a/drivers/ide/pmac.c b/drivers/ide/pmac.c
index 337d2d5b3028..2bfcfedaa076 100644
--- a/drivers/ide/pmac.c
+++ b/drivers/ide/pmac.c
@@ -1527,13 +1527,6 @@ static int pmac_ide_dma_setup(ide_drive_t *drive, struct ide_cmd *cmd)
1527 return 0; 1527 return 0;
1528} 1528}
1529 1529
1530static void
1531pmac_ide_dma_exec_cmd(ide_drive_t *drive, u8 command)
1532{
1533 /* issue cmd to drive */
1534 ide_execute_command(drive, command, &ide_dma_intr, 2*WAIT_CMD, NULL);
1535}
1536
1537/* 1530/*
1538 * Kick the DMA controller into life after the DMA command has been issued 1531 * Kick the DMA controller into life after the DMA command has been issued
1539 * to the drive. 1532 * to the drive.
@@ -1654,7 +1647,6 @@ pmac_ide_dma_lost_irq (ide_drive_t *drive)
1654static const struct ide_dma_ops pmac_dma_ops = { 1647static const struct ide_dma_ops pmac_dma_ops = {
1655 .dma_host_set = pmac_ide_dma_host_set, 1648 .dma_host_set = pmac_ide_dma_host_set,
1656 .dma_setup = pmac_ide_dma_setup, 1649 .dma_setup = pmac_ide_dma_setup,
1657 .dma_exec_cmd = pmac_ide_dma_exec_cmd,
1658 .dma_start = pmac_ide_dma_start, 1650 .dma_start = pmac_ide_dma_start,
1659 .dma_end = pmac_ide_dma_end, 1651 .dma_end = pmac_ide_dma_end,
1660 .dma_test_irq = pmac_ide_dma_test_irq, 1652 .dma_test_irq = pmac_ide_dma_test_irq,
diff --git a/drivers/ide/sc1200.c b/drivers/ide/sc1200.c
index dbdd2985a0d8..1c3a82914999 100644
--- a/drivers/ide/sc1200.c
+++ b/drivers/ide/sc1200.c
@@ -286,11 +286,11 @@ static const struct ide_port_ops sc1200_port_ops = {
286static const struct ide_dma_ops sc1200_dma_ops = { 286static const struct ide_dma_ops sc1200_dma_ops = {
287 .dma_host_set = ide_dma_host_set, 287 .dma_host_set = ide_dma_host_set,
288 .dma_setup = ide_dma_setup, 288 .dma_setup = ide_dma_setup,
289 .dma_exec_cmd = ide_dma_exec_cmd,
290 .dma_start = ide_dma_start, 289 .dma_start = ide_dma_start,
291 .dma_end = sc1200_dma_end, 290 .dma_end = sc1200_dma_end,
292 .dma_test_irq = ide_dma_test_irq, 291 .dma_test_irq = ide_dma_test_irq,
293 .dma_lost_irq = ide_dma_lost_irq, 292 .dma_lost_irq = ide_dma_lost_irq,
293 .dma_timer_expiry = ide_dma_sff_timer_expiry,
294 .dma_timeout = ide_dma_timeout, 294 .dma_timeout = ide_dma_timeout,
295 .dma_sff_read_status = ide_dma_sff_read_status, 295 .dma_sff_read_status = ide_dma_sff_read_status,
296}; 296};
diff --git a/drivers/ide/scc_pata.c b/drivers/ide/scc_pata.c
index 1f2805ce9889..0cc137cfe76d 100644
--- a/drivers/ide/scc_pata.c
+++ b/drivers/ide/scc_pata.c
@@ -868,12 +868,12 @@ static const struct ide_port_ops scc_port_ops = {
868static const struct ide_dma_ops scc_dma_ops = { 868static const struct ide_dma_ops scc_dma_ops = {
869 .dma_host_set = scc_dma_host_set, 869 .dma_host_set = scc_dma_host_set,
870 .dma_setup = scc_dma_setup, 870 .dma_setup = scc_dma_setup,
871 .dma_exec_cmd = ide_dma_exec_cmd,
872 .dma_start = scc_dma_start, 871 .dma_start = scc_dma_start,
873 .dma_end = scc_dma_end, 872 .dma_end = scc_dma_end,
874 .dma_test_irq = scc_dma_test_irq, 873 .dma_test_irq = scc_dma_test_irq,
875 .dma_lost_irq = ide_dma_lost_irq, 874 .dma_lost_irq = ide_dma_lost_irq,
876 .dma_timeout = ide_dma_timeout, 875 .dma_timeout = ide_dma_timeout,
876 .dma_timer_expiry = ide_dma_sff_timer_expiry,
877 .dma_sff_read_status = scc_dma_sff_read_status, 877 .dma_sff_read_status = scc_dma_sff_read_status,
878}; 878};
879 879
diff --git a/drivers/ide/siimage.c b/drivers/ide/siimage.c
index 1811ae9cd843..075cb1243b2a 100644
--- a/drivers/ide/siimage.c
+++ b/drivers/ide/siimage.c
@@ -711,10 +711,10 @@ static const struct ide_port_ops sil_sata_port_ops = {
711static const struct ide_dma_ops sil_dma_ops = { 711static const struct ide_dma_ops sil_dma_ops = {
712 .dma_host_set = ide_dma_host_set, 712 .dma_host_set = ide_dma_host_set,
713 .dma_setup = ide_dma_setup, 713 .dma_setup = ide_dma_setup,
714 .dma_exec_cmd = ide_dma_exec_cmd,
715 .dma_start = ide_dma_start, 714 .dma_start = ide_dma_start,
716 .dma_end = ide_dma_end, 715 .dma_end = ide_dma_end,
717 .dma_test_irq = siimage_dma_test_irq, 716 .dma_test_irq = siimage_dma_test_irq,
717 .dma_timer_expiry = ide_dma_sff_timer_expiry,
718 .dma_timeout = ide_dma_timeout, 718 .dma_timeout = ide_dma_timeout,
719 .dma_lost_irq = ide_dma_lost_irq, 719 .dma_lost_irq = ide_dma_lost_irq,
720 .dma_sff_read_status = ide_dma_sff_read_status, 720 .dma_sff_read_status = ide_dma_sff_read_status,
diff --git a/drivers/ide/sl82c105.c b/drivers/ide/sl82c105.c
index dba213c51baa..d25137b04e7a 100644
--- a/drivers/ide/sl82c105.c
+++ b/drivers/ide/sl82c105.c
@@ -293,11 +293,11 @@ static const struct ide_port_ops sl82c105_port_ops = {
293static const struct ide_dma_ops sl82c105_dma_ops = { 293static const struct ide_dma_ops sl82c105_dma_ops = {
294 .dma_host_set = ide_dma_host_set, 294 .dma_host_set = ide_dma_host_set,
295 .dma_setup = ide_dma_setup, 295 .dma_setup = ide_dma_setup,
296 .dma_exec_cmd = ide_dma_exec_cmd,
297 .dma_start = sl82c105_dma_start, 296 .dma_start = sl82c105_dma_start,
298 .dma_end = sl82c105_dma_end, 297 .dma_end = sl82c105_dma_end,
299 .dma_test_irq = ide_dma_test_irq, 298 .dma_test_irq = ide_dma_test_irq,
300 .dma_lost_irq = sl82c105_dma_lost_irq, 299 .dma_lost_irq = sl82c105_dma_lost_irq,
300 .dma_timer_expiry = ide_dma_sff_timer_expiry,
301 .dma_timeout = sl82c105_dma_timeout, 301 .dma_timeout = sl82c105_dma_timeout,
302 .dma_sff_read_status = ide_dma_sff_read_status, 302 .dma_sff_read_status = ide_dma_sff_read_status,
303}; 303};
diff --git a/drivers/ide/tc86c001.c b/drivers/ide/tc86c001.c
index 84109f5a1632..427d4b3c2c63 100644
--- a/drivers/ide/tc86c001.c
+++ b/drivers/ide/tc86c001.c
@@ -182,11 +182,11 @@ static const struct ide_port_ops tc86c001_port_ops = {
182static const struct ide_dma_ops tc86c001_dma_ops = { 182static const struct ide_dma_ops tc86c001_dma_ops = {
183 .dma_host_set = ide_dma_host_set, 183 .dma_host_set = ide_dma_host_set,
184 .dma_setup = ide_dma_setup, 184 .dma_setup = ide_dma_setup,
185 .dma_exec_cmd = ide_dma_exec_cmd,
186 .dma_start = tc86c001_dma_start, 185 .dma_start = tc86c001_dma_start,
187 .dma_end = ide_dma_end, 186 .dma_end = ide_dma_end,
188 .dma_test_irq = ide_dma_test_irq, 187 .dma_test_irq = ide_dma_test_irq,
189 .dma_lost_irq = ide_dma_lost_irq, 188 .dma_lost_irq = ide_dma_lost_irq,
189 .dma_timer_expiry = ide_dma_sff_timer_expiry,
190 .dma_timeout = ide_dma_timeout, 190 .dma_timeout = ide_dma_timeout,
191 .dma_sff_read_status = ide_dma_sff_read_status, 191 .dma_sff_read_status = ide_dma_sff_read_status,
192}; 192};
diff --git a/drivers/ide/trm290.c b/drivers/ide/trm290.c
index 746858a7338d..ed1496845a93 100644
--- a/drivers/ide/trm290.c
+++ b/drivers/ide/trm290.c
@@ -176,11 +176,6 @@ static void trm290_selectproc (ide_drive_t *drive)
176 trm290_prepare_drive(drive, !!(drive->dev_flags & IDE_DFLAG_USING_DMA)); 176 trm290_prepare_drive(drive, !!(drive->dev_flags & IDE_DFLAG_USING_DMA));
177} 177}
178 178
179static void trm290_dma_exec_cmd(ide_drive_t *drive, u8 command)
180{
181 ide_execute_command(drive, command, &ide_dma_intr, WAIT_CMD, NULL);
182}
183
184static int trm290_dma_setup(ide_drive_t *drive, struct ide_cmd *cmd) 179static int trm290_dma_setup(ide_drive_t *drive, struct ide_cmd *cmd)
185{ 180{
186 ide_hwif_t *hwif = drive->hwif; 181 ide_hwif_t *hwif = drive->hwif;
@@ -315,7 +310,6 @@ static const struct ide_port_ops trm290_port_ops = {
315static struct ide_dma_ops trm290_dma_ops = { 310static struct ide_dma_ops trm290_dma_ops = {
316 .dma_host_set = trm290_dma_host_set, 311 .dma_host_set = trm290_dma_host_set,
317 .dma_setup = trm290_dma_setup, 312 .dma_setup = trm290_dma_setup,
318 .dma_exec_cmd = trm290_dma_exec_cmd,
319 .dma_start = trm290_dma_start, 313 .dma_start = trm290_dma_start,
320 .dma_end = trm290_dma_end, 314 .dma_end = trm290_dma_end,
321 .dma_test_irq = trm290_dma_test_irq, 315 .dma_test_irq = trm290_dma_test_irq,
diff --git a/drivers/ide/tx4939ide.c b/drivers/ide/tx4939ide.c
index 39e3316ab63f..e0e0a803dde3 100644
--- a/drivers/ide/tx4939ide.c
+++ b/drivers/ide/tx4939ide.c
@@ -627,11 +627,11 @@ static const struct ide_port_ops tx4939ide_port_ops = {
627static const struct ide_dma_ops tx4939ide_dma_ops = { 627static const struct ide_dma_ops tx4939ide_dma_ops = {
628 .dma_host_set = tx4939ide_dma_host_set, 628 .dma_host_set = tx4939ide_dma_host_set,
629 .dma_setup = tx4939ide_dma_setup, 629 .dma_setup = tx4939ide_dma_setup,
630 .dma_exec_cmd = ide_dma_exec_cmd,
631 .dma_start = ide_dma_start, 630 .dma_start = ide_dma_start,
632 .dma_end = tx4939ide_dma_end, 631 .dma_end = tx4939ide_dma_end,
633 .dma_test_irq = tx4939ide_dma_test_irq, 632 .dma_test_irq = tx4939ide_dma_test_irq,
634 .dma_lost_irq = ide_dma_lost_irq, 633 .dma_lost_irq = ide_dma_lost_irq,
634 .dma_timer_expiry = ide_dma_sff_timer_expiry,
635 .dma_timeout = ide_dma_timeout, 635 .dma_timeout = ide_dma_timeout,
636 .dma_sff_read_status = tx4939ide_dma_sff_read_status, 636 .dma_sff_read_status = tx4939ide_dma_sff_read_status,
637}; 637};