@@ -250,7 +250,7 @@ static void do_identify(ide_drive_t *drive, u8 cmd)
250250}
251251
252252/**
253- * actual_try_to_identify - send ata/atapi identify
253+ * try_to_identify - send ATA/ATAPI identify
254254 * @drive: drive to identify
255255 * @cmd: command to use
256256 *
@@ -262,7 +262,7 @@ static void do_identify(ide_drive_t *drive, u8 cmd)
262262 * 2 device aborted the command (refused to identify itself)
263263 */
264264
265- static int actual_try_to_identify (ide_drive_t * drive , u8 cmd )
265+ static int try_to_identify (ide_drive_t * drive , u8 cmd )
266266{
267267 ide_hwif_t * hwif = drive -> hwif ;
268268 struct ide_io_ports * io_ports = & hwif -> io_ports ;
@@ -271,6 +271,13 @@ static int actual_try_to_identify (ide_drive_t *drive, u8 cmd)
271271 unsigned long timeout ;
272272 u8 s = 0 , a = 0 ;
273273
274+ /*
275+ * Disable device IRQ. Otherwise we'll get spurious interrupts
276+ * during the identify phase that the IRQ handler isn't expecting.
277+ */
278+ if (io_ports -> ctl_addr )
279+ tp_ops -> set_irq (hwif , 0 );
280+
274281 /* take a deep breath */
275282 msleep (50 );
276283
@@ -327,29 +334,6 @@ static int actual_try_to_identify (ide_drive_t *drive, u8 cmd)
327334 return rc ;
328335}
329336
330- /**
331- * try_to_identify - try to identify a drive
332- * @drive: drive to probe
333- * @cmd: command to use
334- *
335- * Issue the identify command.
336- */
337-
338- static int try_to_identify (ide_drive_t * drive , u8 cmd )
339- {
340- ide_hwif_t * hwif = drive -> hwif ;
341- const struct ide_tp_ops * tp_ops = hwif -> tp_ops ;
342-
343- /*
344- * Disable device IRQ. Otherwise we'll get spurious interrupts
345- * during the identify phase that the IRQ handler isn't expecting.
346- */
347- if (hwif -> io_ports .ctl_addr )
348- tp_ops -> set_irq (hwif , 0 );
349-
350- return actual_try_to_identify (drive , cmd );
351- }
352-
353337int ide_busy_sleep (ide_hwif_t * hwif , unsigned long timeout , int altstatus )
354338{
355339 u8 stat ;
0 commit comments