summaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-probe.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-24 23:22:53 +0100
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-24 23:22:53 +0100
commitf77e03c68f11f54509cd660ddb5a0badfdfc61cb (patch)
tree7429351736ec6f5a546defecf23dc30874f7bea1 /drivers/ide/ide-probe.c
parent8b07ed26f8eb73d4f55a9d852712cd588c45ff51 (diff)
downloadop-kernel-dev-f77e03c68f11f54509cd660ddb5a0badfdfc61cb.zip
op-kernel-dev-f77e03c68f11f54509cd660ddb5a0badfdfc61cb.tar.gz
ide: remove no longer needed IRQ auto-probing from try_to_identify() (v2)
v2: Update actual_try_to_identify() documentation. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-probe.c')
-rw-r--r--drivers/ide/ide-probe.c50
1 files changed, 7 insertions, 43 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index ebc328c..c63c078 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -255,9 +255,7 @@ err_misc:
* @cmd: command to use
*
* try_to_identify() sends an ATA(PI) IDENTIFY request to a drive
- * and waits for a response. It also monitors irqs while this is
- * happening, in hope of automatically determining which one is
- * being used by the interface.
+ * and waits for a response.
*
* Returns: 0 device was identified
* 1 device timed-out (no response to identify request)
@@ -334,56 +332,22 @@ static int actual_try_to_identify (ide_drive_t *drive, u8 cmd)
* @drive: drive to probe
* @cmd: command to use
*
- * Issue the identify command and then do IRQ probing to
- * complete the identification when needed by finding the
- * IRQ the drive is attached to
+ * Issue the identify command.
*/
static int try_to_identify (ide_drive_t *drive, u8 cmd)
{
ide_hwif_t *hwif = drive->hwif;
const struct ide_tp_ops *tp_ops = hwif->tp_ops;
- int retval;
- int autoprobe = 0;
- unsigned long cookie = 0;
/*
- * Disable device irq unless we need to
- * probe for it. Otherwise we'll get spurious
- * interrupts during the identify-phase that
- * the irq handler isn't expecting.
+ * Disable device IRQ. Otherwise we'll get spurious interrupts
+ * during the identify phase that the IRQ handler isn't expecting.
*/
- if (hwif->io_ports.ctl_addr) {
- if (!hwif->irq) {
- autoprobe = 1;
- cookie = probe_irq_on();
- }
- tp_ops->set_irq(hwif, autoprobe);
- }
-
- retval = actual_try_to_identify(drive, cmd);
-
- if (autoprobe) {
- int irq;
-
+ if (hwif->io_ports.ctl_addr)
tp_ops->set_irq(hwif, 0);
- /* clear drive IRQ */
- (void)tp_ops->read_status(hwif);
- udelay(5);
- irq = probe_irq_off(cookie);
- if (!hwif->irq) {
- if (irq > 0) {
- hwif->irq = irq;
- } else {
- /* Mmmm.. multiple IRQs..
- * don't know which was ours
- */
- printk(KERN_ERR "%s: IRQ probe failed (0x%lx)\n",
- drive->name, cookie);
- }
- }
- }
- return retval;
+
+ return actual_try_to_identify(drive, cmd);
}
int ide_busy_sleep(ide_hwif_t *hwif, unsigned long timeout, int altstatus)
OpenPOWER on IntegriCloud