Lines Matching refs:dd

280 	struct qib_devdata *dd = dd_from_ibdev(ibdev);  in subn_get_nodeinfo()  local
285 if (smp->attr_mod || pidx >= dd->num_pports || in subn_get_nodeinfo()
286 dd->pport[pidx].guid == 0) in subn_get_nodeinfo()
289 nip->port_guid = dd->pport[pidx].guid; in subn_get_nodeinfo()
297 nip->node_guid = dd->pport->guid; /* Use first-port GUID as node */ in subn_get_nodeinfo()
298 nip->partition_cap = cpu_to_be16(qib_get_npkeys(dd)); in subn_get_nodeinfo()
299 nip->device_id = cpu_to_be16(dd->deviceid); in subn_get_nodeinfo()
300 majrev = dd->majrev; in subn_get_nodeinfo()
301 minrev = dd->minrev; in subn_get_nodeinfo()
304 vendor = dd->vendorid; in subn_get_nodeinfo()
315 struct qib_devdata *dd = dd_from_ibdev(ibdev); in subn_get_guidinfo() local
324 if (startgx == 0 && pidx < dd->num_pports) { in subn_get_guidinfo()
325 struct qib_pportdata *ppd = dd->pport + pidx; in subn_get_guidinfo()
347 (void) ppd->dd->f_set_ib_cfg(ppd, QIB_IB_CFG_LWID_ENB, w); in set_link_width_enabled()
352 (void) ppd->dd->f_set_ib_cfg(ppd, QIB_IB_CFG_SPD_ENB, s); in set_link_speed_enabled()
357 return ppd->dd->f_get_ib_cfg(ppd, QIB_IB_CFG_OVERRUN_THRESH); in get_overrunthreshold()
369 (void) ppd->dd->f_set_ib_cfg(ppd, QIB_IB_CFG_OVERRUN_THRESH, in set_overrunthreshold()
376 return ppd->dd->f_get_ib_cfg(ppd, QIB_IB_CFG_PHYERR_THRESH); in get_phyerrthreshold()
388 (void) ppd->dd->f_set_ib_cfg(ppd, QIB_IB_CFG_PHYERR_THRESH, in set_phyerrthreshold()
401 return ppd->dd->f_get_ib_cfg(ppd, QIB_IB_CFG_LINKDEFAULT) == in get_linkdowndefaultstate()
454 struct qib_devdata *dd; in subn_get_portinfo() local
481 dd = dd_from_ibdev(ibdev); in subn_get_portinfo()
483 ppd = dd->pport + (port_num - 1); in subn_get_portinfo()
504 state = dd->f_iblink_state(ppd->lastibcstat); in subn_get_portinfo()
508 (dd->f_ibphys_portstate(ppd->lastibcstat) << 4) | in subn_get_portinfo()
535 dd->f_get_ib_cfg(ppd, QIB_IB_CFG_VL_HIGH_CAP); in subn_get_portinfo()
537 dd->f_get_ib_cfg(ppd, QIB_IB_CFG_VL_LOW_CAP); in subn_get_portinfo()
543 dd->f_get_ib_cfg(ppd, QIB_IB_CFG_OP_VLS) << 4; in subn_get_portinfo()
560 v = dd->f_get_ib_cfg(ppd, QIB_IB_CFG_LINKLATENCY); in subn_get_portinfo()
578 static int get_pkeys(struct qib_devdata *dd, u8 port, u16 *pkeys) in get_pkeys() argument
580 struct qib_pportdata *ppd = dd->pport + port - 1; in get_pkeys()
586 struct qib_ctxtdata *rcd = dd->rcd[ppd->hw_pidx]; in get_pkeys()
604 struct qib_devdata *dd = dd_from_ibdev(ibdev); in subn_get_pkeytable() local
605 unsigned i, n = qib_get_npkeys(dd); in subn_get_pkeytable()
607 get_pkeys(dd, port, p); in subn_get_pkeytable()
620 struct qib_devdata *dd = dd_from_ibdev(ibdev); in subn_set_guidinfo() local
627 if (startgx == 0 && pidx < dd->num_pports) { in subn_set_guidinfo()
628 struct qib_pportdata *ppd = dd->pport + pidx; in subn_set_guidinfo()
655 struct qib_devdata *dd; in subn_set_portinfo() local
680 dd = dd_from_ibdev(ibdev); in subn_set_portinfo()
682 ppd = dd->pport + (port_num - 1); in subn_set_portinfo()
759 (void) dd->f_set_ib_cfg(ppd, QIB_IB_CFG_LINKDEFAULT, in subn_set_portinfo()
763 (void) dd->f_set_ib_cfg(ppd, QIB_IB_CFG_LINKDEFAULT, in subn_set_portinfo()
772 (void) dd->f_set_ib_cfg(ppd, QIB_IB_CFG_VL_HIGH_LIMIT, in subn_set_portinfo()
787 (void) dd->f_set_ib_cfg(ppd, QIB_IB_CFG_OP_VLS, vls); in subn_set_portinfo()
986 static int set_pkeys(struct qib_devdata *dd, u8 port, u16 *pkeys) in set_pkeys() argument
999 ppd = dd->pport + (port - 1); in set_pkeys()
1000 rcd = dd->rcd[ppd->hw_pidx]; in set_pkeys()
1027 (void) dd->f_set_ib_cfg(ppd, QIB_IB_CFG_PKEYS, 0); in set_pkeys()
1030 event.device = &dd->verbs_dev.ibdev; in set_pkeys()
1043 struct qib_devdata *dd = dd_from_ibdev(ibdev); in subn_set_pkeytable() local
1044 unsigned i, n = qib_get_npkeys(dd); in subn_set_pkeytable()
1049 if (startpx != 0 || set_pkeys(dd, port, q) != 0) in subn_set_pkeytable()
1106 (void) ppd->dd->f_get_ib_table(ppd, QIB_IB_TBL_VL_LOW_ARB, in subn_get_vl_arb()
1109 (void) ppd->dd->f_get_ib_table(ppd, QIB_IB_TBL_VL_HIGH_ARB, in subn_get_vl_arb()
1126 (void) ppd->dd->f_set_ib_table(ppd, QIB_IB_TBL_VL_LOW_ARB, in subn_set_vl_arb()
1129 (void) ppd->dd->f_set_ib_table(ppd, QIB_IB_TBL_VL_HIGH_ARB, in subn_set_vl_arb()
1154 struct qib_devdata *dd = dd_from_ibdev(ibdev); in pma_get_classportinfo() local
1169 p->reserved[0] = dd->psxmitwait_supported << 7; in pma_get_classportinfo()
1184 struct qib_devdata *dd = dd_from_dev(dev); in pma_get_portsamplescontrol() local
1198 p->tick = dd->f_get_ib_cfg(ppd, QIB_IB_CFG_PMA_TICKS); in pma_get_portsamplescontrol()
1199 p->sample_status = dd->f_portcntr(ppd, QIBPORTCNTR_PSSTAT); in pma_get_portsamplescontrol()
1222 struct qib_devdata *dd = dd_from_dev(dev); in pma_set_portsamplescontrol() local
1240 status = dd->f_portcntr(ppd, QIBPORTCNTR_PSSTAT); in pma_set_portsamplescontrol()
1252 dd->f_set_cntr_sample(ppd, ibp->pma_sample_interval, in pma_set_portsamplescontrol()
1270 ret = ppd->dd->f_portcntr(ppd, QIBPORTCNTR_PSXMITDATA); in get_counter()
1273 ret = ppd->dd->f_portcntr(ppd, QIBPORTCNTR_PSRCVDATA); in get_counter()
1276 ret = ppd->dd->f_portcntr(ppd, QIBPORTCNTR_PSXMITPKTS); in get_counter()
1279 ret = ppd->dd->f_portcntr(ppd, QIBPORTCNTR_PSRCVPKTS); in get_counter()
1282 ret = ppd->dd->f_portcntr(ppd, QIBPORTCNTR_PSXMITWAIT); in get_counter()
1351 struct qib_devdata *dd = dd_from_dev(dev); in pma_get_portsamplesresult() local
1364 status = dd->f_portcntr(ppd, QIBPORTCNTR_PSSTAT); in pma_get_portsamplesresult()
1370 dd->f_set_cntr_sample(ppd, in pma_get_portsamplesresult()
1390 struct qib_devdata *dd = dd_from_dev(dev); in pma_get_portsamplesresult_ext() local
1404 status = dd->f_portcntr(ppd, QIBPORTCNTR_PSSTAT); in pma_get_portsamplesresult_ext()
1412 dd->f_set_cntr_sample(ppd, in pma_get_portsamplesresult_ext()
1533 struct qib_devdata *dd = dd_from_ppd(ppd); in pma_get_portcounters_cong() local
1542 if (!dd->psxmitwait_supported) in pma_get_portcounters_cong()
1581 (dd->psxmitwait_check_rate & in pma_get_portcounters_cong()
1769 struct qib_devdata *dd = dd_from_ppd(ppd); in pma_set_portcounters_cong() local
1782 dd->f_set_cntr_sample(ppd, QIB_CONG_TIMER_PSINTERVAL, in pma_set_portcounters_cong()
1992 ppd->dd->f_set_ib_cfg(ppd, QIB_IB_CFG_PORT, in process_subn()
2446 struct qib_devdata *dd = dd_from_ppd(ppd); in xmit_wait_timer_func() local
2452 status = dd->f_portcntr(ppd, QIBPORTCNTR_PSSTAT); in xmit_wait_timer_func()
2461 dd->f_set_cntr_sample(ppd, QIB_CONG_TIMER_PSINTERVAL, 0x0); in xmit_wait_timer_func()
2469 struct qib_devdata *dd = dd_from_dev(dev); in qib_create_agents() local
2475 for (p = 0; p < dd->num_pports; p++) { in qib_create_agents()
2476 ibp = &dd->pport[p].ibport_data; in qib_create_agents()
2486 dd->pport[p].cong_stats.counter = 0; in qib_create_agents()
2487 init_timer(&dd->pport[p].cong_stats.timer); in qib_create_agents()
2488 dd->pport[p].cong_stats.timer.function = xmit_wait_timer_func; in qib_create_agents()
2489 dd->pport[p].cong_stats.timer.data = in qib_create_agents()
2490 (unsigned long)(&dd->pport[p]); in qib_create_agents()
2491 dd->pport[p].cong_stats.timer.expires = 0; in qib_create_agents()
2492 add_timer(&dd->pport[p].cong_stats.timer); in qib_create_agents()
2500 for (p = 0; p < dd->num_pports; p++) { in qib_create_agents()
2501 ibp = &dd->pport[p].ibport_data; in qib_create_agents()
2514 struct qib_devdata *dd = dd_from_dev(dev); in qib_free_agents() local
2519 for (p = 0; p < dd->num_pports; p++) { in qib_free_agents()
2520 ibp = &dd->pport[p].ibport_data; in qib_free_agents()
2530 if (dd->pport[p].cong_stats.timer.data) in qib_free_agents()
2531 del_timer_sync(&dd->pport[p].cong_stats.timer); in qib_free_agents()