diff options
author | glebius <glebius@FreeBSD.org> | 2004-09-09 12:16:29 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2004-09-09 12:16:29 +0000 |
commit | cf25dec606cff5d317550bbb673150ead571e3ef (patch) | |
tree | ba45b67554199df6accc89eab9a8b8d4f0d6ba66 /sys/pci/if_xl.c | |
parent | b9d36a3baf952d119376ac810603bdcfce845895 (diff) | |
download | FreeBSD-src-cf25dec606cff5d317550bbb673150ead571e3ef.zip FreeBSD-src-cf25dec606cff5d317550bbb673150ead571e3ef.tar.gz |
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
Diffstat (limited to 'sys/pci/if_xl.c')
-rw-r--r-- | sys/pci/if_xl.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/pci/if_xl.c b/sys/pci/if_xl.c index 95edcfa..fa38695 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) |