diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-07-23 13:55:52 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-07-23 13:55:52 -0400 |
commit | 6e6afb3b7401f0181da74a1add57f126946b43e6 (patch) | |
tree | 2ca80a7fa25a387b5f3d479d9e94b1339ee440ac /drivers/ide/ide-io.c | |
parent | 1f6d8a0fd8f6cc5ee2219a8cf9b2da16dfd67397 (diff) |
ide: add ->set_irq method
Add ->set_irq method for setting nIEN bit of ATA Device Control
register and use it instead of ide_set_irq().
While at it:
* Use ->set_irq in init_irq() and do_reset1().
* Don't use HWIF() macro in ide_check_pm_state().
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-io.c')
-rw-r--r-- | drivers/ide/ide-io.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index fdc221ce9920..bbd7bd4c48ee 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c | |||
@@ -746,16 +746,17 @@ static void ide_check_pm_state(ide_drive_t *drive, struct request *rq) | |||
746 | * the bus may be broken enough to walk on our toes at this | 746 | * the bus may be broken enough to walk on our toes at this |
747 | * point. | 747 | * point. |
748 | */ | 748 | */ |
749 | ide_hwif_t *hwif = drive->hwif; | ||
749 | int rc; | 750 | int rc; |
750 | #ifdef DEBUG_PM | 751 | #ifdef DEBUG_PM |
751 | printk("%s: Wakeup request inited, waiting for !BSY...\n", drive->name); | 752 | printk("%s: Wakeup request inited, waiting for !BSY...\n", drive->name); |
752 | #endif | 753 | #endif |
753 | rc = ide_wait_not_busy(HWIF(drive), 35000); | 754 | rc = ide_wait_not_busy(hwif, 35000); |
754 | if (rc) | 755 | if (rc) |
755 | printk(KERN_WARNING "%s: bus not ready on wakeup\n", drive->name); | 756 | printk(KERN_WARNING "%s: bus not ready on wakeup\n", drive->name); |
756 | SELECT_DRIVE(drive); | 757 | SELECT_DRIVE(drive); |
757 | ide_set_irq(drive, 1); | 758 | hwif->set_irq(hwif, 1); |
758 | rc = ide_wait_not_busy(HWIF(drive), 100000); | 759 | rc = ide_wait_not_busy(hwif, 100000); |
759 | if (rc) | 760 | if (rc) |
760 | printk(KERN_WARNING "%s: drive not ready on wakeup\n", drive->name); | 761 | printk(KERN_WARNING "%s: drive not ready on wakeup\n", drive->name); |
761 | } | 762 | } |
@@ -1041,7 +1042,7 @@ static void ide_do_request (ide_hwgroup_t *hwgroup, int masked_irq) | |||
1041 | * quirk_list may not like intr setups/cleanups | 1042 | * quirk_list may not like intr setups/cleanups |
1042 | */ | 1043 | */ |
1043 | if (drive->quirk_list != 1) | 1044 | if (drive->quirk_list != 1) |
1044 | ide_set_irq(drive, 0); | 1045 | hwif->set_irq(hwif, 0); |
1045 | } | 1046 | } |
1046 | hwgroup->hwif = hwif; | 1047 | hwgroup->hwif = hwif; |
1047 | hwgroup->drive = drive; | 1048 | hwgroup->drive = drive; |
@@ -1519,6 +1520,7 @@ EXPORT_SYMBOL(ide_do_drive_cmd); | |||
1519 | 1520 | ||
1520 | void ide_pktcmd_tf_load(ide_drive_t *drive, u32 tf_flags, u16 bcount, u8 dma) | 1521 | void ide_pktcmd_tf_load(ide_drive_t *drive, u32 tf_flags, u16 bcount, u8 dma) |
1521 | { | 1522 | { |
1523 | ide_hwif_t *hwif = drive->hwif; | ||
1522 | ide_task_t task; | 1524 | ide_task_t task; |
1523 | 1525 | ||
1524 | memset(&task, 0, sizeof(task)); | 1526 | memset(&task, 0, sizeof(task)); |
@@ -1529,9 +1531,9 @@ void ide_pktcmd_tf_load(ide_drive_t *drive, u32 tf_flags, u16 bcount, u8 dma) | |||
1529 | task.tf.lbah = (bcount >> 8) & 0xff; | 1531 | task.tf.lbah = (bcount >> 8) & 0xff; |
1530 | 1532 | ||
1531 | ide_tf_dump(drive->name, &task.tf); | 1533 | ide_tf_dump(drive->name, &task.tf); |
1532 | ide_set_irq(drive, 1); | 1534 | hwif->set_irq(hwif, 1); |
1533 | SELECT_MASK(drive, 0); | 1535 | SELECT_MASK(drive, 0); |
1534 | drive->hwif->tf_load(drive, &task); | 1536 | hwif->tf_load(drive, &task); |
1535 | } | 1537 | } |
1536 | 1538 | ||
1537 | EXPORT_SYMBOL_GPL(ide_pktcmd_tf_load); | 1539 | EXPORT_SYMBOL_GPL(ide_pktcmd_tf_load); |