Date: Fri, 24 Apr 2026 02:27:17 +0000 From: Justin Hibbits <jhibbits@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 74dff310698b - main - pseries/llan: call init when ioctl sets interface UP Message-ID: <69ead505.3225e.45b10110@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=74dff310698b9a4da9804ed0ded00428b0aebbe8 commit 74dff310698b9a4da9804ed0ded00428b0aebbe8 Author: Justin Hibbits <jhibbits@FreeBSD.org> AuthorDate: 2026-04-23 03:12:37 +0000 Commit: Justin Hibbits <jhibbits@FreeBSD.org> CommitDate: 2026-04-24 02:24:13 +0000 pseries/llan: call init when ioctl sets interface UP This should fix dhcp on an unitialized interface. This solution was found while comparing against another driver, SIOCSIFFLAGS is used by dhclient to force the interface up before it has an IP address. However, all setup work is done in llan_init(), so the interface would not be enabled if configured via only the SIOCSIFFLAGS ioctl. By running llan_init() when the interface is forced up via SIOCSIFFLAGS, the interface is initialized properly. PR: 292164 --- sys/powerpc/pseries/phyp_llan.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/powerpc/pseries/phyp_llan.c b/sys/powerpc/pseries/phyp_llan.c index 4ba4549a9cf5..763eebc15b36 100644 --- a/sys/powerpc/pseries/phyp_llan.c +++ b/sys/powerpc/pseries/phyp_llan.c @@ -547,6 +547,10 @@ llan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) err = ifmedia_ioctl(ifp, (struct ifreq *)data, &sc->media, cmd); break; case SIOCSIFFLAGS: + if ((if_getflags(ifp) & IFF_UP) && + !(if_getdrvflags(ifp) & IFF_DRV_RUNNING)) + llan_init(sc); + break; default: err = ether_ioctl(ifp, cmd, data); break;home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69ead505.3225e.45b10110>
