]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: libwx: fix VF illegal register access
authorJiawen Wu <jiawenwu@trustnetic.com>
Wed, 29 Apr 2026 08:37:42 +0000 (16:37 +0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 1 May 2026 01:07:21 +0000 (18:07 -0700)
commit694de316f607fe2473d52ca0707e3918e72c1562
tree62fdd39989494e9050c1071391c62db3b2b27afc
parent26ebd12e67bfc3543d77ce586c33ef29fcafab20
net: libwx: fix VF illegal register access

Register WX_CFG_PORT_ST is a PF restricted register. When a VF is
initialized, attempting to read this register triggers an illegal
register access, which lead to a system hang.

When the device is VF, the bus function ID can be obtained directly from
the PCI_FUNC(pdev->devfn).

Fixes: a04ea57aae37 ("net: libwx: fix device bus LAN ID")
Cc: stable@vger.kernel.org
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Link: https://patch.msgid.link/4D1F4452D21DE107+20260429083743.88961-1-jiawenwu@trustnetic.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/wangxun/libwx/wx_hw.c