109
109
void EnablePhyComa(struct et131x_adapter *etdev)
111
111
unsigned long flags;
114
GlobalPmCSR = readl(&etdev->regs->global.pm_csr);
114
pmcsr = readl(&etdev->regs->global.pm_csr);
116
116
/* Save the GbE PHY speed and duplex modes. Need to restore this
117
117
* when cable is plugged back in
119
etdev->PoMgmt.PowerDownSpeed = etdev->AiForceSpeed;
120
etdev->PoMgmt.PowerDownDuplex = etdev->AiForceDpx;
119
etdev->pdown_speed = etdev->AiForceSpeed;
120
etdev->pdown_duplex = etdev->AiForceDpx;
122
122
/* Stop sending packets. */
123
spin_lock_irqsave(&etdev->SendHWLock, flags);
123
spin_lock_irqsave(&etdev->send_hw_lock, flags);
124
124
etdev->Flags |= fMP_ADAPTER_LOWER_POWER;
125
spin_unlock_irqrestore(&etdev->SendHWLock, flags);
125
spin_unlock_irqrestore(&etdev->send_hw_lock, flags);
127
127
/* Wait for outstanding Receive packets */
129
129
/* Gate off JAGCore 3 clock domains */
130
GlobalPmCSR &= ~ET_PMCSR_INIT;
131
writel(GlobalPmCSR, &etdev->regs->global.pm_csr);
130
pmcsr &= ~ET_PMCSR_INIT;
131
writel(pmcsr, &etdev->regs->global.pm_csr);
133
133
/* Program gigE PHY in to Coma mode */
134
GlobalPmCSR |= ET_PM_PHY_SW_COMA;
135
writel(GlobalPmCSR, &etdev->regs->global.pm_csr);
134
pmcsr |= ET_PM_PHY_SW_COMA;
135
writel(pmcsr, &etdev->regs->global.pm_csr);
142
142
void DisablePhyComa(struct et131x_adapter *etdev)
146
GlobalPmCSR = readl(&etdev->regs->global.pm_csr);
146
pmcsr = readl(&etdev->regs->global.pm_csr);
148
148
/* Disable phy_sw_coma register and re-enable JAGCore clocks */
149
GlobalPmCSR |= ET_PMCSR_INIT;
150
GlobalPmCSR &= ~ET_PM_PHY_SW_COMA;
151
writel(GlobalPmCSR, &etdev->regs->global.pm_csr);
149
pmcsr |= ET_PMCSR_INIT;
150
pmcsr &= ~ET_PM_PHY_SW_COMA;
151
writel(pmcsr, &etdev->regs->global.pm_csr);
153
153
/* Restore the GbE PHY speed and duplex modes;
154
154
* Reset JAGCore; re-configure and initialize JAGCore and gigE PHY
156
etdev->AiForceSpeed = etdev->PoMgmt.PowerDownSpeed;
157
etdev->AiForceDpx = etdev->PoMgmt.PowerDownDuplex;
156
etdev->AiForceSpeed = etdev->pdown_speed;
157
etdev->AiForceDpx = etdev->pdown_duplex;
159
159
/* Re-initialize the send structures */
160
160
et131x_init_send(etdev);