/* Wait at most 2 seconds for flexport arbitration to succeed.  */
static int ahd_wait_flexport(struct ahd_softc *ahd)
/* Wait at most 2 seconds for flexport arbitration to succeed.  */
static int ahd_wait_flexport(struct ahd_softc *ahd)
{
	int cnt;
	AHD_ASSERT_MODES(ahd, AHD_MODE_SCSI_MSK, AHD_MODE_SCSI_MSK);
	cnt = 1000000 * 2 / 5;
	while ((ahd_inb(ahd, BRDCTL) & FLXARBACK) == 0 && --cnt)
		ahd_delay(5);
	if (cnt == 0)
		return (ETIMEDOUT);
	return (0);
}