summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/ipmi/ipmi_pci.c8
-rw-r--r--sys/dev/pci/pci.c2
-rw-r--r--sys/dev/pci/pci_pci.c2
-rw-r--r--sys/dev/pci/pcireg.h36
4 files changed, 37 insertions, 11 deletions
diff --git a/sys/dev/ipmi/ipmi_pci.c b/sys/dev/ipmi/ipmi_pci.c
index def00c9..7c4bba2 100644
--- a/sys/dev/ipmi/ipmi_pci.c
+++ b/sys/dev/ipmi/ipmi_pci.c
@@ -185,7 +185,7 @@ ipmi2_pci_probe(device_t dev)
{
if (pci_get_class(dev) == PCIC_SERIALBUS &&
- pci_get_subclass(dev) == 0x07) {
+ pci_get_subclass(dev) == PCIS_SERIALBUS_IPMI) {
device_set_desc(dev, "IPMI System Interface");
return (BUS_PROBE_GENERIC);
}
@@ -204,13 +204,13 @@ ipmi2_pci_attach(device_t dev)
/* Interface is determined by progif. */
switch (pci_get_progif(dev)) {
- case 0:
+ case PCIP_SERIALBUS_IPMI_SMIC:
iface = SMIC_MODE;
break;
- case 1:
+ case PCIP_SERIALBUS_IPMI_KCS:
iface = KCS_MODE;
break;
- case 2:
+ case PCIP_SERIALBUS_IPMI_BT:
iface = BT_MODE;
device_printf(dev, "BT interface unsupported\n");
return (ENXIO);
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index 43ebd8a..ab98be4 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -1062,7 +1062,7 @@ pci_pending_msix(device_t dev, u_int index)
uint32_t offset, bit;
KASSERT(cfg->msix.msix_alloc > index, ("bogus index"));
- offset = cfg->msix.msix_pba_offset + (index / 4) * 4;
+ offset = cfg->msix.msix_pba_offset + (index / 32) * 4;
bit = 1 << index % 32;
return (bus_read_4(cfg->msix.msix_pba_res, offset) & bit);
}
diff --git a/sys/dev/pci/pci_pci.c b/sys/dev/pci/pci_pci.c
index 6e94798..d0ac287 100644
--- a/sys/dev/pci/pci_pci.c
+++ b/sys/dev/pci/pci_pci.c
@@ -253,7 +253,7 @@ pcib_attach_common(device_t dev)
* parts as subtractive.
*/
if ((pci_get_devid(dev) & 0xff00ffff) == 0x24008086 ||
- pci_read_config(dev, PCIR_PROGIF, 1) == 1)
+ pci_read_config(dev, PCIR_PROGIF, 1) == PCIP_BRIDGE_PCI_SUBTRACTIVE)
sc->flags |= PCIB_SUBTRACTIVE;
if (bootverbose) {
diff --git a/sys/dev/pci/pcireg.h b/sys/dev/pci/pcireg.h
index 136b41a..fbb13c9 100644
--- a/sys/dev/pci/pcireg.h
+++ b/sys/dev/pci/pcireg.h
@@ -211,6 +211,10 @@
#define PCIS_STORAGE_FLOPPY 0x02
#define PCIS_STORAGE_IPI 0x03
#define PCIS_STORAGE_RAID 0x04
+#define PCIS_STORAGE_ATA_ADMA 0x05
+#define PCIS_STORAGE_SATA 0x06
+#define PCIP_STORAGE_SATA_AHCI_1_0 0x01
+#define PCIS_STORAGE_SAS 0x07
#define PCIS_STORAGE_OTHER 0x80
#define PCIC_NETWORK 0x02
@@ -219,6 +223,8 @@
#define PCIS_NETWORK_FDDI 0x02
#define PCIS_NETWORK_ATM 0x03
#define PCIS_NETWORK_ISDN 0x04
+#define PCIS_NETWORK_WORLDFIP 0x05
+#define PCIS_NETWORK_PICMG 0x06
#define PCIS_NETWORK_OTHER 0x80
#define PCIC_DISPLAY 0x03
@@ -244,10 +250,13 @@
#define PCIS_BRIDGE_EISA 0x02
#define PCIS_BRIDGE_MCA 0x03
#define PCIS_BRIDGE_PCI 0x04
+#define PCIP_BRIDGE_PCI_SUBTRACTIVE 0x01
#define PCIS_BRIDGE_PCMCIA 0x05
#define PCIS_BRIDGE_NUBUS 0x06
#define PCIS_BRIDGE_CARDBUS 0x07
#define PCIS_BRIDGE_RACEWAY 0x08
+#define PCIS_BRIDGE_PCI_TRANSPARENT 0x09
+#define PCIS_BRIDGE_INFINIBAND 0x0a
#define PCIS_BRIDGE_OTHER 0x80
#define PCIC_SIMPLECOMM 0x07
@@ -262,6 +271,8 @@
#define PCIS_SIMPLECOMM_PAR 0x01
#define PCIS_SIMPLECOMM_MULSER 0x02
#define PCIS_SIMPLECOMM_MODEM 0x03
+#define PCIS_SIMPLECOMM_GPIB 0x04
+#define PCIS_SIMPLECOMM_SMART_CARD 0x05
#define PCIS_SIMPLECOMM_OTHER 0x80
#define PCIC_BASEPERIPH 0x08
@@ -304,16 +315,28 @@
#define PCIS_SERIALBUS_ACCESS 0x01
#define PCIS_SERIALBUS_SSA 0x02
#define PCIS_SERIALBUS_USB 0x03
-#define PCIP_SERIALBUS_USB_UHCI 0x00
-#define PCIP_SERIALBUS_USB_OHCI 0x10
-#define PCIP_SERIALBUS_USB_EHCI 0x20
+#define PCIP_SERIALBUS_USB_UHCI 0x00
+#define PCIP_SERIALBUS_USB_OHCI 0x10
+#define PCIP_SERIALBUS_USB_EHCI 0x20
+#define PCIP_SERIALBUS_USB_DEVICE 0xfe
#define PCIS_SERIALBUS_FC 0x04
#define PCIS_SERIALBUS_SMBUS 0x05
+#define PCIS_SERIALBUS_INFINIBAND 0x06
+#define PCIS_SERIALBUS_IPMI 0x07
+#define PCIP_SERIALBUS_IPMI_SMIC 0x00
+#define PCIP_SERIALBUS_IPMI_KCS 0x01
+#define PCIP_SERIALBUS_IPMI_BT 0x02
+#define PCIS_SERIALBUS_SERCOS 0x08
+#define PCIS_SERIALBUS_CANBUS 0x09
#define PCIC_WIRELESS 0x0d
#define PCIS_WIRELESS_IRDA 0x00
#define PCIS_WIRELESS_IR 0x01
#define PCIS_WIRELESS_RF 0x10
+#define PCIS_WIRELESS_BLUETOOTH 0x11
+#define PCIS_WIRELESS_BROADBAND 0x12
+#define PCIS_WIRELESS_80211A 0x20
+#define PCIS_WIRELESS_80211B 0x21
#define PCIS_WIRELESS_OTHER 0x80
#define PCIC_INTELLIIO 0x0e
@@ -331,8 +354,11 @@
#define PCIS_CRYPTO_OTHER 0x80
#define PCIC_DASP 0x11
-#define PCIS_DASP_DPIO 0x00
-#define PCIS_DASP_OTHER 0x80
+#define PCIS_DASP_DPIO 0x00
+#define PCIS_DASP_PERFCNTRS 0x01
+#define PCIS_DASP_COMM_SYNC 0x10
+#define PCIS_DASP_MGMT_CARD 0x20
+#define PCIS_DASP_OTHER 0x80
#define PCIC_OTHER 0xff
OpenPOWER on IntegriCloud