Changeset 8974294 in mainline for uspace/drv/nic/e1k/e1k.c


Ignore:
Timestamp:
2017-10-04T18:46:07Z (7 years ago)
Author:
jzr <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7e20bee
Parents:
36c3139
Message:

Attempt to fix e1000_link_restart().

My understanding of the driver is limited,
so I'm not positive it's entirely correct,
but it's most definitely more correct now
than it had been before.

Fixes #695, probably.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/nic/e1k/e1k.c

    r36c3139 r8974294  
    365365        if (ctrl & CTRL_SLU) {
    366366                ctrl &= ~(CTRL_SLU);
     367                E1000_REG_WRITE(e1000, E1000_CTRL, ctrl);
    367368                fibril_mutex_unlock(&e1000->ctrl_lock);
     369               
    368370                thread_usleep(10);
     371               
    369372                fibril_mutex_lock(&e1000->ctrl_lock);
     373                ctrl = E1000_REG_READ(e1000, E1000_CTRL);
    370374                ctrl |= CTRL_SLU;
     375                E1000_REG_WRITE(e1000, E1000_CTRL, ctrl);
    371376        }
    372377       
    373378        fibril_mutex_unlock(&e1000->ctrl_lock);
    374        
    375         e1000_link_restart(e1000);
    376379}
    377380
Note: See TracChangeset for help on using the changeset viewer.