/* Wait until the controller's mailbox is available to accept more commands. Wait for at most 1 second.  */
static int megaraid_busywait_mbox(mraid_device_t *)
/* Wait until the controller's mailbox is available to accept more commands. Wait for at most 1 second.  */
static int megaraid_busywait_mbox(mraid_device_t *)
{
	mbox_t	*mbox = raid_dev->mbox;
	int	i = 0;
	if (mbox->busy) {
		udelay(25);
		for (i = 0; mbox->busy && i < 1000; i++)
			msleep(1);
	}
	if (i < 1000) return 0;
	else return -1;
}