Lines Matching refs:cpspec
1045 ppd->cpspec->chase_timer.expires = 0;
1069 if (ppd->cpspec->chase_end &&
1070 time_after64(tnow, ppd->cpspec->chase_end)) {
1071 ppd->cpspec->chase_end = 0;
1075 ppd->cpspec->chase_timer.expires = jiffies +
1077 add_timer(&ppd->cpspec->chase_timer);
1078 } else if (!ppd->cpspec->chase_end)
1079 ppd->cpspec->chase_end = tnow + QIB_CHASE_TIME;
1083 ppd->cpspec->chase_end = 0;
1515 qib_write_kreg(dd, kr_ibcctrl, ppd->cpspec->ibcctrl | mod_wd);
1542 ppd->cpspec->ibdeltainprog = 1;
1543 ppd->cpspec->ibsymsnap = read_7220_creg32(dd, cr_ibsymbolerr);
1544 ppd->cpspec->iblnkerrsnap =
1567 ppd->cpspec->ibcctrl = ibc; /* without linkcmd or linkinitcmd! */
1570 val = ppd->cpspec->ibcctrl | (QLOGIC_IB_IBCC_LINKINITCMD_DISABLE <<
1574 if (!ppd->cpspec->ibcddrctrl) {
1576 ppd->cpspec->ibcddrctrl = qib_read_kreg64(dd, kr_ibcddrctrl);
1579 ppd->cpspec->ibcddrctrl |=
1583 ppd->cpspec->ibcddrctrl |=
1588 ppd->cpspec->ibcddrctrl |= IBA7220_IBC_WIDTH_AUTONEG;
1590 ppd->cpspec->ibcddrctrl |=
1596 ppd->cpspec->ibcddrctrl |=
1598 ppd->cpspec->ibcddrctrl |=
1602 ppd->cpspec->ibcddrctrl |= IBA7220_IBC_LANE_REV_SUPPORTED;
1607 qib_write_kreg(dd, kr_ibcddrctrl, ppd->cpspec->ibcddrctrl);
1658 ppd->cpspec->chase_end = 0;
1659 if (ppd->cpspec->chase_timer.data) /* if initted */
1660 del_timer_sync(&ppd->cpspec->chase_timer);
1662 if (ppd->cpspec->ibsymdelta || ppd->cpspec->iblnkerrdelta ||
1663 ppd->cpspec->ibdeltainprog) {
1671 if (ppd->cpspec->ibsymdelta || ppd->cpspec->ibdeltainprog) {
1673 if (ppd->cpspec->ibdeltainprog)
1674 val -= val - ppd->cpspec->ibsymsnap;
1675 val -= ppd->cpspec->ibsymdelta;
1678 if (ppd->cpspec->iblnkerrdelta || ppd->cpspec->ibdeltainprog) {
1680 if (ppd->cpspec->ibdeltainprog)
1681 val -= val - ppd->cpspec->iblnkerrsnap;
1682 val -= ppd->cpspec->iblnkerrdelta;
1694 wake_up(&ppd->cpspec->autoneg_wait);
1695 cancel_delayed_work(&ppd->cpspec->autoneg_work);
2108 dd->pport->cpspec->ibdeltainprog = 0;
2109 dd->pport->cpspec->ibsymdelta = 0;
2110 dd->pport->cpspec->iblnkerrdelta = 0;
2159 if (dd->pport->cpspec->ibcddrctrl & IBA7220_IBC_IBTA_1_2_MASK)
2393 ret = SYM_FIELD(ppd->cpspec->ibcctrl, IBCCtrl,
2398 ret = SYM_FIELD(ppd->cpspec->ibcctrl, IBCCtrl,
2404 ret = (ppd->cpspec->ibcctrl &
2426 ret = (int)((ppd->cpspec->ibcddrctrl >> lsb) & maskr);
2487 if ((ppd->cpspec->ibcddrctrl & IBA7220_IBC_IBTA_1_2_MASK) &&
2528 maskr = SYM_FIELD(ppd->cpspec->ibcctrl, IBCCtrl,
2531 ppd->cpspec->ibcctrl &=
2533 ppd->cpspec->ibcctrl |= (u64) val <<
2535 qib_write_kreg(dd, kr_ibcctrl, ppd->cpspec->ibcctrl);
2541 maskr = SYM_FIELD(ppd->cpspec->ibcctrl, IBCCtrl,
2544 ppd->cpspec->ibcctrl &=
2546 ppd->cpspec->ibcctrl |= (u64) val <<
2548 qib_write_kreg(dd, kr_ibcctrl, ppd->cpspec->ibcctrl);
2563 ppd->cpspec->ibcctrl &=
2566 ppd->cpspec->ibcctrl |=
2568 qib_write_kreg(dd, kr_ibcctrl, ppd->cpspec->ibcctrl);
2581 ppd->cpspec->ibcctrl &= ~SYM_MASK(IBCCtrl, MaxPktLen);
2582 ppd->cpspec->ibcctrl |= (u64)val << SYM_LSB(IBCCtrl, MaxPktLen);
2583 qib_write_kreg(dd, kr_ibcctrl, ppd->cpspec->ibcctrl);
2591 if (!ppd->cpspec->ibdeltainprog &&
2593 ppd->cpspec->ibdeltainprog = 1;
2594 ppd->cpspec->ibsymsnap =
2596 ppd->cpspec->iblnkerrsnap =
2629 ppd->cpspec->chase_end = 0;
2634 if (ppd->cpspec->chase_timer.expires) {
2635 del_timer_sync(&ppd->cpspec->chase_timer);
2636 ppd->cpspec->chase_timer.expires = 0;
2662 ppd->cpspec->ibcddrctrl &= ~(maskr << lsb);
2663 ppd->cpspec->ibcddrctrl |= (((u64) val & maskr) << lsb);
2664 qib_write_kreg(dd, kr_ibcddrctrl, ppd->cpspec->ibcddrctrl);
2681 ppd->cpspec->ibcctrl |= SYM_MASK(IBCCtrl, Loopback);
2686 ppd->cpspec->ibcctrl &= ~SYM_MASK(IBCCtrl, Loopback);
2694 qib_write_kreg(ppd->dd, kr_ibcctrl, ppd->cpspec->ibcctrl);
2695 ddr = ppd->cpspec->ibcddrctrl & ~(IBA7220_IBC_HRTBT_MASK
2697 ppd->cpspec->ibcddrctrl = ddr | val;
2699 ppd->cpspec->ibcddrctrl);
2976 if (dd->pport->cpspec->ibdeltainprog)
2977 ret -= ret - ppd->cpspec->ibsymsnap;
2978 ret -= dd->pport->cpspec->ibsymdelta;
2980 if (dd->pport->cpspec->ibdeltainprog)
2981 ret -= ret - ppd->cpspec->iblnkerrsnap;
2982 ret -= dd->pport->cpspec->iblnkerrdelta;
3479 ppd->cpspec->ibcddrctrl &= ~(IBA7220_IBC_SPEED_AUTONEG_MASK |
3483 ppd->cpspec->ibcddrctrl |= IBA7220_IBC_SPEED_AUTONEG_MASK |
3486 ppd->cpspec->ibcddrctrl |= speed == QIB_IB_DDR ?
3489 qib_write_kreg(ppd->dd, kr_ibcddrctrl, ppd->cpspec->ibcddrctrl);
3518 schedule_delayed_work(&ppd->cpspec->autoneg_work,
3557 if (wait_event_timeout(ppd->cpspec->autoneg_wait,
3565 if (wait_event_timeout(ppd->cpspec->autoneg_wait,
3577 wait_event_timeout(ppd->cpspec->autoneg_wait,
3664 if (!ppd->cpspec->ibdeltainprog) {
3665 ppd->cpspec->ibdeltainprog = 1;
3666 ppd->cpspec->ibsymsnap = read_7220_creg32(dd,
3668 ppd->cpspec->iblnkerrsnap = read_7220_creg32(dd,
3692 wake_up(&ppd->cpspec->autoneg_wait);
3705 ppd->cpspec->ibcddrctrl |=
3736 if (ppd->cpspec->ibdeltainprog) {
3737 ppd->cpspec->ibdeltainprog = 0;
3738 ppd->cpspec->ibsymdelta += read_7220_creg32(ppd->dd,
3739 cr_ibsymbolerr) - ppd->cpspec->ibsymsnap;
3740 ppd->cpspec->iblnkerrdelta += read_7220_creg32(ppd->dd,
3741 cr_iblinkerrrecov) - ppd->cpspec->iblnkerrsnap;
3744 !ppd->cpspec->ibdeltainprog &&
3746 ppd->cpspec->ibdeltainprog = 1;
3747 ppd->cpspec->ibsymsnap = read_7220_creg32(ppd->dd,
3749 ppd->cpspec->iblnkerrsnap = read_7220_creg32(ppd->dd,
3850 * The chip base addresses in cspec and cpspec have to be set
3974 struct qib_chippport_specific *cpspec;
3979 cpspec = (struct qib_chippport_specific *)(dd + 1);
3980 ppd = &cpspec->pportdata;
3984 dd->cspec = (struct qib_chip_specific *)(cpspec + dd->num_pports);
3985 ppd->cpspec = cpspec;
4033 init_waitqueue_head(&cpspec->autoneg_wait);
4034 INIT_DELAYED_WORK(&cpspec->autoneg_work, autoneg_7220_work);
4055 init_timer(&ppd->cpspec->chase_timer);
4056 ppd->cpspec->chase_timer.function = reenable_7220_chase;
4057 ppd->cpspec->chase_timer.data = (unsigned long)ppd;
4362 u32 ret = ppd->cpspec->last_delay_mult;
4364 ppd->cpspec->last_delay_mult = (rcv_mult > snd_mult) ?