Changeset 1fe0257 in rtems


Ignore:
Timestamp:
Feb 2, 2012, 7:04:49 PM (8 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10
Children:
b5902b8
Parents:
9591970
Message:

PR 2011/networking GRETH: Moved print to remove potential deadlock

Deadlock may arise when the EDCL bug link is used to tunnel
console output over Ethernet, when Ethernet is down one should
avoid using console (only during debugging of LEON targets)

Author: Marko Isomaki <marko@…>
Signed-off-by: Daniel Hellstrom <daniel@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/libchip/network/greth.c

    r9591970 r1fe0257  
    267267    unsigned int msecs;
    268268    struct timeval tstart, tnow;
     269    int anegtout;
    269270
    270271    greth_regs *regs;
     
    302303    sc->auto_neg = 0;
    303304    sc->auto_neg_time = 0;
     305    /* the anegtout variable is needed because print cannot be done before mac has
     306       been reconfigured due to a possible deadlock situation if rtems
     307       is run through the edcl with uart polling (-u)*/
     308    anegtout = 0;
    304309    if ((phyctrl >> 12) & 1) {
    305310            /*wait for auto negotiation to complete*/
     
    328333                    if ( msecs > GRETH_AUTONEGO_TIMEOUT_MS ){
    329334                            sc->auto_neg_time = msecs;
    330                             printk("Auto negotiation timed out. Selecting default config\n\r");
     335                            anegtout = 1
    331336                            tmp1 = read_mii(phyaddr, 0);
    332337                            sc->gb = ((phyctrl >> 6) & 1) && !((phyctrl >> 13) & 1);
     
    476481
    477482    regs->ctrl |= GRETH_CTRL_RXEN | (sc->fd << 4) | GRETH_CTRL_RXIRQ | (sc->sp << 7) | (sc->gb << 8);
    478 
     483   
     484    if (anegtout) {
     485            printk("Auto negotiation timed out. Selecting default config\n\r");
     486    }
     487   
    479488    print_init_info(sc);
    480489}
Note: See TracChangeset for help on using the changeset viewer.