u16 isr;
u16 lcr2;
- /* Zero out the adapter structure variable representing BMSR */
- adapter->bmsr = 0;
-
et131x_mii_read(adapter, PHY_INTERRUPT_STATUS, &isr);
et131x_mii_read(adapter, PHY_INTERRUPT_MASK, &imr);
void et131x_error_timer_handler(unsigned long data)
{
struct et131x_adapter *adapter = (struct et131x_adapter *) data;
+ struct phy_device *phydev = adapter->phydev;
if (!et1310_in_phy_coma(adapter))
et1310_update_macstat_host_counters(adapter);
else
dev_err(&adapter->pdev->dev, "No interrupts, in PHY coma\n");
- if (!(adapter->bmsr & BMSR_LSTATUS) &&
- adapter->boot_coma < 11) {
+ if (!phydev->link && adapter->boot_coma < 11)
adapter->boot_coma++;
- }
if (adapter->boot_coma == 10) {
- if (!(adapter->bmsr & BMSR_LSTATUS)) {
+ if (!phydev->link) {
if (!et1310_in_phy_coma(adapter)) {
/* NOTE - This was originally a 'sync with
* interrupt'. How to do that under Linux?