Lines Matching refs:ppd
140 struct qib_pportdata *ppd;
146 ppd = dd->pport + (i % dd->num_pports);
148 rcd = qib_create_ctxtdata(ppd, i, dd->assigned_node_id);
165 struct qib_ctxtdata *qib_create_ctxtdata(struct qib_pportdata *ppd, u32 ctxt,
168 struct qib_devdata *dd = ppd->dd;
175 rcd->ppd = ppd;
220 int qib_init_pportdata(struct qib_pportdata *ppd, struct qib_devdata *dd,
225 ppd->dd = dd;
226 ppd->hw_pidx = hw_pidx;
227 ppd->port = port; /* IB port number, not index */
229 spin_lock_init(&ppd->sdma_lock);
230 spin_lock_init(&ppd->lflags_lock);
231 spin_lock_init(&ppd->cc_shadow_lock);
232 init_waitqueue_head(&ppd->state_wait);
234 timer_setup(&ppd->symerr_clear_timer, qib_clear_symerror_on_linkup, 0);
236 ppd->qib_wq = NULL;
237 ppd->ibport_data.pmastats =
239 if (!ppd->ibport_data.pmastats)
241 ppd->ibport_data.rvp.rc_acks = alloc_percpu(u64);
242 ppd->ibport_data.rvp.rc_qacks = alloc_percpu(u64);
243 ppd->ibport_data.rvp.rc_delayed_comp = alloc_percpu(u64);
244 if (!(ppd->ibport_data.rvp.rc_acks) ||
245 !(ppd->ibport_data.rvp.rc_qacks) ||
246 !(ppd->ibport_data.rvp.rc_delayed_comp))
252 ppd->cc_supported_table_entries = min(max_t(int, qib_cc_table_size,
255 ppd->cc_max_table_entries =
256 ppd->cc_supported_table_entries/IB_CCT_ENTRIES;
260 ppd->ccti_entries = kzalloc(size, GFP_KERNEL);
261 if (!ppd->ccti_entries)
265 ppd->congestion_entries = kzalloc(size, GFP_KERNEL);
266 if (!ppd->congestion_entries)
270 ppd->ccti_entries_shadow = kzalloc(size, GFP_KERNEL);
271 if (!ppd->ccti_entries_shadow)
275 ppd->congestion_entries_shadow = kzalloc(size, GFP_KERNEL);
276 if (!ppd->congestion_entries_shadow)
282 kfree(ppd->ccti_entries_shadow);
283 ppd->ccti_entries_shadow = NULL;
285 kfree(ppd->congestion_entries);
286 ppd->congestion_entries = NULL;
288 kfree(ppd->ccti_entries);
289 ppd->ccti_entries = NULL;
490 dd->f_rcvctrl(rcd->ppd, rcvmask, i);
579 struct qib_pportdata *ppd;
582 ppd = dd->pport + pidx;
583 if (!ppd->qib_wq) {
588 ppd->qib_wq = alloc_ordered_workqueue(wq_name,
590 if (!ppd->qib_wq)
599 ppd = dd->pport + pidx;
600 if (ppd->qib_wq) {
601 destroy_workqueue(ppd->qib_wq);
602 ppd->qib_wq = NULL;
608 static void qib_free_pportdata(struct qib_pportdata *ppd)
610 free_percpu(ppd->ibport_data.pmastats);
611 free_percpu(ppd->ibport_data.rvp.rc_acks);
612 free_percpu(ppd->ibport_data.rvp.rc_qacks);
613 free_percpu(ppd->ibport_data.rvp.rc_delayed_comp);
614 ppd->ibport_data.pmastats = NULL;
638 struct qib_pportdata *ppd;
643 ppd = dd->pport + pidx;
644 spin_lock_irqsave(&ppd->lflags_lock, flags);
645 ppd->lflags &= ~(QIBL_LINKACTIVE | QIBL_LINKARMED |
648 spin_unlock_irqrestore(&ppd->lflags_lock, flags);
691 ppd = dd->pport + pidx;
698 ppd->init_ibmaxlen = min(mtu > 2048 ?
706 ppd->ibmaxlen = ppd->init_ibmaxlen;
707 qib_set_mtu(ppd, mtu);
709 spin_lock_irqsave(&ppd->lflags_lock, flags);
710 ppd->lflags |= QIBL_IB_LINK_DISABLED;
711 spin_unlock_irqrestore(&ppd->lflags_lock, flags);
713 lastfail = dd->f_bringup_serdes(ppd);
716 "Failed to bringup IB port %u\n", ppd->port);
741 ppd = dd->pport + pidx;
746 *ppd->statusp |= QIB_STATUS_CHIP_PRESENT |
748 if (!ppd->link_speed_enabled)
751 ret = qib_setup_sdma(ppd);
752 timer_setup(&ppd->hol_timer, qib_hol_event, 0);
753 ppd->hol_state = QIB_HOL_UP;
798 struct qib_pportdata *ppd;
806 ppd = dd->pport + pidx;
807 if (ppd->hol_timer.function)
808 del_timer_sync(&ppd->hol_timer);
809 if (ppd->led_override_timer.function) {
810 del_timer_sync(&ppd->led_override_timer);
811 atomic_set(&ppd->led_override_timer_active, 0);
813 if (ppd->symerr_clear_timer.function)
814 del_timer_sync(&ppd->symerr_clear_timer);
829 struct qib_pportdata *ppd;
837 ppd = dd->pport + pidx;
839 spin_lock_irq(&ppd->lflags_lock);
840 ppd->lflags &= ~(QIBL_LINKDOWN | QIBL_LINKINIT |
843 spin_unlock_irq(&ppd->lflags_lock);
844 *ppd->statusp &= ~(QIB_STATUS_IB_CONF | QIB_STATUS_IB_READY);
852 ppd = dd->pport + pidx;
853 dd->f_rcvctrl(ppd, QIB_RCVCTRL_TAILUPD_DIS |
861 dd->f_sendctrl(ppd, QIB_SENDCTRL_CLEAR);
871 ppd = dd->pport + pidx;
872 dd->f_setextled(ppd, 0); /* make sure LEDs are off */
875 qib_teardown_sdma(ppd);
877 dd->f_sendctrl(ppd, QIB_SENDCTRL_AVAIL_DIS |
883 dd->f_quiet_serdes(ppd);
885 if (ppd->qib_wq) {
886 destroy_workqueue(ppd->qib_wq);
887 ppd->qib_wq = NULL;
889 qib_free_pportdata(ppd);
1137 struct qib_pportdata *ppd;
1139 ppd = dd->pport + pidx;
1141 qib_set_linkstate(ppd,
1143 dd->f_setextled(ppd, 0);
1145 *ppd->statusp &= ~QIB_STATUS_IB_READY;