Fix some logic in PCIe HotPlug; display EI status

The interpretation of the Electromechanical Interlock Status was
inverted, so we disengaged the EI if a card was inserted.
Fix it to engage the EI if a card is inserted.

When displaying the slot capabilites/status with pciconf:

- We inverted the sense of the Power Controller Control bit,
  saying the power was off when it was really on (according to
  this bit).  Fix that.

- Display the status of the Electromechanical Interlock:
        EI(engaged)
        EI(disengaged)

Reviewed by:	jhb
MFC after:	3 days
Sponsored by:	Dell Inc.
Differential Revision:	https://reviews.freebsd.org/D7426
This commit is contained in:
Eric van Gyzen
2016-08-05 23:23:48 +00:00
parent f1c1f188f7
commit a1566487db
2 changed files with 8 additions and 5 deletions
+4 -1
View File
@@ -529,10 +529,13 @@ cap_express(int fd, struct pci_conf *p, uint8_t ptr)
if (cap & PCIEM_SLOT_CAP_APB)
printf(" Attn Button");
if (cap & PCIEM_SLOT_CAP_PCP)
printf(" PC(%s)", ctl & PCIEM_SLOT_CTL_PCC ? "on" : "off");
printf(" PC(%s)", ctl & PCIEM_SLOT_CTL_PCC ? "off" : "on");
if (cap & PCIEM_SLOT_CAP_MRLSP)
printf(" MRL(%s)", sta & PCIEM_SLOT_STA_MRLSS ? "open" :
"closed");
if (cap & PCIEM_SLOT_CAP_EIP)
printf(" EI(%s)", sta & PCIEM_SLOT_STA_EIS ? "engaged" :
"disengaged");
}
static void