Lines Matching refs:cpspec

1047 	struct qib_chippport_specific *cpspec = from_timer(cpspec, t,  in reenable_7220_chase()  local
1049 struct qib_pportdata *ppd = &cpspec->pportdata; in reenable_7220_chase()
1051 ppd->cpspec->chase_timer.expires = 0; in reenable_7220_chase()
1075 if (ppd->cpspec->chase_end && in handle_7220_chase()
1076 time_after(tnow, ppd->cpspec->chase_end)) { in handle_7220_chase()
1077 ppd->cpspec->chase_end = 0; in handle_7220_chase()
1081 ppd->cpspec->chase_timer.expires = jiffies + in handle_7220_chase()
1083 add_timer(&ppd->cpspec->chase_timer); in handle_7220_chase()
1084 } else if (!ppd->cpspec->chase_end) in handle_7220_chase()
1085 ppd->cpspec->chase_end = tnow + QIB_CHASE_TIME; in handle_7220_chase()
1089 ppd->cpspec->chase_end = 0; in handle_7220_chase()
1514 qib_write_kreg(dd, kr_ibcctrl, ppd->cpspec->ibcctrl | mod_wd); in qib_set_ib_7220_lstate()
1541 ppd->cpspec->ibdeltainprog = 1; in qib_7220_bringup_serdes()
1542 ppd->cpspec->ibsymsnap = read_7220_creg32(dd, cr_ibsymbolerr); in qib_7220_bringup_serdes()
1543 ppd->cpspec->iblnkerrsnap = in qib_7220_bringup_serdes()
1566 ppd->cpspec->ibcctrl = ibc; /* without linkcmd or linkinitcmd! */ in qib_7220_bringup_serdes()
1569 val = ppd->cpspec->ibcctrl | (QLOGIC_IB_IBCC_LINKINITCMD_DISABLE << in qib_7220_bringup_serdes()
1573 if (!ppd->cpspec->ibcddrctrl) { in qib_7220_bringup_serdes()
1575 ppd->cpspec->ibcddrctrl = qib_read_kreg64(dd, kr_ibcddrctrl); in qib_7220_bringup_serdes()
1578 ppd->cpspec->ibcddrctrl |= in qib_7220_bringup_serdes()
1582 ppd->cpspec->ibcddrctrl |= in qib_7220_bringup_serdes()
1587 ppd->cpspec->ibcddrctrl |= IBA7220_IBC_WIDTH_AUTONEG; in qib_7220_bringup_serdes()
1589 ppd->cpspec->ibcddrctrl |= in qib_7220_bringup_serdes()
1595 ppd->cpspec->ibcddrctrl |= in qib_7220_bringup_serdes()
1597 ppd->cpspec->ibcddrctrl |= in qib_7220_bringup_serdes()
1601 ppd->cpspec->ibcddrctrl |= IBA7220_IBC_LANE_REV_SUPPORTED; in qib_7220_bringup_serdes()
1606 qib_write_kreg(dd, kr_ibcddrctrl, ppd->cpspec->ibcddrctrl); in qib_7220_bringup_serdes()
1657 ppd->cpspec->chase_end = 0; in qib_7220_quiet_serdes()
1658 if (ppd->cpspec->chase_timer.function) /* if initted */ in qib_7220_quiet_serdes()
1659 del_timer_sync(&ppd->cpspec->chase_timer); in qib_7220_quiet_serdes()
1661 if (ppd->cpspec->ibsymdelta || ppd->cpspec->iblnkerrdelta || in qib_7220_quiet_serdes()
1662 ppd->cpspec->ibdeltainprog) { in qib_7220_quiet_serdes()
1670 if (ppd->cpspec->ibsymdelta || ppd->cpspec->ibdeltainprog) { in qib_7220_quiet_serdes()
1672 if (ppd->cpspec->ibdeltainprog) in qib_7220_quiet_serdes()
1673 val -= val - ppd->cpspec->ibsymsnap; in qib_7220_quiet_serdes()
1674 val -= ppd->cpspec->ibsymdelta; in qib_7220_quiet_serdes()
1677 if (ppd->cpspec->iblnkerrdelta || ppd->cpspec->ibdeltainprog) { in qib_7220_quiet_serdes()
1679 if (ppd->cpspec->ibdeltainprog) in qib_7220_quiet_serdes()
1680 val -= val - ppd->cpspec->iblnkerrsnap; in qib_7220_quiet_serdes()
1681 val -= ppd->cpspec->iblnkerrdelta; in qib_7220_quiet_serdes()
1693 wake_up(&ppd->cpspec->autoneg_wait); in qib_7220_quiet_serdes()
1694 cancel_delayed_work_sync(&ppd->cpspec->autoneg_work); in qib_7220_quiet_serdes()
2082 dd->pport->cpspec->ibdeltainprog = 0; in qib_setup_7220_reset()
2083 dd->pport->cpspec->ibsymdelta = 0; in qib_setup_7220_reset()
2084 dd->pport->cpspec->iblnkerrdelta = 0; in qib_setup_7220_reset()
2134 if (dd->pport->cpspec->ibcddrctrl & IBA7220_IBC_IBTA_1_2_MASK) in qib_setup_7220_reset()
2368 ret = SYM_FIELD(ppd->cpspec->ibcctrl, IBCCtrl, in qib_7220_get_ib_cfg()
2373 ret = SYM_FIELD(ppd->cpspec->ibcctrl, IBCCtrl, in qib_7220_get_ib_cfg()
2379 ret = (ppd->cpspec->ibcctrl & in qib_7220_get_ib_cfg()
2401 ret = (int)((ppd->cpspec->ibcddrctrl >> lsb) & maskr); in qib_7220_get_ib_cfg()
2460 if ((ppd->cpspec->ibcddrctrl & IBA7220_IBC_IBTA_1_2_MASK) && in qib_7220_set_ib_cfg()
2501 maskr = SYM_FIELD(ppd->cpspec->ibcctrl, IBCCtrl, in qib_7220_set_ib_cfg()
2504 ppd->cpspec->ibcctrl &= in qib_7220_set_ib_cfg()
2506 ppd->cpspec->ibcctrl |= (u64) val << in qib_7220_set_ib_cfg()
2508 qib_write_kreg(dd, kr_ibcctrl, ppd->cpspec->ibcctrl); in qib_7220_set_ib_cfg()
2514 maskr = SYM_FIELD(ppd->cpspec->ibcctrl, IBCCtrl, in qib_7220_set_ib_cfg()
2517 ppd->cpspec->ibcctrl &= in qib_7220_set_ib_cfg()
2519 ppd->cpspec->ibcctrl |= (u64) val << in qib_7220_set_ib_cfg()
2521 qib_write_kreg(dd, kr_ibcctrl, ppd->cpspec->ibcctrl); in qib_7220_set_ib_cfg()
2536 ppd->cpspec->ibcctrl &= in qib_7220_set_ib_cfg()
2539 ppd->cpspec->ibcctrl |= in qib_7220_set_ib_cfg()
2541 qib_write_kreg(dd, kr_ibcctrl, ppd->cpspec->ibcctrl); in qib_7220_set_ib_cfg()
2554 ppd->cpspec->ibcctrl &= ~SYM_MASK(IBCCtrl, MaxPktLen); in qib_7220_set_ib_cfg()
2555 ppd->cpspec->ibcctrl |= (u64)val << SYM_LSB(IBCCtrl, MaxPktLen); in qib_7220_set_ib_cfg()
2556 qib_write_kreg(dd, kr_ibcctrl, ppd->cpspec->ibcctrl); in qib_7220_set_ib_cfg()
2564 if (!ppd->cpspec->ibdeltainprog && in qib_7220_set_ib_cfg()
2566 ppd->cpspec->ibdeltainprog = 1; in qib_7220_set_ib_cfg()
2567 ppd->cpspec->ibsymsnap = in qib_7220_set_ib_cfg()
2569 ppd->cpspec->iblnkerrsnap = in qib_7220_set_ib_cfg()
2602 ppd->cpspec->chase_end = 0; in qib_7220_set_ib_cfg()
2607 if (ppd->cpspec->chase_timer.expires) { in qib_7220_set_ib_cfg()
2608 del_timer_sync(&ppd->cpspec->chase_timer); in qib_7220_set_ib_cfg()
2609 ppd->cpspec->chase_timer.expires = 0; in qib_7220_set_ib_cfg()
2623 tmp = (ppd->cpspec->ibcddrctrl >> lsb) & maskr; in qib_7220_set_ib_cfg()
2631 ppd->cpspec->ibcddrctrl &= ~(maskr << lsb); in qib_7220_set_ib_cfg()
2632 ppd->cpspec->ibcddrctrl |= in qib_7220_set_ib_cfg()
2636 ppd->cpspec->ibcddrctrl); in qib_7220_set_ib_cfg()
2657 ppd->cpspec->ibcddrctrl &= ~(maskr << lsb); in qib_7220_set_ib_cfg()
2658 ppd->cpspec->ibcddrctrl |= (((u64) val & maskr) << lsb); in qib_7220_set_ib_cfg()
2659 qib_write_kreg(dd, kr_ibcddrctrl, ppd->cpspec->ibcddrctrl); in qib_7220_set_ib_cfg()
2676 ppd->cpspec->ibcctrl |= SYM_MASK(IBCCtrl, Loopback); in qib_7220_set_loopback()
2681 ppd->cpspec->ibcctrl &= ~SYM_MASK(IBCCtrl, Loopback); in qib_7220_set_loopback()
2690 qib_write_kreg(ppd->dd, kr_ibcctrl, ppd->cpspec->ibcctrl); in qib_7220_set_loopback()
2691 ddr = ppd->cpspec->ibcddrctrl & ~(IBA7220_IBC_HRTBT_MASK in qib_7220_set_loopback()
2693 ppd->cpspec->ibcddrctrl = ddr | val; in qib_7220_set_loopback()
2695 ppd->cpspec->ibcddrctrl); in qib_7220_set_loopback()
2972 if (dd->pport->cpspec->ibdeltainprog) in qib_portcntr_7220()
2973 ret -= ret - ppd->cpspec->ibsymsnap; in qib_portcntr_7220()
2974 ret -= dd->pport->cpspec->ibsymdelta; in qib_portcntr_7220()
2976 if (dd->pport->cpspec->ibdeltainprog) in qib_portcntr_7220()
2977 ret -= ret - ppd->cpspec->iblnkerrsnap; in qib_portcntr_7220()
2978 ret -= dd->pport->cpspec->iblnkerrdelta; in qib_portcntr_7220()
3466 ppd->cpspec->ibcddrctrl &= ~(IBA7220_IBC_SPEED_AUTONEG_MASK | in set_7220_ibspeed_fast()
3470 ppd->cpspec->ibcddrctrl |= IBA7220_IBC_SPEED_AUTONEG_MASK | in set_7220_ibspeed_fast()
3473 ppd->cpspec->ibcddrctrl |= speed == QIB_IB_DDR ? in set_7220_ibspeed_fast()
3476 qib_write_kreg(ppd->dd, kr_ibcddrctrl, ppd->cpspec->ibcddrctrl); in set_7220_ibspeed_fast()
3505 queue_delayed_work(ib_wq, &ppd->cpspec->autoneg_work, in try_7220_autoneg()
3541 if (wait_event_timeout(ppd->cpspec->autoneg_wait, in autoneg_7220_work()
3549 if (wait_event_timeout(ppd->cpspec->autoneg_wait, in autoneg_7220_work()
3561 wait_event_timeout(ppd->cpspec->autoneg_wait, in autoneg_7220_work()
3648 if (!ppd->cpspec->ibdeltainprog) { in qib_7220_ib_updown()
3649 ppd->cpspec->ibdeltainprog = 1; in qib_7220_ib_updown()
3650 ppd->cpspec->ibsymsnap = read_7220_creg32(dd, in qib_7220_ib_updown()
3652 ppd->cpspec->iblnkerrsnap = read_7220_creg32(dd, in qib_7220_ib_updown()
3676 wake_up(&ppd->cpspec->autoneg_wait); in qib_7220_ib_updown()
3689 ppd->cpspec->ibcddrctrl |= in qib_7220_ib_updown()
3720 if (ppd->cpspec->ibdeltainprog) { in qib_7220_ib_updown()
3721 ppd->cpspec->ibdeltainprog = 0; in qib_7220_ib_updown()
3722 ppd->cpspec->ibsymdelta += read_7220_creg32(ppd->dd, in qib_7220_ib_updown()
3723 cr_ibsymbolerr) - ppd->cpspec->ibsymsnap; in qib_7220_ib_updown()
3724 ppd->cpspec->iblnkerrdelta += read_7220_creg32(ppd->dd, in qib_7220_ib_updown()
3725 cr_iblinkerrrecov) - ppd->cpspec->iblnkerrsnap; in qib_7220_ib_updown()
3728 !ppd->cpspec->ibdeltainprog && in qib_7220_ib_updown()
3730 ppd->cpspec->ibdeltainprog = 1; in qib_7220_ib_updown()
3731 ppd->cpspec->ibsymsnap = read_7220_creg32(ppd->dd, in qib_7220_ib_updown()
3733 ppd->cpspec->iblnkerrsnap = read_7220_creg32(ppd->dd, in qib_7220_ib_updown()
3957 struct qib_chippport_specific *cpspec; in qib_init_7220_variables() local
3962 cpspec = (struct qib_chippport_specific *)(dd + 1); in qib_init_7220_variables()
3963 ppd = &cpspec->pportdata; in qib_init_7220_variables()
3967 dd->cspec = (struct qib_chip_specific *)(cpspec + dd->num_pports); in qib_init_7220_variables()
3969 ppd->cpspec = cpspec; in qib_init_7220_variables()
4007 init_waitqueue_head(&cpspec->autoneg_wait); in qib_init_7220_variables()
4008 INIT_DELAYED_WORK(&cpspec->autoneg_work, autoneg_7220_work); in qib_init_7220_variables()
4031 timer_setup(&ppd->cpspec->chase_timer, reenable_7220_chase, 0); in qib_init_7220_variables()
4333 u32 ret = ppd->cpspec->last_delay_mult; in qib_7220_setpbc_control()
4335 ppd->cpspec->last_delay_mult = (rcv_mult > snd_mult) ? in qib_7220_setpbc_control()