Lines Matching refs:cpspec
873 if (!ppd->cpspec->kpregbase || !(ppd->dd->flags & QIB_PRESENT)) in qib_read_kreg_port()
875 return readq(&ppd->cpspec->kpregbase[regno]); in qib_read_kreg_port()
881 if (ppd->cpspec && ppd->dd && ppd->cpspec->kpregbase && in qib_write_kreg_port()
883 writeq(value, &ppd->cpspec->kpregbase[regno]); in qib_write_kreg_port()
921 if (ppd->cpspec && ppd->cpspec->cpregbase && in write_7322_creg_port()
923 writeq(value, &ppd->cpspec->cpregbase[regno]); in write_7322_creg_port()
929 if (!ppd->cpspec || !ppd->cpspec->cpregbase || in read_7322_creg_port()
932 return readq(&ppd->cpspec->cpregbase[regno]); in read_7322_creg_port()
938 if (!ppd->cpspec || !ppd->cpspec->cpregbase || in read_7322_creg32_port()
941 return readl(&ppd->cpspec->cpregbase[regno]); in read_7322_creg32_port()
1592 err_decode(ppd->cpspec->sdmamsgbuf, sizeof(ppd->cpspec->sdmamsgbuf), in sdma_7322_p_errors()
1606 errs, ppd->cpspec->sdmamsgbuf); in sdma_7322_p_errors()
1749 ppd->cpspec->chase_timer.expires = 0; in reenable_chase()
1757 ppd->cpspec->chase_end = 0; in disable_chase()
1764 ppd->cpspec->chase_timer.expires = jiffies + QIB_CHASE_DIS_TIME; in disable_chase()
1765 add_timer(&ppd->cpspec->chase_timer); in disable_chase()
1787 if (ppd->cpspec->chase_end && in handle_serdes_issues()
1788 time_after(tnow, ppd->cpspec->chase_end)) in handle_serdes_issues()
1790 else if (!ppd->cpspec->chase_end) in handle_serdes_issues()
1791 ppd->cpspec->chase_end = tnow + QIB_CHASE_TIME; in handle_serdes_issues()
1794 ppd->cpspec->chase_end = 0; in handle_serdes_issues()
1803 ppd->cpspec->qdr_reforce = 1; in handle_serdes_issues()
1806 } else if (ppd->cpspec->qdr_reforce && in handle_serdes_issues()
1834 if (!ppd->cpspec->qdr_dfe_on && in handle_serdes_issues()
1836 ppd->cpspec->qdr_dfe_on = 1; in handle_serdes_issues()
1837 ppd->cpspec->qdr_dfe_time = 0; in handle_serdes_issues()
1878 msg = ppd->cpspec->epmsgbuf; in handle_7322_p_errors()
1882 err_decode(msg, sizeof(ppd->cpspec->epmsgbuf), in handle_7322_p_errors()
1885 snprintf(msg, sizeof(ppd->cpspec->epmsgbuf), in handle_7322_p_errors()
1899 err_decode(msg, sizeof(ppd->cpspec->epmsgbuf), symptom, in handle_7322_p_errors()
1915 err_decode(msg, sizeof(ppd->cpspec->epmsgbuf), in handle_7322_p_errors()
1931 err_decode(msg, sizeof(ppd->cpspec->epmsgbuf), errs, in handle_7322_p_errors()
1962 if (!(ppd->cpspec->ibcctrl_a & in handle_7322_p_errors()
1969 ppd->cpspec->ibcctrl_a |= in handle_7322_p_errors()
1972 ppd->cpspec->ibcctrl_a); in handle_7322_p_errors()
2291 ppd->cpspec->ibcctrl_a &= in qib_set_ib_7322_lstate()
2298 qib_write_kreg_port(ppd, krp_ibcctrl_a, ppd->cpspec->ibcctrl_a | in qib_set_ib_7322_lstate()
2356 ppd->cpspec->ibcctrl_a = (ppd->cpspec->ibcctrl_a & in set_vls()
2359 qib_write_kreg_port(ppd, krp_ibcctrl_a, ppd->cpspec->ibcctrl_a); in set_vls()
2385 ppd->cpspec->ibcctrl_a &= ~SYM_MASK(IBCCtrlA_0, IBLinkEn); in qib_7322_bringup_serdes()
2386 qib_write_kreg_port(ppd, krp_ibcctrl_a, ppd->cpspec->ibcctrl_a); in qib_7322_bringup_serdes()
2395 ppd->cpspec->ibdeltainprog = 1; in qib_7322_bringup_serdes()
2396 ppd->cpspec->ibsymsnap = read_7322_creg32_port(ppd, in qib_7322_bringup_serdes()
2398 ppd->cpspec->iblnkerrsnap = read_7322_creg32_port(ppd, in qib_7322_bringup_serdes()
2420 ppd->cpspec->ibcctrl_a = ibc; /* without linkcmd or linkinitcmd! */ in qib_7322_bringup_serdes()
2428 if (!ppd->cpspec->ibcctrl_b) { in qib_7322_bringup_serdes()
2435 ppd->cpspec->ibcctrl_b = qib_read_kreg_port(ppd, in qib_7322_bringup_serdes()
2437 ppd->cpspec->ibcctrl_b &= ~(IBA7322_IBC_SPEED_QDR | in qib_7322_bringup_serdes()
2443 ppd->cpspec->ibcctrl_b |= in qib_7322_bringup_serdes()
2448 ppd->cpspec->ibcctrl_b |= (lse == QIB_IB_QDR) ? in qib_7322_bringup_serdes()
2456 ppd->cpspec->ibcctrl_b |= IBA7322_IBC_WIDTH_AUTONEG; in qib_7322_bringup_serdes()
2458 ppd->cpspec->ibcctrl_b |= in qib_7322_bringup_serdes()
2464 ppd->cpspec->ibcctrl_b |= (IBA7322_IBC_RXPOL_MASK | in qib_7322_bringup_serdes()
2467 qib_write_kreg_port(ppd, krp_ibcctrl_b, ppd->cpspec->ibcctrl_b); in qib_7322_bringup_serdes()
2489 ppd->cpspec->ibcctrl_a |= SYM_MASK(IBCCtrlA_0, IBLinkEn); in qib_7322_bringup_serdes()
2493 val = ppd->cpspec->ibcctrl_a | (QLOGIC_IB_IBCC_LINKINITCMD_DISABLE << in qib_7322_bringup_serdes()
2498 ppd->cpspec->ibcctrl_a = val & ~SYM_MASK(IBCCtrlA_0, LinkInitCmd); in qib_7322_bringup_serdes()
2530 wake_up(&ppd->cpspec->autoneg_wait); in qib_7322_mini_quiet_serdes()
2531 cancel_delayed_work_sync(&ppd->cpspec->autoneg_work); in qib_7322_mini_quiet_serdes()
2533 cancel_delayed_work_sync(&ppd->cpspec->ipg_work); in qib_7322_mini_quiet_serdes()
2535 ppd->cpspec->chase_end = 0; in qib_7322_mini_quiet_serdes()
2536 if (ppd->cpspec->chase_timer.function) /* if initted */ in qib_7322_mini_quiet_serdes()
2537 del_timer_sync(&ppd->cpspec->chase_timer); in qib_7322_mini_quiet_serdes()
2546 ppd->cpspec->ibcctrl_a &= ~SYM_MASK(IBCCtrlA_0, IBLinkEn); in qib_7322_mini_quiet_serdes()
2553 if (ppd->cpspec->ibsymdelta || ppd->cpspec->iblnkerrdelta || in qib_7322_mini_quiet_serdes()
2554 ppd->cpspec->ibdeltainprog || ppd->cpspec->iblnkdowndelta) { in qib_7322_mini_quiet_serdes()
2563 if (ppd->cpspec->ibsymdelta || ppd->cpspec->ibdeltainprog) { in qib_7322_mini_quiet_serdes()
2565 if (ppd->cpspec->ibdeltainprog) in qib_7322_mini_quiet_serdes()
2566 val -= val - ppd->cpspec->ibsymsnap; in qib_7322_mini_quiet_serdes()
2567 val -= ppd->cpspec->ibsymdelta; in qib_7322_mini_quiet_serdes()
2570 if (ppd->cpspec->iblnkerrdelta || ppd->cpspec->ibdeltainprog) { in qib_7322_mini_quiet_serdes()
2572 if (ppd->cpspec->ibdeltainprog) in qib_7322_mini_quiet_serdes()
2573 val -= val - ppd->cpspec->iblnkerrsnap; in qib_7322_mini_quiet_serdes()
2574 val -= ppd->cpspec->iblnkerrdelta; in qib_7322_mini_quiet_serdes()
2577 if (ppd->cpspec->iblnkdowndelta) { in qib_7322_mini_quiet_serdes()
2579 val += ppd->cpspec->iblnkdowndelta; in qib_7322_mini_quiet_serdes()
2884 kfree(dd->pport[i].cpspec->portcntrs); in qib_setup_7322_cleanup()
2990 qd = &ppd->cpspec->qsfp_data; in unknown_7322_gpio_intr()
3674 dd->pport->cpspec->ibdeltainprog = 0; in qib_do_7322_reset()
3675 dd->pport->cpspec->ibsymdelta = 0; in qib_do_7322_reset()
3676 dd->pport->cpspec->iblnkerrdelta = 0; in qib_do_7322_reset()
3677 dd->pport->cpspec->ibmalfdelta = 0; in qib_do_7322_reset()
4013 ret = SYM_FIELD(ppd->cpspec->ibcctrl_a, IBCCtrlA_0, in qib_7322_get_ib_cfg()
4018 ret = SYM_FIELD(ppd->cpspec->ibcctrl_a, IBCCtrlA_0, in qib_7322_get_ib_cfg()
4024 ret = (ppd->cpspec->ibcctrl_a & in qib_7322_get_ib_cfg()
4051 ret = (int)((ppd->cpspec->ibcctrl_b >> lsb) & maskr); in qib_7322_get_ib_cfg()
4142 maskr = SYM_FIELD(ppd->cpspec->ibcctrl_a, IBCCtrlA_0, in qib_7322_set_ib_cfg()
4145 ppd->cpspec->ibcctrl_a &= in qib_7322_set_ib_cfg()
4147 ppd->cpspec->ibcctrl_a |= (u64) val << in qib_7322_set_ib_cfg()
4150 ppd->cpspec->ibcctrl_a); in qib_7322_set_ib_cfg()
4156 maskr = SYM_FIELD(ppd->cpspec->ibcctrl_a, IBCCtrlA_0, in qib_7322_set_ib_cfg()
4159 ppd->cpspec->ibcctrl_a &= in qib_7322_set_ib_cfg()
4161 ppd->cpspec->ibcctrl_a |= (u64) val << in qib_7322_set_ib_cfg()
4164 ppd->cpspec->ibcctrl_a); in qib_7322_set_ib_cfg()
4179 ppd->cpspec->ibcctrl_a &= in qib_7322_set_ib_cfg()
4182 ppd->cpspec->ibcctrl_a |= in qib_7322_set_ib_cfg()
4184 qib_write_kreg_port(ppd, krp_ibcctrl_a, ppd->cpspec->ibcctrl_a); in qib_7322_set_ib_cfg()
4197 ppd->cpspec->ibcctrl_a &= ~SYM_MASK(IBCCtrlA_0, MaxPktLen); in qib_7322_set_ib_cfg()
4198 ppd->cpspec->ibcctrl_a |= (u64)val << in qib_7322_set_ib_cfg()
4201 ppd->cpspec->ibcctrl_a); in qib_7322_set_ib_cfg()
4209 ppd->cpspec->ibmalfusesnap = 1; in qib_7322_set_ib_cfg()
4210 ppd->cpspec->ibmalfsnap = read_7322_creg32_port(ppd, in qib_7322_set_ib_cfg()
4212 if (!ppd->cpspec->ibdeltainprog && in qib_7322_set_ib_cfg()
4214 ppd->cpspec->ibdeltainprog = 1; in qib_7322_set_ib_cfg()
4215 ppd->cpspec->ibsymsnap = in qib_7322_set_ib_cfg()
4218 ppd->cpspec->iblnkerrsnap = in qib_7322_set_ib_cfg()
4226 if (ppd->cpspec->ibmalfusesnap) { in qib_7322_set_ib_cfg()
4227 ppd->cpspec->ibmalfusesnap = 0; in qib_7322_set_ib_cfg()
4228 ppd->cpspec->ibmalfdelta += in qib_7322_set_ib_cfg()
4231 ppd->cpspec->ibmalfsnap; in qib_7322_set_ib_cfg()
4259 ppd->cpspec->chase_end = 0; in qib_7322_set_ib_cfg()
4264 if (ppd->cpspec->chase_timer.expires) { in qib_7322_set_ib_cfg()
4265 del_timer_sync(&ppd->cpspec->chase_timer); in qib_7322_set_ib_cfg()
4266 ppd->cpspec->chase_timer.expires = 0; in qib_7322_set_ib_cfg()
4302 cancel_delayed_work(&ppd->cpspec->ipg_work); in qib_7322_set_ib_cfg()
4303 ppd->cpspec->ipg_tries = 0; in qib_7322_set_ib_cfg()
4311 ppd->cpspec->ibcctrl_b &= ~(maskr << lsb); in qib_7322_set_ib_cfg()
4312 ppd->cpspec->ibcctrl_b |= (((u64) val & maskr) << lsb); in qib_7322_set_ib_cfg()
4313 qib_write_kreg_port(ppd, krp_ibcctrl_b, ppd->cpspec->ibcctrl_b); in qib_7322_set_ib_cfg()
4326 ppd->cpspec->ibcctrl_a |= SYM_MASK(IBCCtrlA_0, in qib_7322_set_loopback()
4332 ppd->cpspec->ibcctrl_a &= ~SYM_MASK(IBCCtrlA_0, in qib_7322_set_loopback()
4343 ppd->cpspec->ibcctrl_a); in qib_7322_set_loopback()
4344 ctrlb = ppd->cpspec->ibcctrl_b & ~(IBA7322_IBC_HRTBT_MASK in qib_7322_set_loopback()
4346 ppd->cpspec->ibcctrl_b = ctrlb | val; in qib_7322_set_loopback()
4348 ppd->cpspec->ibcctrl_b); in qib_7322_set_loopback()
4821 if (ppd->cpspec->ibdeltainprog) in qib_portcntr_7322()
4822 ret -= ret - ppd->cpspec->ibsymsnap; in qib_portcntr_7322()
4823 ret -= ppd->cpspec->ibsymdelta; in qib_portcntr_7322()
4825 if (ppd->cpspec->ibdeltainprog) in qib_portcntr_7322()
4826 ret -= ret - ppd->cpspec->iblnkerrsnap; in qib_portcntr_7322()
4827 ret -= ppd->cpspec->iblnkerrdelta; in qib_portcntr_7322()
4829 ret -= ppd->cpspec->ibmalfdelta; in qib_portcntr_7322()
4831 ret += ppd->cpspec->iblnkdowndelta; in qib_portcntr_7322()
5015 dd->pport[i].cpspec->portcntrs = in init_7322_cntrnames()
5069 u64 *cntr = ppd->cpspec->portcntrs; in qib_read_7322portcntrs()
5139 if (ppd->cpspec->qdr_dfe_on && (ppd->link_speed_active & in qib_get_7322_faststats()
5143 ppd->cpspec->qdr_dfe_time && in qib_get_7322_faststats()
5144 time_is_before_jiffies(ppd->cpspec->qdr_dfe_time)) { in qib_get_7322_faststats()
5145 ppd->cpspec->qdr_dfe_on = 0; in qib_get_7322_faststats()
5195 ppd->cpspec->ibcctrl_a & in qib_7322_mini_pcs_reset()
5201 qib_write_kreg_port(ppd, krp_ibcctrl_a, ppd->cpspec->ibcctrl_a); in qib_7322_mini_pcs_reset()
5317 newctrlb = ppd->cpspec->ibcctrl_b & ~(IBA7322_IBC_SPEED_MASK | in set_7322_ibspeed_fast()
5331 if (newctrlb == ppd->cpspec->ibcctrl_b) in set_7322_ibspeed_fast()
5334 ppd->cpspec->ibcctrl_b = newctrlb; in set_7322_ibspeed_fast()
5335 qib_write_kreg_port(ppd, krp_ibcctrl_b, ppd->cpspec->ibcctrl_b); in set_7322_ibspeed_fast()
5356 queue_delayed_work(ib_wq, &ppd->cpspec->autoneg_work, in try_7322_autoneg()
5390 if (wait_event_timeout(ppd->cpspec->autoneg_wait, in autoneg_7322_work()
5397 if (wait_event_timeout(ppd->cpspec->autoneg_wait, in autoneg_7322_work()
5409 wait_event_timeout(ppd->cpspec->autoneg_wait, in autoneg_7322_work()
5416 if (ppd->cpspec->autoneg_tries == AUTONEG_TRIES) { in autoneg_7322_work()
5418 ppd->cpspec->autoneg_tries = 0; in autoneg_7322_work()
5478 delay = 2 << ppd->cpspec->ipg_tries; in try_7322_ipg()
5479 queue_delayed_work(ib_wq, &ppd->cpspec->ipg_work, in try_7322_ipg()
5494 && ++ppd->cpspec->ipg_tries <= 10) in ipg_7322_work()
5562 ppd->cpspec->ipg_tries = 0; in qib_7322_ib_updown()
5573 &ppd->cpspec->qsfp_data; in qib_7322_ib_updown()
5594 if (clr == ppd->cpspec->iblnkdownsnap) in qib_7322_ib_updown()
5595 ppd->cpspec->iblnkdowndelta++; in qib_7322_ib_updown()
5602 && ppd->cpspec->autoneg_tries < AUTONEG_TRIES) { in qib_7322_ib_updown()
5604 ++ppd->cpspec->autoneg_tries; in qib_7322_ib_updown()
5605 if (!ppd->cpspec->ibdeltainprog) { in qib_7322_ib_updown()
5606 ppd->cpspec->ibdeltainprog = 1; in qib_7322_ib_updown()
5607 ppd->cpspec->ibsymdelta += in qib_7322_ib_updown()
5610 ppd->cpspec->ibsymsnap; in qib_7322_ib_updown()
5611 ppd->cpspec->iblnkerrdelta += in qib_7322_ib_updown()
5614 ppd->cpspec->iblnkerrsnap; in qib_7322_ib_updown()
5631 ppd->cpspec->autoneg_tries = 0; in qib_7322_ib_updown()
5634 wake_up(&ppd->cpspec->autoneg_wait); in qib_7322_ib_updown()
5646 ppd->cpspec->ibcctrl_b |= IBA7322_IBC_IBTA_1_2_MASK; in qib_7322_ib_updown()
5651 if (ppd->dd->cspec->r1 && ppd->cpspec->ipg_tries <= 10) in qib_7322_ib_updown()
5653 if (!ppd->cpspec->recovery_init) in qib_7322_ib_updown()
5655 ppd->cpspec->qdr_dfe_time = jiffies + in qib_7322_ib_updown()
5658 ppd->cpspec->ibmalfusesnap = 0; in qib_7322_ib_updown()
5659 ppd->cpspec->ibmalfsnap = read_7322_creg32_port(ppd, in qib_7322_ib_updown()
5663 ppd->cpspec->iblnkdownsnap = in qib_7322_ib_updown()
5665 if (ppd->cpspec->ibdeltainprog) { in qib_7322_ib_updown()
5666 ppd->cpspec->ibdeltainprog = 0; in qib_7322_ib_updown()
5667 ppd->cpspec->ibsymdelta += read_7322_creg32_port(ppd, in qib_7322_ib_updown()
5668 crp_ibsymbolerr) - ppd->cpspec->ibsymsnap; in qib_7322_ib_updown()
5669 ppd->cpspec->iblnkerrdelta += read_7322_creg32_port(ppd, in qib_7322_ib_updown()
5670 crp_iblinkerrrecov) - ppd->cpspec->iblnkerrsnap; in qib_7322_ib_updown()
5673 !ppd->cpspec->ibdeltainprog && in qib_7322_ib_updown()
5675 ppd->cpspec->ibdeltainprog = 1; in qib_7322_ib_updown()
5676 ppd->cpspec->ibsymsnap = read_7322_creg32_port(ppd, in qib_7322_ib_updown()
5678 ppd->cpspec->iblnkerrsnap = read_7322_creg32_port(ppd, in qib_7322_ib_updown()
5809 dd->pport[0].cpspec->kpregbase = in qib_7322_set_baseaddrs()
5811 dd->pport[1].cpspec->kpregbase = in qib_7322_set_baseaddrs()
5814 dd->pport[0].cpspec->cpregbase = in qib_7322_set_baseaddrs()
5817 dd->pport[1].cpspec->cpregbase = in qib_7322_set_baseaddrs()
5856 if (!ppd->cpspec->kpregbase) in sendctrl_hook()
5859 psptr = ppd->cpspec->kpregbase + krp_sendctrl; in sendctrl_hook()
5951 ppd->cpspec->qsfp_data.modpresent = 0; in qsfp_7322_event()
6000 if (!ppd->cpspec->qsfp_data.modpresent && in qsfp_7322_event()
6002 ppd->cpspec->qsfp_data.modpresent = 1; in qsfp_7322_event()
6019 struct qib_qsfp_data *qd = &ppd->cpspec->qsfp_data; in qib_init_7322_qsfp()
6060 dd->pport[pidx].cpspec->no_eep = deflt; in set_no_qsfp_atten()
6107 ppd->cpspec->no_eep = val; in set_no_qsfp_atten()
6109 ppd->cpspec->h1_val = h1; in set_no_qsfp_atten()
6381 ppd[0].cpspec = (struct qib_chippport_specific *)(dd->cspec + 1); in qib_init_7322_variables()
6382 ppd[1].cpspec = &ppd[0].cpspec[1]; in qib_init_7322_variables()
6383 ppd[0].cpspec->ppd = &ppd[0]; /* for autoneg_7322_work() */ in qib_init_7322_variables()
6384 ppd[1].cpspec->ppd = &ppd[1]; /* for autoneg_7322_work() */ in qib_init_7322_variables()
6464 struct qib_chippport_specific *cp = ppd->cpspec; in qib_init_7322_variables()
6574 ppd->cpspec->no_eep = IS_QMH(dd) ? in qib_init_7322_variables()
7619 struct qib_qsfp_cache *qd = &ppd->cpspec->qsfp_data.cache; in find_best_ent()
7651 } else if (ppd->cpspec->no_eep < TXDDS_TABLE_SZ) { in find_best_ent()
7658 idx = ppd->cpspec->no_eep; in find_best_ent()
7662 } else if (ppd->cpspec->no_eep < (TXDDS_TABLE_SZ + TXDDS_EXTRA_SZ)) { in find_best_ent()
7664 idx = ppd->cpspec->no_eep - TXDDS_TABLE_SZ; in find_best_ent()
7669 ppd->cpspec->no_eep < (TXDDS_TABLE_SZ + TXDDS_EXTRA_SZ + in find_best_ent()
7671 idx = ppd->cpspec->no_eep - (TXDDS_TABLE_SZ + TXDDS_EXTRA_SZ); in find_best_ent()
7928 ppd->cpspec->qdr_dfe_on = 1; in serdes_7322_init_old()
8119 ppd->cpspec->qdr_dfe_on = 1; in serdes_7322_init_new()
8231 ppd->cpspec->qdr_reforce = 0; in force_h1()
8237 set_man_code(ppd, chan, ppd->cpspec->h1_val); in force_h1()
8437 ppd->cpspec->recovery_init = 1; in setup_7322_link_recovery()
8495 ppd->cpspec->ibcctrl_a &= in check_7322_rxe_status()
8498 ppd->cpspec->ibcctrl_a); in check_7322_rxe_status()