ATAPI_WAIT_PC, cdrom_timer_expiry);
return ide_started;
} else {
- unsigned long flags;
-
- /* packet command */
- spin_lock_irqsave(&ide_lock, flags);
- hwif->OUTBSYNC(drive, WIN_PACKETCMD,
- hwif->io_ports.command_addr);
- ndelay(400);
- spin_unlock_irqrestore(&ide_lock, flags);
+ ide_execute_pkt_cmd(drive);
return (*handler) (drive);
}
return ide_started;
} else {
/* Issue the packet command */
- hwif->OUTBSYNC(drive, WIN_PACKETCMD,
- hwif->io_ports.command_addr);
- ndelay(400);
+ ide_execute_pkt_cmd(drive);
return (*pkt_xfer_routine) (drive);
}
}
ndelay(400);
spin_unlock_irqrestore(&ide_lock, flags);
}
-
EXPORT_SYMBOL(ide_execute_command);
+void ide_execute_pkt_cmd(ide_drive_t *drive)
+{
+ ide_hwif_t *hwif = drive->hwif;
+ unsigned long flags;
+
+ spin_lock_irqsave(&ide_lock, flags);
+ hwif->OUTBSYNC(drive, WIN_PACKETCMD, hwif->io_ports.command_addr);
+ ndelay(400);
+ spin_unlock_irqrestore(&ide_lock, flags);
+}
+EXPORT_SYMBOL_GPL(ide_execute_pkt_cmd);
/* needed below */
static ide_startstop_t do_reset1 (ide_drive_t *, int);
IDETAPE_WAIT_CMD, NULL);
return ide_started;
} else {
- hwif->OUTBSYNC(drive, WIN_PACKETCMD,
- hwif->io_ports.command_addr);
- ndelay(400);
+ ide_execute_pkt_cmd(drive);
return idetape_transfer_pc(drive);
}
}
return ide_started;
} else {
/* Issue the packet command */
- hwif->OUTBSYNC(drive, WIN_PACKETCMD,
- hwif->io_ports.command_addr);
- ndelay(400);
+ ide_execute_pkt_cmd(drive);
return idescsi_transfer_pc(drive);
}
}
void ide_execute_command(ide_drive_t *, u8, ide_handler_t *, unsigned int,
ide_expiry_t *);
+void ide_execute_pkt_cmd(ide_drive_t *);
+
ide_startstop_t __ide_error(ide_drive_t *, struct request *, u8, u8);
ide_startstop_t ide_error (ide_drive_t *drive, const char *msg, byte stat);