@@ -255,9 +255,7 @@ static void do_identify(ide_drive_t *drive, u8 cmd)
255255 * @cmd: command to use
256256 *
257257 * try_to_identify() sends an ATA(PI) IDENTIFY request to a drive
258- * and waits for a response. It also monitors irqs while this is
259- * happening, in hope of automatically determining which one is
260- * being used by the interface.
258+ * and waits for a response.
261259 *
262260 * Returns: 0 device was identified
263261 * 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)
334332 * @drive: drive to probe
335333 * @cmd: command to use
336334 *
337- * Issue the identify command and then do IRQ probing to
338- * complete the identification when needed by finding the
339- * IRQ the drive is attached to
335+ * Issue the identify command.
340336 */
341337
342338static int try_to_identify (ide_drive_t * drive , u8 cmd )
343339{
344340 ide_hwif_t * hwif = drive -> hwif ;
345341 const struct ide_tp_ops * tp_ops = hwif -> tp_ops ;
346- int retval ;
347- int autoprobe = 0 ;
348- unsigned long cookie = 0 ;
349342
350343 /*
351- * Disable device irq unless we need to
352- * probe for it. Otherwise we'll get spurious
353- * interrupts during the identify-phase that
354- * the irq handler isn't expecting.
344+ * Disable device IRQ. Otherwise we'll get spurious interrupts
345+ * during the identify phase that the IRQ handler isn't expecting.
355346 */
356- if (hwif -> io_ports .ctl_addr ) {
357- if (!hwif -> irq ) {
358- autoprobe = 1 ;
359- cookie = probe_irq_on ();
360- }
361- tp_ops -> set_irq (hwif , autoprobe );
362- }
363-
364- retval = actual_try_to_identify (drive , cmd );
365-
366- if (autoprobe ) {
367- int irq ;
368-
347+ if (hwif -> io_ports .ctl_addr )
369348 tp_ops -> set_irq (hwif , 0 );
370- /* clear drive IRQ */
371- (void )tp_ops -> read_status (hwif );
372- udelay (5 );
373- irq = probe_irq_off (cookie );
374- if (!hwif -> irq ) {
375- if (irq > 0 ) {
376- hwif -> irq = irq ;
377- } else {
378- /* Mmmm.. multiple IRQs..
379- * don't know which was ours
380- */
381- printk (KERN_ERR "%s: IRQ probe failed (0x%lx)\n" ,
382- drive -> name , cookie );
383- }
384- }
385- }
386- return retval ;
349+
350+ return actual_try_to_identify (drive , cmd );
387351}
388352
389353int ide_busy_sleep (ide_hwif_t * hwif , unsigned long timeout , int altstatus )
0 commit comments