Lines Matching refs:dd
281 struct qib_devdata *dd = dd_from_ibdev(ibdev); in subn_get_nodeinfo() local
286 if (smp->attr_mod || pidx >= dd->num_pports || in subn_get_nodeinfo()
287 dd->pport[pidx].guid == 0) in subn_get_nodeinfo()
290 nip->port_guid = dd->pport[pidx].guid; in subn_get_nodeinfo()
298 nip->node_guid = dd->pport->guid; /* Use first-port GUID as node */ in subn_get_nodeinfo()
299 nip->partition_cap = cpu_to_be16(qib_get_npkeys(dd)); in subn_get_nodeinfo()
300 nip->device_id = cpu_to_be16(dd->deviceid); in subn_get_nodeinfo()
301 majrev = dd->majrev; in subn_get_nodeinfo()
302 minrev = dd->minrev; in subn_get_nodeinfo()
305 vendor = dd->vendorid; in subn_get_nodeinfo()
316 struct qib_devdata *dd = dd_from_ibdev(ibdev); in subn_get_guidinfo() local
325 if (startgx == 0 && pidx < dd->num_pports) { in subn_get_guidinfo()
326 struct qib_pportdata *ppd = dd->pport + pidx; in subn_get_guidinfo()
348 (void) ppd->dd->f_set_ib_cfg(ppd, QIB_IB_CFG_LWID_ENB, w); in set_link_width_enabled()
353 (void) ppd->dd->f_set_ib_cfg(ppd, QIB_IB_CFG_SPD_ENB, s); in set_link_speed_enabled()
358 return ppd->dd->f_get_ib_cfg(ppd, QIB_IB_CFG_OVERRUN_THRESH); in get_overrunthreshold()
370 (void) ppd->dd->f_set_ib_cfg(ppd, QIB_IB_CFG_OVERRUN_THRESH, in set_overrunthreshold()
377 return ppd->dd->f_get_ib_cfg(ppd, QIB_IB_CFG_PHYERR_THRESH); in get_phyerrthreshold()
389 (void) ppd->dd->f_set_ib_cfg(ppd, QIB_IB_CFG_PHYERR_THRESH, in set_phyerrthreshold()
402 return ppd->dd->f_get_ib_cfg(ppd, QIB_IB_CFG_LINKDEFAULT) == in get_linkdowndefaultstate()
455 struct qib_devdata *dd; in subn_get_portinfo() local
482 dd = dd_from_ibdev(ibdev); in subn_get_portinfo()
484 ppd = dd->pport + (port_num - 1); in subn_get_portinfo()
505 state = dd->f_iblink_state(ppd->lastibcstat); in subn_get_portinfo()
509 (dd->f_ibphys_portstate(ppd->lastibcstat) << 4) | in subn_get_portinfo()
536 dd->f_get_ib_cfg(ppd, QIB_IB_CFG_VL_HIGH_CAP); in subn_get_portinfo()
538 dd->f_get_ib_cfg(ppd, QIB_IB_CFG_VL_LOW_CAP); in subn_get_portinfo()
544 dd->f_get_ib_cfg(ppd, QIB_IB_CFG_OP_VLS) << 4; in subn_get_portinfo()
561 v = dd->f_get_ib_cfg(ppd, QIB_IB_CFG_LINKLATENCY); in subn_get_portinfo()
579 static int get_pkeys(struct qib_devdata *dd, u8 port, u16 *pkeys) in get_pkeys() argument
581 struct qib_pportdata *ppd = dd->pport + port - 1; in get_pkeys()
587 struct qib_ctxtdata *rcd = dd->rcd[ppd->hw_pidx]; in get_pkeys()
605 struct qib_devdata *dd = dd_from_ibdev(ibdev); in subn_get_pkeytable() local
606 unsigned i, n = qib_get_npkeys(dd); in subn_get_pkeytable()
608 get_pkeys(dd, port, p); in subn_get_pkeytable()
621 struct qib_devdata *dd = dd_from_ibdev(ibdev); in subn_set_guidinfo() local
628 if (startgx == 0 && pidx < dd->num_pports) { in subn_set_guidinfo()
629 struct qib_pportdata *ppd = dd->pport + pidx; in subn_set_guidinfo()
656 struct qib_devdata *dd; in subn_set_portinfo() local
681 dd = dd_from_ibdev(ibdev); in subn_set_portinfo()
683 ppd = dd->pport + (port_num - 1); in subn_set_portinfo()
760 (void) dd->f_set_ib_cfg(ppd, QIB_IB_CFG_LINKDEFAULT, in subn_set_portinfo()
764 (void) dd->f_set_ib_cfg(ppd, QIB_IB_CFG_LINKDEFAULT, in subn_set_portinfo()
773 (void) dd->f_set_ib_cfg(ppd, QIB_IB_CFG_VL_HIGH_LIMIT, in subn_set_portinfo()
788 (void) dd->f_set_ib_cfg(ppd, QIB_IB_CFG_OP_VLS, vls); in subn_set_portinfo()
987 static int set_pkeys(struct qib_devdata *dd, u8 port, u16 *pkeys) in set_pkeys() argument
1000 ppd = dd->pport + (port - 1); in set_pkeys()
1001 rcd = dd->rcd[ppd->hw_pidx]; in set_pkeys()
1028 (void) dd->f_set_ib_cfg(ppd, QIB_IB_CFG_PKEYS, 0); in set_pkeys()
1031 event.device = &dd->verbs_dev.ibdev; in set_pkeys()
1044 struct qib_devdata *dd = dd_from_ibdev(ibdev); in subn_set_pkeytable() local
1045 unsigned i, n = qib_get_npkeys(dd); in subn_set_pkeytable()
1050 if (startpx != 0 || set_pkeys(dd, port, q) != 0) in subn_set_pkeytable()
1107 (void) ppd->dd->f_get_ib_table(ppd, QIB_IB_TBL_VL_LOW_ARB, in subn_get_vl_arb()
1110 (void) ppd->dd->f_get_ib_table(ppd, QIB_IB_TBL_VL_HIGH_ARB, in subn_get_vl_arb()
1127 (void) ppd->dd->f_set_ib_table(ppd, QIB_IB_TBL_VL_LOW_ARB, in subn_set_vl_arb()
1130 (void) ppd->dd->f_set_ib_table(ppd, QIB_IB_TBL_VL_HIGH_ARB, in subn_set_vl_arb()
1155 struct qib_devdata *dd = dd_from_ibdev(ibdev); in pma_get_classportinfo() local
1170 p->reserved[0] = dd->psxmitwait_supported << 7; in pma_get_classportinfo()
1185 struct qib_devdata *dd = dd_from_dev(dev); in pma_get_portsamplescontrol() local
1199 p->tick = dd->f_get_ib_cfg(ppd, QIB_IB_CFG_PMA_TICKS); in pma_get_portsamplescontrol()
1200 p->sample_status = dd->f_portcntr(ppd, QIBPORTCNTR_PSSTAT); in pma_get_portsamplescontrol()
1223 struct qib_devdata *dd = dd_from_dev(dev); in pma_set_portsamplescontrol() local
1241 status = dd->f_portcntr(ppd, QIBPORTCNTR_PSSTAT); in pma_set_portsamplescontrol()
1253 dd->f_set_cntr_sample(ppd, ibp->pma_sample_interval, in pma_set_portsamplescontrol()
1271 ret = ppd->dd->f_portcntr(ppd, QIBPORTCNTR_PSXMITDATA); in get_counter()
1274 ret = ppd->dd->f_portcntr(ppd, QIBPORTCNTR_PSRCVDATA); in get_counter()
1277 ret = ppd->dd->f_portcntr(ppd, QIBPORTCNTR_PSXMITPKTS); in get_counter()
1280 ret = ppd->dd->f_portcntr(ppd, QIBPORTCNTR_PSRCVPKTS); in get_counter()
1283 ret = ppd->dd->f_portcntr(ppd, QIBPORTCNTR_PSXMITWAIT); in get_counter()
1352 struct qib_devdata *dd = dd_from_dev(dev); in pma_get_portsamplesresult() local
1365 status = dd->f_portcntr(ppd, QIBPORTCNTR_PSSTAT); in pma_get_portsamplesresult()
1371 dd->f_set_cntr_sample(ppd, in pma_get_portsamplesresult()
1391 struct qib_devdata *dd = dd_from_dev(dev); in pma_get_portsamplesresult_ext() local
1405 status = dd->f_portcntr(ppd, QIBPORTCNTR_PSSTAT); in pma_get_portsamplesresult_ext()
1413 dd->f_set_cntr_sample(ppd, in pma_get_portsamplesresult_ext()
1534 struct qib_devdata *dd = dd_from_ppd(ppd); in pma_get_portcounters_cong() local
1543 if (!dd->psxmitwait_supported) in pma_get_portcounters_cong()
1582 (dd->psxmitwait_check_rate & in pma_get_portcounters_cong()
1770 struct qib_devdata *dd = dd_from_ppd(ppd); in pma_set_portcounters_cong() local
1783 dd->f_set_cntr_sample(ppd, QIB_CONG_TIMER_PSINTERVAL, in pma_set_portcounters_cong()
1993 ppd->dd->f_set_ib_cfg(ppd, QIB_IB_CFG_PORT, in process_subn()
2455 struct qib_devdata *dd = dd_from_ppd(ppd); in xmit_wait_timer_func() local
2461 status = dd->f_portcntr(ppd, QIBPORTCNTR_PSSTAT); in xmit_wait_timer_func()
2470 dd->f_set_cntr_sample(ppd, QIB_CONG_TIMER_PSINTERVAL, 0x0); in xmit_wait_timer_func()
2478 struct qib_devdata *dd = dd_from_dev(dev); in qib_create_agents() local
2484 for (p = 0; p < dd->num_pports; p++) { in qib_create_agents()
2485 ibp = &dd->pport[p].ibport_data; in qib_create_agents()
2495 dd->pport[p].cong_stats.counter = 0; in qib_create_agents()
2496 init_timer(&dd->pport[p].cong_stats.timer); in qib_create_agents()
2497 dd->pport[p].cong_stats.timer.function = xmit_wait_timer_func; in qib_create_agents()
2498 dd->pport[p].cong_stats.timer.data = in qib_create_agents()
2499 (unsigned long)(&dd->pport[p]); in qib_create_agents()
2500 dd->pport[p].cong_stats.timer.expires = 0; in qib_create_agents()
2501 add_timer(&dd->pport[p].cong_stats.timer); in qib_create_agents()
2509 for (p = 0; p < dd->num_pports; p++) { in qib_create_agents()
2510 ibp = &dd->pport[p].ibport_data; in qib_create_agents()
2523 struct qib_devdata *dd = dd_from_dev(dev); in qib_free_agents() local
2528 for (p = 0; p < dd->num_pports; p++) { in qib_free_agents()
2529 ibp = &dd->pport[p].ibport_data; in qib_free_agents()
2539 if (dd->pport[p].cong_stats.timer.data) in qib_free_agents()
2540 del_timer_sync(&dd->pport[p].cong_stats.timer); in qib_free_agents()