Lines Matching defs:ppd
127 struct hfi1_pportdata *ppd)
135 ret = hfi1_create_ctxtdata(ppd, dd->node, &rcd);
345 int hfi1_create_ctxtdata(struct hfi1_pportdata *ppd, int numa,
348 struct hfi1_devdata *dd = ppd->dd;
372 rcd->ppd = ppd;
524 void set_link_ipg(struct hfi1_pportdata *ppd)
526 struct hfi1_devdata *dd = ppd->dd;
539 cc_state = get_cc_state(ppd);
550 u16 ccti = ppd->cca_timer[i].ccti;
564 current_egress_rate = active_egress_rate(ppd);
566 max_pkt_time = egress_cycles(ppd->ibmaxlen, current_egress_rate);
579 struct hfi1_pportdata *ppd;
587 ppd = cca_timer->ppd;
592 cc_state = get_cc_state(ppd);
608 spin_lock_irqsave(&ppd->cca_timer_lock, flags);
612 set_link_ipg(ppd);
622 spin_unlock_irqrestore(&ppd->cca_timer_lock, flags);
630 void hfi1_init_pportdata(struct pci_dev *pdev, struct hfi1_pportdata *ppd,
637 ppd->dd = dd;
638 ppd->hw_pidx = hw_pidx;
639 ppd->port = port; /* IB port number, not index */
640 ppd->prev_link_width = LINK_WIDTH_DEFAULT;
646 ppd->port_vl_xmit_wait_last[i] = 0;
647 ppd->vl_xmit_flit_cnt[i] = 0;
652 ppd->pkeys[default_pkey_idx] = DEFAULT_P_KEY;
653 ppd->part_enforce |= HFI1_PART_ENFORCE_IN;
654 ppd->pkeys[0] = 0x8001;
656 INIT_WORK(&ppd->link_vc_work, handle_verify_cap);
657 INIT_WORK(&ppd->link_up_work, handle_link_up);
658 INIT_WORK(&ppd->link_down_work, handle_link_down);
659 INIT_WORK(&ppd->freeze_work, handle_freeze);
660 INIT_WORK(&ppd->link_downgrade_work, handle_link_downgrade);
661 INIT_WORK(&ppd->sma_message_work, handle_sma_message);
662 INIT_WORK(&ppd->link_bounce_work, handle_link_bounce);
663 INIT_DELAYED_WORK(&ppd->start_link_work, handle_start_link);
664 INIT_WORK(&ppd->linkstate_active_work, receive_interrupt_work);
665 INIT_WORK(&ppd->qsfp_info.qsfp_work, qsfp_event);
667 mutex_init(&ppd->hls_lock);
668 spin_lock_init(&ppd->qsfp_info.qsfp_lock);
670 ppd->qsfp_info.ppd = ppd;
671 ppd->sm_trap_qp = 0x0;
672 ppd->sa_qp = 0x1;
674 ppd->hfi1_wq = NULL;
676 spin_lock_init(&ppd->cca_timer_lock);
679 hrtimer_init(&ppd->cca_timer[i].hrtimer, CLOCK_MONOTONIC,
681 ppd->cca_timer[i].ppd = ppd;
682 ppd->cca_timer[i].sl = i;
683 ppd->cca_timer[i].ccti = 0;
684 ppd->cca_timer[i].hrtimer.function = cca_timer_fn;
687 ppd->cc_max_table_entries = IB_CC_TABLE_CAP_DEFAULT;
689 spin_lock_init(&ppd->cc_state_lock);
690 spin_lock_init(&ppd->cc_log_lock);
692 RCU_INIT_POINTER(ppd->cc_state, cc_state);
782 struct hfi1_pportdata *ppd;
785 ppd = dd->pport + pidx;
786 if (!ppd->hfi1_wq) {
787 ppd->hfi1_wq =
794 if (!ppd->hfi1_wq)
797 if (!ppd->link_wq) {
802 ppd->link_wq =
808 if (!ppd->link_wq)
816 ppd = dd->pport + pidx;
817 if (ppd->hfi1_wq) {
818 destroy_workqueue(ppd->hfi1_wq);
819 ppd->hfi1_wq = NULL;
821 if (ppd->link_wq) {
822 destroy_workqueue(ppd->link_wq);
823 ppd->link_wq = NULL;
836 struct hfi1_pportdata *ppd;
839 ppd = dd->pport + pidx;
841 if (ppd->hfi1_wq) {
842 destroy_workqueue(ppd->hfi1_wq);
843 ppd->hfi1_wq = NULL;
845 if (ppd->link_wq) {
846 destroy_workqueue(ppd->link_wq);
847 ppd->link_wq = NULL;
890 struct hfi1_pportdata *ppd;
908 ppd = dd->pport + pidx;
909 ppd->linkup = 0;
959 ppd = dd->pport + pidx;
962 ppd->statusp = &dd->status->port;
964 set_mtu(ppd);
985 ppd = dd->pport + pidx;
991 lastfail = bringup_serdes(ppd);
995 ppd->port);
1001 if (ppd->statusp)
1002 *ppd->statusp |= HFI1_STATUS_CHIP_PRESENT |
1004 if (!ppd->link_speed_enabled)
1024 struct hfi1_pportdata *ppd;
1028 ppd = dd->pport + pidx;
1029 if (ppd->led_override_timer.function) {
1030 del_timer_sync(&ppd->led_override_timer);
1031 atomic_set(&ppd->led_override_timer_active, 0);
1047 struct hfi1_pportdata *ppd;
1057 ppd = dd->pport + pidx;
1059 ppd->linkup = 0;
1060 if (ppd->statusp)
1061 *ppd->statusp &= ~(HFI1_STATUS_IB_CONF |
1071 ppd = dd->pport + pidx;
1096 ppd = dd->pport + pidx;
1104 shutdown_led_override(ppd);
1110 hfi1_quiet_serdes(ppd);
1111 if (ppd->hfi1_wq)
1112 flush_workqueue(ppd->hfi1_wq);
1113 if (ppd->link_wq)
1114 flush_workqueue(ppd->link_wq);
1364 struct hfi1_pportdata *ppd;
1366 ppd = dd->pport + pidx;
1368 set_link_state(ppd, HLS_DN_DISABLE);
1370 if (ppd->statusp)
1371 *ppd->statusp &= ~HFI1_STATUS_IB_READY;
1529 struct hfi1_pportdata *ppd = &dd->pport[pidx];
1533 if (ppd->statusp)
1534 *ppd->statusp &= ~HFI1_STATUS_CHIP_PRESENT;
1537 hrtimer_cancel(&ppd->cca_timer[i].hrtimer);
1539 spin_lock(&ppd->cc_state_lock);
1540 cc_state = get_cc_state_protected(ppd);
1541 RCU_INIT_POINTER(ppd->cc_state, NULL);
1542 spin_unlock(&ppd->cc_state_lock);
1602 struct hfi1_pportdata *ppd;
1708 ppd = dd->pport + pidx;
1709 if (ppd->hfi1_wq) {
1710 destroy_workqueue(ppd->hfi1_wq);
1711 ppd->hfi1_wq = NULL;
1713 if (ppd->link_wq) {
1714 destroy_workqueue(ppd->link_wq);
1715 ppd->link_wq = NULL;