summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr/src/uts/common/io/pciex/pcie.c5
-rw-r--r--usr/src/uts/common/sys/pcie.h5
-rw-r--r--usr/src/uts/common/sys/pcie_impl.h1
3 files changed, 9 insertions, 2 deletions
diff --git a/usr/src/uts/common/io/pciex/pcie.c b/usr/src/uts/common/io/pciex/pcie.c
index 611b62a656..d755d86c9e 100644
--- a/usr/src/uts/common/io/pciex/pcie.c
+++ b/usr/src/uts/common/io/pciex/pcie.c
@@ -1490,14 +1490,15 @@ pcie_get_rc_dip(dev_info_t *dip)
return (rcdip);
}
-static boolean_t
+boolean_t
pcie_is_pci_device(dev_info_t *dip)
{
dev_info_t *pdip;
char *device_type;
pdip = ddi_get_parent(dip);
- ASSERT(pdip);
+ if (pdip == NULL)
+ return (B_FALSE);
if (ddi_prop_lookup_string(DDI_DEV_T_ANY, pdip, DDI_PROP_DONTPASS,
"device_type", &device_type) != DDI_PROP_SUCCESS)
diff --git a/usr/src/uts/common/sys/pcie.h b/usr/src/uts/common/sys/pcie.h
index d1b633a040..0e5f929164 100644
--- a/usr/src/uts/common/sys/pcie.h
+++ b/usr/src/uts/common/sys/pcie.h
@@ -143,6 +143,8 @@ extern "C" {
#define PCIE_DEVCAP_PLMT_SCL_1_BY_1000 0xC000000 /* 0.001x Scale */
#define PCIE_DEVCAP_PLMT_SCL_MASK 0xC000000 /* Power Limit Scale */
+#define PCIE_DEVCAP_FLR 0x10000000 /* Function Level Reset */
+
/*
* Device Control Register (2 bytes)
*/
@@ -177,6 +179,8 @@ extern "C" {
#define PCIE_DEVCTL_MAX_READ_REQ_MASK 0x7000 /* Max_Read_Request_Size */
#define PCIE_DEVCTL_MAX_READ_REQ_SHIFT 0xC
+#define PCIE_DEVCTL_INITIATE_FLR 0x8000
+
/*
* Device Status Register (2 bytes)
*/
@@ -398,6 +402,7 @@ extern "C" {
/*
* Device Control 2 Register (2 bytes)
*/
+#define PCIE_DEVCTL2_COM_TO_RANGE_MASK 0xf
#define PCIE_DEVCTL2_COM_TO_RANGE_0 0x0
#define PCIE_DEVCTL2_COM_TO_RANGE_1 0x1
#define PCIE_DEVCTL2_COM_TO_RANGE_2 0x2
diff --git a/usr/src/uts/common/sys/pcie_impl.h b/usr/src/uts/common/sys/pcie_impl.h
index 6bf9610573..54628f195c 100644
--- a/usr/src/uts/common/sys/pcie_impl.h
+++ b/usr/src/uts/common/sys/pcie_impl.h
@@ -556,6 +556,7 @@ extern void pcie_enable_errors(dev_info_t *dip);
extern void pcie_disable_errors(dev_info_t *dip);
extern int pcie_enable_ce(dev_info_t *dip);
extern boolean_t pcie_bridge_is_link_disabled(dev_info_t *);
+extern boolean_t pcie_is_pci_device(dev_info_t *dip);
extern pcie_bus_t *pcie_init_bus(dev_info_t *dip, pcie_req_id_t bdf,
uint8_t flags);