From 9fdd4514960d964221c614b7468e044179e26d7a Mon Sep 17 00:00:00 2001 From: Gleb Smirnoff Date: Thu, 9 Sep 2004 12:16:29 +0000 Subject: [PATCH] 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 --- sys/pci/if_xl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/pci/if_xl.c b/sys/pci/if_xl.c index 95edcfa74795..fa3869555472 100644 --- a/sys/pci/if_xl.c +++ b/sys/pci/if_xl.c @@ -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)