diff options
| author | Zhenlei Huang <zlei@FreeBSD.org> | 2026-02-06 17:52:54 +0000 |
|---|---|---|
| committer | Zhenlei Huang <zlei@FreeBSD.org> | 2026-02-06 17:52:54 +0000 |
| commit | c10e6bc0f0079e90cb484323ad71d437f1882422 (patch) | |
| tree | d5be2ee35f6222a1c77d419b71ea60c2edec04f2 | |
| parent | 0df8a998a9fe28af659cb401c537c6d785e55f81 (diff) | |
qlnxe: Avoid reinitializing the interface when it is already initialized
qlnx_init_locked() unconditionally uninitialize the interface thus is
actually reinitializing the interface. Well the init routine qlnx_init()
is to initialize the interface by net stack when assigned with the first
inet or inet6 address. The ioctl SIOCSIFADDR for the first inet6 address
is handled by ether_ioctl() thus the interface is reinitialized no matter
it was initialized or not.
Add a driver status check for that to avoid reinitializing. Further plan
is removing SIOCSIFADDR ioctl from the driver and let ether_ioctl() handle
it.
Reviewed by: kbowling
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D54887
| -rw-r--r-- | sys/dev/qlnx/qlnxe/qlnx_os.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/qlnx/qlnxe/qlnx_os.c b/sys/dev/qlnx/qlnxe/qlnx_os.c index b0dac3a82582..bc0282e3c22b 100644 --- a/sys/dev/qlnx/qlnxe/qlnx_os.c +++ b/sys/dev/qlnx/qlnxe/qlnx_os.c @@ -2431,7 +2431,8 @@ qlnx_init(void *arg) QL_DPRINT2(ha, "enter\n"); QLNX_LOCK(ha); - qlnx_init_locked(ha); + if ((if_getdrvflags(ha->ifp) & IFF_DRV_RUNNING) == 0) + qlnx_init_locked(ha); QLNX_UNLOCK(ha); QL_DPRINT2(ha, "exit\n"); |
