Lines Matching refs:cpspec
790 if (!ppd->cpspec->kpregbase || !(ppd->dd->flags & QIB_PRESENT)) in qib_read_kreg_port()
792 return readq(&ppd->cpspec->kpregbase[regno]); in qib_read_kreg_port()
798 if (ppd->cpspec && ppd->dd && ppd->cpspec->kpregbase && in qib_write_kreg_port()
800 writeq(value, &ppd->cpspec->kpregbase[regno]); in qib_write_kreg_port()
838 if (ppd->cpspec && ppd->cpspec->cpregbase && in write_7322_creg_port()
840 writeq(value, &ppd->cpspec->cpregbase[regno]); in write_7322_creg_port()
846 if (!ppd->cpspec || !ppd->cpspec->cpregbase || in read_7322_creg_port()
849 return readq(&ppd->cpspec->cpregbase[regno]); in read_7322_creg_port()
855 if (!ppd->cpspec || !ppd->cpspec->cpregbase || in read_7322_creg32_port()
858 return readl(&ppd->cpspec->cpregbase[regno]); in read_7322_creg32_port()
1674 ppd->cpspec->chase_timer.expires = 0; in reenable_chase()
1682 ppd->cpspec->chase_end = 0; in disable_chase()
1689 ppd->cpspec->chase_timer.expires = jiffies + QIB_CHASE_DIS_TIME; in disable_chase()
1690 add_timer(&ppd->cpspec->chase_timer); in disable_chase()
1712 if (ppd->cpspec->chase_end && in handle_serdes_issues()
1713 time_after(tnow, ppd->cpspec->chase_end)) in handle_serdes_issues()
1715 else if (!ppd->cpspec->chase_end) in handle_serdes_issues()
1716 ppd->cpspec->chase_end = tnow + QIB_CHASE_TIME; in handle_serdes_issues()
1719 ppd->cpspec->chase_end = 0; in handle_serdes_issues()
1728 ppd->cpspec->qdr_reforce = 1; in handle_serdes_issues()
1731 } else if (ppd->cpspec->qdr_reforce && in handle_serdes_issues()
1759 if (!ppd->cpspec->qdr_dfe_on && in handle_serdes_issues()
1761 ppd->cpspec->qdr_dfe_on = 1; in handle_serdes_issues()
1762 ppd->cpspec->qdr_dfe_time = 0; in handle_serdes_issues()
1803 msg = ppd->cpspec->epmsgbuf; in handle_7322_p_errors()
1807 err_decode(msg, sizeof ppd->cpspec->epmsgbuf, in handle_7322_p_errors()
1810 snprintf(msg, sizeof ppd->cpspec->epmsgbuf, in handle_7322_p_errors()
1824 err_decode(msg, sizeof ppd->cpspec->epmsgbuf, symptom, in handle_7322_p_errors()
1840 err_decode(msg, sizeof ppd->cpspec->epmsgbuf, in handle_7322_p_errors()
1856 err_decode(msg, sizeof ppd->cpspec->epmsgbuf, errs, in handle_7322_p_errors()
1887 if (!(ppd->cpspec->ibcctrl_a & in handle_7322_p_errors()
1894 ppd->cpspec->ibcctrl_a |= in handle_7322_p_errors()
1897 ppd->cpspec->ibcctrl_a); in handle_7322_p_errors()
2191 ppd->cpspec->ibcctrl_a &= in qib_set_ib_7322_lstate()
2198 qib_write_kreg_port(ppd, krp_ibcctrl_a, ppd->cpspec->ibcctrl_a | in qib_set_ib_7322_lstate()
2256 ppd->cpspec->ibcctrl_a = (ppd->cpspec->ibcctrl_a & in set_vls()
2259 qib_write_kreg_port(ppd, krp_ibcctrl_a, ppd->cpspec->ibcctrl_a); in set_vls()
2286 ppd->cpspec->ibcctrl_a &= ~SYM_MASK(IBCCtrlA_0, IBLinkEn); in qib_7322_bringup_serdes()
2287 qib_write_kreg_port(ppd, krp_ibcctrl_a, ppd->cpspec->ibcctrl_a); in qib_7322_bringup_serdes()
2291 ppd->cpspec->ibdeltainprog = 1; in qib_7322_bringup_serdes()
2292 ppd->cpspec->ibsymsnap = read_7322_creg32_port(ppd, in qib_7322_bringup_serdes()
2294 ppd->cpspec->iblnkerrsnap = read_7322_creg32_port(ppd, in qib_7322_bringup_serdes()
2316 ppd->cpspec->ibcctrl_a = ibc; /* without linkcmd or linkinitcmd! */ in qib_7322_bringup_serdes()
2324 if (!ppd->cpspec->ibcctrl_b) { in qib_7322_bringup_serdes()
2331 ppd->cpspec->ibcctrl_b = qib_read_kreg_port(ppd, in qib_7322_bringup_serdes()
2333 ppd->cpspec->ibcctrl_b &= ~(IBA7322_IBC_SPEED_QDR | in qib_7322_bringup_serdes()
2339 ppd->cpspec->ibcctrl_b |= in qib_7322_bringup_serdes()
2344 ppd->cpspec->ibcctrl_b |= (lse == QIB_IB_QDR) ? in qib_7322_bringup_serdes()
2352 ppd->cpspec->ibcctrl_b |= IBA7322_IBC_WIDTH_AUTONEG; in qib_7322_bringup_serdes()
2354 ppd->cpspec->ibcctrl_b |= in qib_7322_bringup_serdes()
2360 ppd->cpspec->ibcctrl_b |= (IBA7322_IBC_RXPOL_MASK | in qib_7322_bringup_serdes()
2363 qib_write_kreg_port(ppd, krp_ibcctrl_b, ppd->cpspec->ibcctrl_b); in qib_7322_bringup_serdes()
2385 ppd->cpspec->ibcctrl_a |= SYM_MASK(IBCCtrlA_0, IBLinkEn); in qib_7322_bringup_serdes()
2389 val = ppd->cpspec->ibcctrl_a | (QLOGIC_IB_IBCC_LINKINITCMD_DISABLE << in qib_7322_bringup_serdes()
2394 ppd->cpspec->ibcctrl_a = val & ~SYM_MASK(IBCCtrlA_0, LinkInitCmd); in qib_7322_bringup_serdes()
2426 wake_up(&ppd->cpspec->autoneg_wait); in qib_7322_mini_quiet_serdes()
2427 cancel_delayed_work_sync(&ppd->cpspec->autoneg_work); in qib_7322_mini_quiet_serdes()
2429 cancel_delayed_work_sync(&ppd->cpspec->ipg_work); in qib_7322_mini_quiet_serdes()
2431 ppd->cpspec->chase_end = 0; in qib_7322_mini_quiet_serdes()
2432 if (ppd->cpspec->chase_timer.data) /* if initted */ in qib_7322_mini_quiet_serdes()
2433 del_timer_sync(&ppd->cpspec->chase_timer); in qib_7322_mini_quiet_serdes()
2442 ppd->cpspec->ibcctrl_a &= ~SYM_MASK(IBCCtrlA_0, IBLinkEn); in qib_7322_mini_quiet_serdes()
2449 if (ppd->cpspec->ibsymdelta || ppd->cpspec->iblnkerrdelta || in qib_7322_mini_quiet_serdes()
2450 ppd->cpspec->ibdeltainprog || ppd->cpspec->iblnkdowndelta) { in qib_7322_mini_quiet_serdes()
2459 if (ppd->cpspec->ibsymdelta || ppd->cpspec->ibdeltainprog) { in qib_7322_mini_quiet_serdes()
2461 if (ppd->cpspec->ibdeltainprog) in qib_7322_mini_quiet_serdes()
2462 val -= val - ppd->cpspec->ibsymsnap; in qib_7322_mini_quiet_serdes()
2463 val -= ppd->cpspec->ibsymdelta; in qib_7322_mini_quiet_serdes()
2466 if (ppd->cpspec->iblnkerrdelta || ppd->cpspec->ibdeltainprog) { in qib_7322_mini_quiet_serdes()
2468 if (ppd->cpspec->ibdeltainprog) in qib_7322_mini_quiet_serdes()
2469 val -= val - ppd->cpspec->iblnkerrsnap; in qib_7322_mini_quiet_serdes()
2470 val -= ppd->cpspec->iblnkerrdelta; in qib_7322_mini_quiet_serdes()
2473 if (ppd->cpspec->iblnkdowndelta) { in qib_7322_mini_quiet_serdes()
2475 val += ppd->cpspec->iblnkdowndelta; in qib_7322_mini_quiet_serdes()
2616 kfree(dd->pport[i].cpspec->portcntrs); in qib_setup_7322_cleanup()
2622 qib_qsfp_deinit(&dd->pport[i].cpspec->qsfp_data); in qib_setup_7322_cleanup()
2723 qd = &ppd->cpspec->qsfp_data; in unknown_7322_gpio_intr()
3380 dd->pport->cpspec->ibdeltainprog = 0; in qib_do_7322_reset()
3381 dd->pport->cpspec->ibsymdelta = 0; in qib_do_7322_reset()
3382 dd->pport->cpspec->iblnkerrdelta = 0; in qib_do_7322_reset()
3383 dd->pport->cpspec->ibmalfdelta = 0; in qib_do_7322_reset()
3721 ret = SYM_FIELD(ppd->cpspec->ibcctrl_a, IBCCtrlA_0, in qib_7322_get_ib_cfg()
3726 ret = SYM_FIELD(ppd->cpspec->ibcctrl_a, IBCCtrlA_0, in qib_7322_get_ib_cfg()
3732 ret = (ppd->cpspec->ibcctrl_a & in qib_7322_get_ib_cfg()
3759 ret = (int)((ppd->cpspec->ibcctrl_b >> lsb) & maskr); in qib_7322_get_ib_cfg()
3850 maskr = SYM_FIELD(ppd->cpspec->ibcctrl_a, IBCCtrlA_0, in qib_7322_set_ib_cfg()
3853 ppd->cpspec->ibcctrl_a &= in qib_7322_set_ib_cfg()
3855 ppd->cpspec->ibcctrl_a |= (u64) val << in qib_7322_set_ib_cfg()
3858 ppd->cpspec->ibcctrl_a); in qib_7322_set_ib_cfg()
3864 maskr = SYM_FIELD(ppd->cpspec->ibcctrl_a, IBCCtrlA_0, in qib_7322_set_ib_cfg()
3867 ppd->cpspec->ibcctrl_a &= in qib_7322_set_ib_cfg()
3869 ppd->cpspec->ibcctrl_a |= (u64) val << in qib_7322_set_ib_cfg()
3872 ppd->cpspec->ibcctrl_a); in qib_7322_set_ib_cfg()
3887 ppd->cpspec->ibcctrl_a &= in qib_7322_set_ib_cfg()
3890 ppd->cpspec->ibcctrl_a |= in qib_7322_set_ib_cfg()
3892 qib_write_kreg_port(ppd, krp_ibcctrl_a, ppd->cpspec->ibcctrl_a); in qib_7322_set_ib_cfg()
3905 ppd->cpspec->ibcctrl_a &= ~SYM_MASK(IBCCtrlA_0, MaxPktLen); in qib_7322_set_ib_cfg()
3906 ppd->cpspec->ibcctrl_a |= (u64)val << in qib_7322_set_ib_cfg()
3909 ppd->cpspec->ibcctrl_a); in qib_7322_set_ib_cfg()
3917 ppd->cpspec->ibmalfusesnap = 1; in qib_7322_set_ib_cfg()
3918 ppd->cpspec->ibmalfsnap = read_7322_creg32_port(ppd, in qib_7322_set_ib_cfg()
3920 if (!ppd->cpspec->ibdeltainprog && in qib_7322_set_ib_cfg()
3922 ppd->cpspec->ibdeltainprog = 1; in qib_7322_set_ib_cfg()
3923 ppd->cpspec->ibsymsnap = in qib_7322_set_ib_cfg()
3926 ppd->cpspec->iblnkerrsnap = in qib_7322_set_ib_cfg()
3934 if (ppd->cpspec->ibmalfusesnap) { in qib_7322_set_ib_cfg()
3935 ppd->cpspec->ibmalfusesnap = 0; in qib_7322_set_ib_cfg()
3936 ppd->cpspec->ibmalfdelta += in qib_7322_set_ib_cfg()
3939 ppd->cpspec->ibmalfsnap; in qib_7322_set_ib_cfg()
3967 ppd->cpspec->chase_end = 0; in qib_7322_set_ib_cfg()
3972 if (ppd->cpspec->chase_timer.expires) { in qib_7322_set_ib_cfg()
3973 del_timer_sync(&ppd->cpspec->chase_timer); in qib_7322_set_ib_cfg()
3974 ppd->cpspec->chase_timer.expires = 0; in qib_7322_set_ib_cfg()
4010 cancel_delayed_work(&ppd->cpspec->ipg_work); in qib_7322_set_ib_cfg()
4011 ppd->cpspec->ipg_tries = 0; in qib_7322_set_ib_cfg()
4019 ppd->cpspec->ibcctrl_b &= ~(maskr << lsb); in qib_7322_set_ib_cfg()
4020 ppd->cpspec->ibcctrl_b |= (((u64) val & maskr) << lsb); in qib_7322_set_ib_cfg()
4021 qib_write_kreg_port(ppd, krp_ibcctrl_b, ppd->cpspec->ibcctrl_b); in qib_7322_set_ib_cfg()
4034 ppd->cpspec->ibcctrl_a |= SYM_MASK(IBCCtrlA_0, in qib_7322_set_loopback()
4040 ppd->cpspec->ibcctrl_a &= ~SYM_MASK(IBCCtrlA_0, in qib_7322_set_loopback()
4051 ppd->cpspec->ibcctrl_a); in qib_7322_set_loopback()
4052 ctrlb = ppd->cpspec->ibcctrl_b & ~(IBA7322_IBC_HRTBT_MASK in qib_7322_set_loopback()
4054 ppd->cpspec->ibcctrl_b = ctrlb | val; in qib_7322_set_loopback()
4056 ppd->cpspec->ibcctrl_b); in qib_7322_set_loopback()
4531 if (ppd->cpspec->ibdeltainprog) in qib_portcntr_7322()
4532 ret -= ret - ppd->cpspec->ibsymsnap; in qib_portcntr_7322()
4533 ret -= ppd->cpspec->ibsymdelta; in qib_portcntr_7322()
4535 if (ppd->cpspec->ibdeltainprog) in qib_portcntr_7322()
4536 ret -= ret - ppd->cpspec->iblnkerrsnap; in qib_portcntr_7322()
4537 ret -= ppd->cpspec->iblnkerrdelta; in qib_portcntr_7322()
4539 ret -= ppd->cpspec->ibmalfdelta; in qib_portcntr_7322()
4541 ret += ppd->cpspec->iblnkdowndelta; in qib_portcntr_7322()
4727 dd->pport[i].cpspec->portcntrs = kmalloc(dd->cspec->nportcntrs in init_7322_cntrnames()
4729 if (!dd->pport[i].cpspec->portcntrs) in init_7322_cntrnames()
4783 u64 *cntr = ppd->cpspec->portcntrs; in qib_read_7322portcntrs()
4855 if (ppd->cpspec->qdr_dfe_on && (ppd->link_speed_active & in qib_get_7322_faststats()
4859 ppd->cpspec->qdr_dfe_time && in qib_get_7322_faststats()
4860 time_is_before_jiffies(ppd->cpspec->qdr_dfe_time)) { in qib_get_7322_faststats()
4861 ppd->cpspec->qdr_dfe_on = 0; in qib_get_7322_faststats()
4910 ppd->cpspec->ibcctrl_a & in qib_7322_mini_pcs_reset()
4916 qib_write_kreg_port(ppd, krp_ibcctrl_a, ppd->cpspec->ibcctrl_a); in qib_7322_mini_pcs_reset()
5031 newctrlb = ppd->cpspec->ibcctrl_b & ~(IBA7322_IBC_SPEED_MASK | in set_7322_ibspeed_fast()
5045 if (newctrlb == ppd->cpspec->ibcctrl_b) in set_7322_ibspeed_fast()
5048 ppd->cpspec->ibcctrl_b = newctrlb; in set_7322_ibspeed_fast()
5049 qib_write_kreg_port(ppd, krp_ibcctrl_b, ppd->cpspec->ibcctrl_b); in set_7322_ibspeed_fast()
5070 queue_delayed_work(ib_wq, &ppd->cpspec->autoneg_work, in try_7322_autoneg()
5109 if (wait_event_timeout(ppd->cpspec->autoneg_wait, in autoneg_7322_work()
5116 if (wait_event_timeout(ppd->cpspec->autoneg_wait, in autoneg_7322_work()
5128 wait_event_timeout(ppd->cpspec->autoneg_wait, in autoneg_7322_work()
5135 if (ppd->cpspec->autoneg_tries == AUTONEG_TRIES) { in autoneg_7322_work()
5137 ppd->cpspec->autoneg_tries = 0; in autoneg_7322_work()
5196 delay = 2 << ppd->cpspec->ipg_tries; in try_7322_ipg()
5197 queue_delayed_work(ib_wq, &ppd->cpspec->ipg_work, in try_7322_ipg()
5212 && ++ppd->cpspec->ipg_tries <= 10) in ipg_7322_work()
5280 ppd->cpspec->ipg_tries = 0; in qib_7322_ib_updown()
5291 &ppd->cpspec->qsfp_data; in qib_7322_ib_updown()
5312 if (clr == ppd->cpspec->iblnkdownsnap) in qib_7322_ib_updown()
5313 ppd->cpspec->iblnkdowndelta++; in qib_7322_ib_updown()
5320 && ppd->cpspec->autoneg_tries < AUTONEG_TRIES) { in qib_7322_ib_updown()
5322 ++ppd->cpspec->autoneg_tries; in qib_7322_ib_updown()
5323 if (!ppd->cpspec->ibdeltainprog) { in qib_7322_ib_updown()
5324 ppd->cpspec->ibdeltainprog = 1; in qib_7322_ib_updown()
5325 ppd->cpspec->ibsymdelta += in qib_7322_ib_updown()
5328 ppd->cpspec->ibsymsnap; in qib_7322_ib_updown()
5329 ppd->cpspec->iblnkerrdelta += in qib_7322_ib_updown()
5332 ppd->cpspec->iblnkerrsnap; in qib_7322_ib_updown()
5349 ppd->cpspec->autoneg_tries = 0; in qib_7322_ib_updown()
5352 wake_up(&ppd->cpspec->autoneg_wait); in qib_7322_ib_updown()
5364 ppd->cpspec->ibcctrl_b |= IBA7322_IBC_IBTA_1_2_MASK; in qib_7322_ib_updown()
5369 if (ppd->dd->cspec->r1 && ppd->cpspec->ipg_tries <= 10) in qib_7322_ib_updown()
5371 if (!ppd->cpspec->recovery_init) in qib_7322_ib_updown()
5373 ppd->cpspec->qdr_dfe_time = jiffies + in qib_7322_ib_updown()
5376 ppd->cpspec->ibmalfusesnap = 0; in qib_7322_ib_updown()
5377 ppd->cpspec->ibmalfsnap = read_7322_creg32_port(ppd, in qib_7322_ib_updown()
5381 ppd->cpspec->iblnkdownsnap = in qib_7322_ib_updown()
5383 if (ppd->cpspec->ibdeltainprog) { in qib_7322_ib_updown()
5384 ppd->cpspec->ibdeltainprog = 0; in qib_7322_ib_updown()
5385 ppd->cpspec->ibsymdelta += read_7322_creg32_port(ppd, in qib_7322_ib_updown()
5386 crp_ibsymbolerr) - ppd->cpspec->ibsymsnap; in qib_7322_ib_updown()
5387 ppd->cpspec->iblnkerrdelta += read_7322_creg32_port(ppd, in qib_7322_ib_updown()
5388 crp_iblinkerrrecov) - ppd->cpspec->iblnkerrsnap; in qib_7322_ib_updown()
5391 !ppd->cpspec->ibdeltainprog && in qib_7322_ib_updown()
5393 ppd->cpspec->ibdeltainprog = 1; in qib_7322_ib_updown()
5394 ppd->cpspec->ibsymsnap = read_7322_creg32_port(ppd, in qib_7322_ib_updown()
5396 ppd->cpspec->iblnkerrsnap = read_7322_creg32_port(ppd, in qib_7322_ib_updown()
5526 dd->pport[0].cpspec->kpregbase = in qib_7322_set_baseaddrs()
5528 dd->pport[1].cpspec->kpregbase = in qib_7322_set_baseaddrs()
5531 dd->pport[0].cpspec->cpregbase = in qib_7322_set_baseaddrs()
5534 dd->pport[1].cpspec->cpregbase = in qib_7322_set_baseaddrs()
5573 if (!ppd->cpspec->kpregbase) in sendctrl_hook()
5576 psptr = ppd->cpspec->kpregbase + krp_sendctrl; in sendctrl_hook()
5668 ppd->cpspec->qsfp_data.modpresent = 0; in qsfp_7322_event()
5717 if (!ppd->cpspec->qsfp_data.modpresent && in qsfp_7322_event()
5719 ppd->cpspec->qsfp_data.modpresent = 1; in qsfp_7322_event()
5736 struct qib_qsfp_data *qd = &ppd->cpspec->qsfp_data; in qib_init_7322_qsfp()
5777 dd->pport[pidx].cpspec->no_eep = deflt; in set_no_qsfp_atten()
5824 ppd->cpspec->no_eep = val; in set_no_qsfp_atten()
5826 ppd->cpspec->h1_val = h1; in set_no_qsfp_atten()
6096 ppd[0].cpspec = (struct qib_chippport_specific *)(dd->cspec + 1); in qib_init_7322_variables()
6097 ppd[1].cpspec = &ppd[0].cpspec[1]; in qib_init_7322_variables()
6098 ppd[0].cpspec->ppd = &ppd[0]; /* for autoneg_7322_work() */ in qib_init_7322_variables()
6099 ppd[1].cpspec->ppd = &ppd[1]; /* for autoneg_7322_work() */ in qib_init_7322_variables()
6177 struct qib_chippport_specific *cp = ppd->cpspec; in qib_init_7322_variables()
6283 ppd->cpspec->no_eep = IS_QMH(dd) ? in qib_init_7322_variables()
7235 struct qib_qsfp_cache *qd = &ppd->cpspec->qsfp_data.cache; in find_best_ent()
7267 } else if (ppd->cpspec->no_eep < TXDDS_TABLE_SZ) { in find_best_ent()
7274 idx = ppd->cpspec->no_eep; in find_best_ent()
7278 } else if (ppd->cpspec->no_eep < (TXDDS_TABLE_SZ + TXDDS_EXTRA_SZ)) { in find_best_ent()
7280 idx = ppd->cpspec->no_eep - TXDDS_TABLE_SZ; in find_best_ent()
7285 ppd->cpspec->no_eep < (TXDDS_TABLE_SZ + TXDDS_EXTRA_SZ + in find_best_ent()
7287 idx = ppd->cpspec->no_eep - (TXDDS_TABLE_SZ + TXDDS_EXTRA_SZ); in find_best_ent()
7544 ppd->cpspec->qdr_dfe_on = 1; in serdes_7322_init_old()
7735 ppd->cpspec->qdr_dfe_on = 1; in serdes_7322_init_new()
7847 ppd->cpspec->qdr_reforce = 0; in force_h1()
7853 set_man_code(ppd, chan, ppd->cpspec->h1_val); in force_h1()
8051 ppd->cpspec->recovery_init = 1; in setup_7322_link_recovery()
8109 ppd->cpspec->ibcctrl_a &= in check_7322_rxe_status()
8112 ppd->cpspec->ibcctrl_a); in check_7322_rxe_status()