/* Returns 1 if an IDE interface/drive exists at 0x170, Returns 0 otherwise.  */
static int __init secondary_port_responding(void)
/* Returns 1 if an IDE interface/drive exists at 0x170, Returns 0 otherwise.  */
static int __init secondary_port_responding(void)
{
	unsigned long flags;
	spin_lock_irqsave(&cmd640_lock, flags);
	outb_p(0x0a, 0x176);
	udelay(100);
	if ((inb_p(0x176) & 0x1f) != 0x0a) {
		outb_p(0x1a, 0x176);
		udelay(100);
		if ((inb_p(0x176) & 0x1f) != 0x1a) {
			spin_unlock_irqrestore(&cmd640_lock, flags);
			return 0;
		}
	}
	spin_unlock_irqrestore(&cmd640_lock, flags);
	return 1;
}