Do not call xl_init_locked() unconditionally when we are bringed UP. Call

it only if we weren't UP before. In some cases xl_init causes long media
re-negotiation, and ppp(8) fails to open PPPoE connection because it sets
IFF_UP every time before opening PPPoE connection.

PR:		kern/69133
Patch by:	mdodd
Approved by:	wpaul, julian (mentor)
MFC after:	1 week
This commit is contained in:
Gleb Smirnoff 2004-09-09 12:16:29 +00:00
parent 29a6af9b14
commit 9fdd451496

View File

@ -3033,8 +3033,9 @@ xl_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
CSR_WRITE_2(sc, XL_COMMAND,
XL_CMD_RX_SET_FILT|rxfilt);
XL_SEL_WIN(7);
} else {
xl_init_locked(sc);
} else
if ((ifp->if_flags & IFF_RUNNING) == 0) {
xl_init_locked(sc);
}
} else {
if (ifp->if_flags & IFF_RUNNING)