git: 237e851009e8 - stable/15 - pseries/llan: call init when ioctl sets interface UP
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 20 May 2026 01:53:26 UTC
The branch stable/15 has been updated by jhibbits:
URL: https://cgit.FreeBSD.org/src/commit/?id=237e851009e81f519a0fcb57220cff0d35223b88
commit 237e851009e81f519a0fcb57220cff0d35223b88
Author: Justin Hibbits <jhibbits@FreeBSD.org>
AuthorDate: 2026-04-23 03:12:37 +0000
Commit: Justin Hibbits <jhibbits@FreeBSD.org>
CommitDate: 2026-05-20 01:52:50 +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
(cherry picked from commit 74dff310698b9a4da9804ed0ded00428b0aebbe8)
---
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;