FreeBSD/sys/dev/pci/pci_pci.c
/*
 * Returns true if a card is fully inserted from the user's
 * perspective.  It may not yet be ready for access, but the driver
 * can now start enabling access if necessary.
 */
Returns true if a card is fully inserted from the user's
perspective.  It may not yet be ready for access, but the driver
can now start enabling access if necessary.
Returns true if a card is fully inserted from the user ' s perspective . It may not yet be ready for access but the driver can now start enabling access if necessary .
static bool
pcib_hotplug_inserted(struct pcib_softc *sc)
{
	if (sc->flags & PCIB_DETACHING)
		return (false);
	if ((sc->pcie_slot_sta & PCIEM_SLOT_STA_PDS) == 0)
		return (false);
	if (sc->pcie_slot_sta & PCIEM_SLOT_STA_PFD)
		return (false);
	if (sc->pcie_slot_cap & PCIEM_SLOT_CAP_MRLSP &&
	    (sc->pcie_slot_sta & PCIEM_SLOT_STA_MRLSS) != 0)
		return (false);
	return (true);
}
static bool pcib_hotplug_inserted ( struct pcib_softc * sc ) { if ( sc -> flags & PCIB_DETACHING ) return ( false ) ; if ( ( sc -> pcie_slot_sta & PCIEM_SLOT_STA_PDS ) == 0 ) return ( false ) ; if ( sc -> pcie_slot_sta & PCIEM_SLOT_STA_PFD ) return ( false ) ; if ( sc -> pcie_slot_cap & PCIEM_SLOT_CAP_MRLSP && ( sc -> pcie_slot_sta & PCIEM_SLOT_STA_MRLSS ) != 0 ) return ( false ) ; return ( true ) ; }
Returns true if a card is fully inserted from the user's
 perspective.
Returns true if a card is fully inserted from the user ' s perspective .
/* Pretend the card isn't present if a detach is forced. */ /* Card must be present in the slot. */ /* A power fault implicitly turns off power to the slot. */ /* If the MRL is disengaged, the slot is powered off. */