/* If we leave drives set for synchronous transfers (especially CDROMs), and reboot to MacOS, it gets confused, poor thing. So, on reboot we reset the SCSI bus.  */
static int mesh_shutdown(struct macio_dev *mdev)
/* If we leave drives set for synchronous transfers (especially CDROMs), and reboot to MacOS, it gets confused, poor thing. So, on reboot we reset the SCSI bus.  */
static int mesh_shutdown(struct macio_dev *mdev)
{
	struct mesh_state *ms = (struct mesh_state *)macio_get_drvdata(mdev);
	volatile struct mesh_regs __iomem *mr;
	unsigned long flags;
       	printk(KERN_INFO "resetting MESH scsi bus(es)\n");
	spin_lock_irqsave(ms->host->host_lock, flags);
       	mr = ms->mesh;
	out_8(&mr->intr_mask, 0);
	out_8(&mr->interrupt, INT_ERROR | INT_EXCEPTION | INT_CMDDONE);
	out_8(&mr->bus_status1, BS1_RST);
	mesh_flush_io(mr);
	udelay(30);
	out_8(&mr->bus_status1, 0);
	spin_unlock_irqrestore(ms->host->host_lock, flags);
	return 0;
}