[PATCH net-next v9 07/12] r8152: accept PLA and USB firmware blocks for RTL8157 and RTL8159
From: Chih Kai Hsu
Date: Wed Nov 25 2026 - 22:33:12 EST
rtl8152_is_fw_mac_ok() has no RTL_VER_16 or RTL_VER_17 case, so any
RTL_FW_PLA or RTL_FW_USB block in the firmware for these chips fails
the check and the whole image is rejected with "check PLA firmware
failed" or "check USB firmware failed".
Add both versions with the same layout as RTL_VER_14: 16 break points
and USB_BP2_EN as the enable register.
Fixes: a51e171e176c ("r8152: Add firmware upload capability for RTL8157/RTL8159")
Signed-off-by: Chih Kai Hsu <hsu.chih.kai@xxxxxxxxxxx>
---
drivers/net/usb/r8152.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 7e553652f97ec..3e16d0f832bc3 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -4904,6 +4904,8 @@ static bool rtl8152_is_fw_mac_ok(struct r8152 *tp, struct fw_mac *mac)
max_bp = 8;
break;
case RTL_VER_14:
+ case RTL_VER_16:
+ case RTL_VER_17:
fw_reg = 0xf800;
bp_ba_addr = PLA_BP_BA;
bp_en_addr = USB_BP2_EN;
@@ -4932,6 +4934,8 @@ static bool rtl8152_is_fw_mac_ok(struct r8152 *tp, struct fw_mac *mac)
case RTL_VER_13:
case RTL_VER_14:
case RTL_VER_15:
+ case RTL_VER_16:
+ case RTL_VER_17:
fw_reg = 0xe600;
bp_ba_addr = USB_BP_BA;
bp_en_addr = USB_BP2_EN;
--
2.34.1