|
@@ -51,6 +51,19 @@ const struct bnxt_qplib_gid bnxt_qplib_gid_zero = {{ 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0 } };
|
|
0, 0, 0, 0, 0, 0, 0, 0 } };
|
|
|
|
|
|
/* Device */
|
|
/* Device */
|
|
|
|
+
|
|
|
|
+static bool bnxt_qplib_is_atomic_cap(struct bnxt_qplib_rcfw *rcfw)
|
|
|
|
+{
|
|
|
|
+ int rc;
|
|
|
|
+ u16 pcie_ctl2;
|
|
|
|
+
|
|
|
|
+ rc = pcie_capability_read_word(rcfw->pdev, PCI_EXP_DEVCTL2,
|
|
|
|
+ &pcie_ctl2);
|
|
|
|
+ if (rc)
|
|
|
|
+ return false;
|
|
|
|
+ return !!(pcie_ctl2 & PCI_EXP_DEVCTL2_ATOMIC_REQ);
|
|
|
|
+}
|
|
|
|
+
|
|
int bnxt_qplib_get_dev_attr(struct bnxt_qplib_rcfw *rcfw,
|
|
int bnxt_qplib_get_dev_attr(struct bnxt_qplib_rcfw *rcfw,
|
|
struct bnxt_qplib_dev_attr *attr)
|
|
struct bnxt_qplib_dev_attr *attr)
|
|
{
|
|
{
|
|
@@ -131,6 +144,7 @@ int bnxt_qplib_get_dev_attr(struct bnxt_qplib_rcfw *rcfw,
|
|
attr->tqm_alloc_reqs[i * 4 + 3] = *(++tqm_alloc);
|
|
attr->tqm_alloc_reqs[i * 4 + 3] = *(++tqm_alloc);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ attr->is_atomic = bnxt_qplib_is_atomic_cap(rcfw);
|
|
bail:
|
|
bail:
|
|
bnxt_qplib_rcfw_free_sbuf(rcfw, sbuf);
|
|
bnxt_qplib_rcfw_free_sbuf(rcfw, sbuf);
|
|
return rc;
|
|
return rc;
|