aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ipath/ipath_verbs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_verbs.c')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_verbs.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_verbs.c b/drivers/infiniband/hw/ipath/ipath_verbs.c
index 012ccb4f9a37..2f9bc29313af 100644
--- a/drivers/infiniband/hw/ipath/ipath_verbs.c
+++ b/drivers/infiniband/hw/ipath/ipath_verbs.c
@@ -1183,7 +1183,9 @@ static int ipath_query_port(struct ib_device *ibdev,
1183 props->sm_lid = dev->sm_lid; 1183 props->sm_lid = dev->sm_lid;
1184 props->sm_sl = dev->sm_sl; 1184 props->sm_sl = dev->sm_sl;
1185 ibcstat = dd->ipath_lastibcstat; 1185 ibcstat = dd->ipath_lastibcstat;
1186 props->state = ((ibcstat >> 4) & 0x3) + 1; 1186 /* map LinkState to IB portinfo values. */
1187 props->state = ipath_ib_linkstate(dd, ibcstat) + 1;
1188
1187 /* See phys_state_show() */ 1189 /* See phys_state_show() */
1188 props->phys_state = /* MEA: assumes shift == 0 */ 1190 props->phys_state = /* MEA: assumes shift == 0 */
1189 ipath_cvt_physportstate[dd->ipath_lastibcstat & 1191 ipath_cvt_physportstate[dd->ipath_lastibcstat &
@@ -1195,9 +1197,9 @@ static int ipath_query_port(struct ib_device *ibdev,
1195 props->bad_pkey_cntr = ipath_get_cr_errpkey(dd) - 1197 props->bad_pkey_cntr = ipath_get_cr_errpkey(dd) -
1196 dev->z_pkey_violations; 1198 dev->z_pkey_violations;
1197 props->qkey_viol_cntr = dev->qkey_violations; 1199 props->qkey_viol_cntr = dev->qkey_violations;
1198 props->active_width = IB_WIDTH_4X; 1200 props->active_width = dd->ipath_link_width_active;
1199 /* See rate_show() */ 1201 /* See rate_show() */
1200 props->active_speed = 1; /* Regular 10Mbs speed. */ 1202 props->active_speed = dd->ipath_link_speed_active;
1201 props->max_vl_num = 1; /* VLCap = VL0 */ 1203 props->max_vl_num = 1; /* VLCap = VL0 */
1202 props->init_type_reply = 0; 1204 props->init_type_reply = 0;
1203 1205
@@ -1629,12 +1631,13 @@ int ipath_register_ib_device(struct ipath_devdata *dd)
1629 idev->pending_index = 0; 1631 idev->pending_index = 0;
1630 idev->port_cap_flags = 1632 idev->port_cap_flags =
1631 IB_PORT_SYS_IMAGE_GUID_SUP | IB_PORT_CLIENT_REG_SUP; 1633 IB_PORT_SYS_IMAGE_GUID_SUP | IB_PORT_CLIENT_REG_SUP;
1634 if (dd->ipath_flags & IPATH_HAS_LINK_LATENCY)
1635 idev->port_cap_flags |= IB_PORT_LINK_LATENCY_SUP;
1632 idev->pma_counter_select[0] = IB_PMA_PORT_XMIT_DATA; 1636 idev->pma_counter_select[0] = IB_PMA_PORT_XMIT_DATA;
1633 idev->pma_counter_select[1] = IB_PMA_PORT_RCV_DATA; 1637 idev->pma_counter_select[1] = IB_PMA_PORT_RCV_DATA;
1634 idev->pma_counter_select[2] = IB_PMA_PORT_XMIT_PKTS; 1638 idev->pma_counter_select[2] = IB_PMA_PORT_XMIT_PKTS;
1635 idev->pma_counter_select[3] = IB_PMA_PORT_RCV_PKTS; 1639 idev->pma_counter_select[3] = IB_PMA_PORT_RCV_PKTS;
1636 idev->pma_counter_select[4] = IB_PMA_PORT_XMIT_WAIT; 1640 idev->pma_counter_select[4] = IB_PMA_PORT_XMIT_WAIT;
1637 idev->link_width_enabled = 3; /* 1x or 4x */
1638 1641
1639 /* Snapshot current HW counters to "clear" them. */ 1642 /* Snapshot current HW counters to "clear" them. */
1640 ipath_get_counters(dd, &cntrs); 1643 ipath_get_counters(dd, &cntrs);