FreeBSD/sys/dev/pci/pci_pci.c
/*
 * Returns -1 if the card is fully inserted, powered, and ready for
 * access.  Otherwise, returns 0.
 */
1 if the card is fully inserted, powered, and ready for
access.  Otherwise, returns 0.
1 if the card is fully inserted powered and ready for access . Otherwise returns 0 .
static int
pcib_hotplug_present(struct pcib_softc *sc)
{
	if (!pcib_hotplug_inserted(sc))
		return (0);
	if (sc->pcie_slot_cap & PCIEM_SLOT_CAP_EIP &&
	    (sc->pcie_slot_sta & PCIEM_SLOT_STA_EIS) == 0)
		return (0);
	if (sc->pcie_link_cap & PCIEM_LINK_CAP_DL_ACTIVE) {
		if (!(sc->pcie_link_sta & PCIEM_LINK_STA_DL_ACTIVE))
			return (0);
	}
	return (-1);
}
static int pcib_hotplug_present ( struct pcib_softc * sc ) { if ( ! pcib_hotplug_inserted ( sc ) ) return ( 0 ) ; if ( sc -> pcie_slot_cap & PCIEM_SLOT_CAP_EIP && ( sc -> pcie_slot_sta & PCIEM_SLOT_STA_EIS ) == 0 ) return ( 0 ) ; if ( sc -> pcie_link_cap & PCIEM_LINK_CAP_DL_ACTIVE ) { if ( ! ( sc -> pcie_link_sta & PCIEM_LINK_STA_DL_ACTIVE ) ) return ( 0 ) ; } return ( -1 ) ; }
Returns -1 if the card is fully inserted, powered, and ready for
 access.
Returns - 1 if the card is fully inserted powered and ready for access .
/* Card must be inserted. */ /*
	 * Require the Electromechanical Interlock to be engaged if
	 * present.
	 */ /* Require the Data Link Layer to be active. */