Lines Matching defs:ppd

86 			     struct hfi1_pportdata *ppd)
94 ret = hfi1_create_ctxtdata(ppd, dd->node, &rcd);
304 int hfi1_create_ctxtdata(struct hfi1_pportdata *ppd, int numa,
307 struct hfi1_devdata *dd = ppd->dd;
331 rcd->ppd = ppd;
483 void set_link_ipg(struct hfi1_pportdata *ppd)
485 struct hfi1_devdata *dd = ppd->dd;
498 cc_state = get_cc_state(ppd);
509 u16 ccti = ppd->cca_timer[i].ccti;
523 current_egress_rate = active_egress_rate(ppd);
525 max_pkt_time = egress_cycles(ppd->ibmaxlen, current_egress_rate);
538 struct hfi1_pportdata *ppd;
546 ppd = cca_timer->ppd;
551 cc_state = get_cc_state(ppd);
567 spin_lock_irqsave(&ppd->cca_timer_lock, flags);
571 set_link_ipg(ppd);
581 spin_unlock_irqrestore(&ppd->cca_timer_lock, flags);
589 void hfi1_init_pportdata(struct pci_dev *pdev, struct hfi1_pportdata *ppd,
596 ppd->dd = dd;
597 ppd->hw_pidx = hw_pidx;
598 ppd->port = port; /* IB port number, not index */
599 ppd->prev_link_width = LINK_WIDTH_DEFAULT;
605 ppd->port_vl_xmit_wait_last[i] = 0;
606 ppd->vl_xmit_flit_cnt[i] = 0;
611 ppd->pkeys[default_pkey_idx] = DEFAULT_P_KEY;
612 ppd->part_enforce |= HFI1_PART_ENFORCE_IN;
613 ppd->pkeys[0] = 0x8001;
615 INIT_WORK(&ppd->link_vc_work, handle_verify_cap);
616 INIT_WORK(&ppd->link_up_work, handle_link_up);
617 INIT_WORK(&ppd->link_down_work, handle_link_down);
618 INIT_WORK(&ppd->freeze_work, handle_freeze);
619 INIT_WORK(&ppd->link_downgrade_work, handle_link_downgrade);
620 INIT_WORK(&ppd->sma_message_work, handle_sma_message);
621 INIT_WORK(&ppd->link_bounce_work, handle_link_bounce);
622 INIT_DELAYED_WORK(&ppd->start_link_work, handle_start_link);
623 INIT_WORK(&ppd->linkstate_active_work, receive_interrupt_work);
624 INIT_WORK(&ppd->qsfp_info.qsfp_work, qsfp_event);
626 mutex_init(&ppd->hls_lock);
627 spin_lock_init(&ppd->qsfp_info.qsfp_lock);
629 ppd->qsfp_info.ppd = ppd;
630 ppd->sm_trap_qp = 0x0;
631 ppd->sa_qp = 0x1;
633 ppd->hfi1_wq = NULL;
635 spin_lock_init(&ppd->cca_timer_lock);
638 hrtimer_init(&ppd->cca_timer[i].hrtimer, CLOCK_MONOTONIC,
640 ppd->cca_timer[i].ppd = ppd;
641 ppd->cca_timer[i].sl = i;
642 ppd->cca_timer[i].ccti = 0;
643 ppd->cca_timer[i].hrtimer.function = cca_timer_fn;
646 ppd->cc_max_table_entries = IB_CC_TABLE_CAP_DEFAULT;
648 spin_lock_init(&ppd->cc_state_lock);
649 spin_lock_init(&ppd->cc_log_lock);
651 RCU_INIT_POINTER(ppd->cc_state, cc_state);
741 struct hfi1_pportdata *ppd;
744 ppd = dd->pport + pidx;
745 if (!ppd->hfi1_wq) {
746 ppd->hfi1_wq =
753 if (!ppd->hfi1_wq)
756 if (!ppd->link_wq) {
761 ppd->link_wq =
767 if (!ppd->link_wq)
775 ppd = dd->pport + pidx;
776 if (ppd->hfi1_wq) {
777 destroy_workqueue(ppd->hfi1_wq);
778 ppd->hfi1_wq = NULL;
780 if (ppd->link_wq) {
781 destroy_workqueue(ppd->link_wq);
782 ppd->link_wq = NULL;
795 struct hfi1_pportdata *ppd;
798 ppd = dd->pport + pidx;
800 if (ppd->hfi1_wq) {
801 destroy_workqueue(ppd->hfi1_wq);
802 ppd->hfi1_wq = NULL;
804 if (ppd->link_wq) {
805 destroy_workqueue(ppd->link_wq);
806 ppd->link_wq = NULL;
849 struct hfi1_pportdata *ppd;
867 ppd = dd->pport + pidx;
868 ppd->linkup = 0;
918 ppd = dd->pport + pidx;
921 ppd->statusp = &dd->status->port;
923 set_mtu(ppd);
944 ppd = dd->pport + pidx;
950 lastfail = bringup_serdes(ppd);
954 ppd->port);
960 if (ppd->statusp)
961 *ppd->statusp |= HFI1_STATUS_CHIP_PRESENT |
963 if (!ppd->link_speed_enabled)
983 struct hfi1_pportdata *ppd;
987 ppd = dd->pport + pidx;
988 if (ppd->led_override_timer.function) {
989 del_timer_sync(&ppd->led_override_timer);
990 atomic_set(&ppd->led_override_timer_active, 0);
1006 struct hfi1_pportdata *ppd;
1016 ppd = dd->pport + pidx;
1018 ppd->linkup = 0;
1019 if (ppd->statusp)
1020 *ppd->statusp &= ~(HFI1_STATUS_IB_CONF |
1030 ppd = dd->pport + pidx;
1055 ppd = dd->pport + pidx;
1063 shutdown_led_override(ppd);
1069 hfi1_quiet_serdes(ppd);
1070 if (ppd->hfi1_wq)
1071 flush_workqueue(ppd->hfi1_wq);
1072 if (ppd->link_wq)
1073 flush_workqueue(ppd->link_wq);
1323 struct hfi1_pportdata *ppd;
1325 ppd = dd->pport + pidx;
1327 set_link_state(ppd, HLS_DN_DISABLE);
1329 if (ppd->statusp)
1330 *ppd->statusp &= ~HFI1_STATUS_IB_READY;
1488 struct hfi1_pportdata *ppd = &dd->pport[pidx];
1492 if (ppd->statusp)
1493 *ppd->statusp &= ~HFI1_STATUS_CHIP_PRESENT;
1496 hrtimer_cancel(&ppd->cca_timer[i].hrtimer);
1498 spin_lock(&ppd->cc_state_lock);
1499 cc_state = get_cc_state_protected(ppd);
1500 RCU_INIT_POINTER(ppd->cc_state, NULL);
1501 spin_unlock(&ppd->cc_state_lock);
1561 struct hfi1_pportdata *ppd;
1667 ppd = dd->pport + pidx;
1668 if (ppd->hfi1_wq) {
1669 destroy_workqueue(ppd->hfi1_wq);
1670 ppd->hfi1_wq = NULL;
1672 if (ppd->link_wq) {
1673 destroy_workqueue(ppd->link_wq);
1674 ppd->link_wq = NULL;