FreeBSD/sys/dev/ata/ata-lowlevel.c
/* must be called with ATA channel locked and state_mtx held */
must be called with ATA channel locked and state_mtx held
must be called with ATA channel locked and state_mtx held
static int
ata_generic_status(device_t dev)
{
    struct ata_channel *ch = device_get_softc(dev);
    if (ATA_IDX_INB(ch, ATA_ALTSTAT) & ATA_S_BUSY) {
	DELAY(100);
	if (ATA_IDX_INB(ch, ATA_ALTSTAT) & ATA_S_BUSY)
	    return 0;
    }
    return 1;
}
static int ata_generic_status ( device_t dev ) { struct ata_channel * ch = device_get_softc ( dev ) ; if ( ATA_IDX_INB ( ch , ATA_ALTSTAT ) & ATA_S_BUSY ) { DELAY ( 100 ) ; if ( ATA_IDX_INB ( ch , ATA_ALTSTAT ) & ATA_S_BUSY ) return 0 ; } return 1 ; }
must be called with ATA channel locked and state_mtx held
must be called with ATA channel locked and state_mtx held