🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #22878

[PATCH net-next v9 07/12] r8152: accept PLA and USB firmware blocks for RTL8157 and RTL8159

#22878
From: Chih Kai Hsu
Date: Thu, 26 Nov 2026 03:32
39 lines
10301 bytes
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@realtek.com>
---
 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
Technical Details
Message-ID: <20261126033211.51850-8-nic_swsd@realtek.com>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-371847-linux-kernel-netdev=dewy.ru
References: <20261126033211.51850-1-nic_swsd@realtek.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-371847-linux-kernel-netdev=dewy.ru
From: hsu.chih.kai@realtek.com (Chih Kai Hsu)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net-next v9 07/12] r8152: accept PLA and USB firmware blocks for RTL8157 and RTL8159
Date: Thu, 26 Nov 2026 11:32:06 +0800
Organization: Usenet Network
Message-ID: <20261126033211.51850-8-nic_swsd@realtek.com>
References: <20261126033211.51850-1-nic_swsd@realtek.com>
MIME-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="371599"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:EN9K7rc0F5/sXGs6VMHGafVeQp0= sha256:x7zFud+r4aHvf4Hkxcw82t09J7dPUjaiadlRtckv75E=
	sha1:/AMkonSNBsY46iB09kduZ38h2qE= sha256:r2m6+uLLcm2H8BO2KAtZW/Oyj1+5bC2gAxcubF6Vs/M=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id DB778125EB1; Thu, 26 Nov 2026 06:33:20 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -2.051
X-Spam-Status: No, score=-2.051 tagged_above=-9999 required=6.31
	tests=[DCC_CHECK=1.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=realtek.com
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id GVV1z9LuMWW8;
	Thu, 26 Nov 2026 06:33:13 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-371847-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=realtek.com
X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
	by mail.dewy.ru (Postfix) with ESMTPS id 706F0125EAD; Thu, 26 Nov 2026 06:33:04 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sto.lore.kernel.org (Postfix) with ESMTP id 70DE86039A3; Thu, 26 Nov 2026 03:33:03 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1795663981;
	b=RB4tFEaj1ttzVyu98Xe/ZU0YHxMXE8V1WG3DxgcW2ka+KUAa+Grfdiso7GVieIqvWMG9
	 FFZ6D9ey6MeHky8seafOrJitVqvlsQN5Ed9bzy0xVMFzYfKpi/uPolbldlYH7Pzkhbc92
	 XBp8BQHCXn1x7rBs/0y09TF+YMv4fw1NCOg6KN/00M9EJkq6O6UZ5chvCLh6j29TB9WvI
	 nRB81wK/rZpAtu3l+OOmzUkIoxsca8IdYm6LJAVxa2GN6/8hnIsbpL7Mbc7K+O5XOvTxH
	 PRq23H6CmTpe00PsvAuq0oPG5v0ZQOJF76k4NGH9qMeJ2WuzJsSb3kVDEtLtfqdCT8w==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795663981;
	h=X-Original-To:Received:DMARC-Filter:X-SpamFilter-By:DKIM-Signature:
	 Received:Received:Received:From:To:CC:Subject:Date:Message-ID:
	 X-Mailer:In-Reply-To:References:X-Mailing-List:List-Id:List-Post:
	 List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence:
	 MIME-Version:Content-Transfer-Encoding:Content-Type;
	bh=+jN0VcdpvLekZruacmIw0jXDrzU60lSohURpZVwtWFI=;
	b=nYuPbpwdrbEUxjrV7t84vp8U03wwv+lfRn/fkeB+dguCVpOQ02gacckZI2o607VITVGD
	 1Wx9/s5QanpXx9jHKHHr4rJbt5YbfOkW6PYEqQcwpK/Mx7epd6MWNXC5iPVrk2hws0S6I
	 pOe73BguGJnQWn5YU0tiy1xiCLVM6ay3fLgqt2Rqm5YyurlYtgsjcBR6Fl4AIC88Thce+
	 xjio0ZEBxVbgCW93wv0ZNwAseFpsf/ZE2RRx0f0bhOSFlK2Cmlcgj0pKKSohMRqhZdldT
	 vVvJZpoRd1SUVWuX+ktRb9Qt8+499yjJcJGpH+K/R4DmwUOJX4PSAdKfnarnMmPaMkw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=realtek.com header.i=@realtek.com header.a=rsa-sha256 header.s=dkim header.b=STBK5FbN;
	dmarc=pass header.from=realtek.com;
	spf=pass smtp.mailfrom=realtek.com;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id C594A606A687;
	Thu, 26 Nov 2026 03:33:01 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=realtek.com header.i=@realtek.com header.a=rsa-sha256 header.s=dkim header.b=STBK5FbN
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=211.75.126.72
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1795663981;
	b=HRUv+gsyObrIJ/3Irayr3WMiSzp1Udv28y48InLgJgMagleyqPrrPKvNmRLMi5YjgMiI
	 unLcadqozyNAncFbu2nKNCezi9MwPvkb0PI2ANyTLcMmN5Llswdm5GcYxHQQ4aZ5b24Kx
	 Q/XZcNJwM/Y66Pg/bVw/OxiU6BaM5x4q5ATthmvTGeA8ekKEROBGEQc1gy6OQTsj8GxZ9
	 pviVbwNBXWroGznfJ+jZJI6IBx0wklycmizROv+elTaiSHzZK0qzLbOHiqb3ToYj0rQLq
	 3otNpyMFLnA1FveGDp1AANG+MD1RWiRkSGzJCQZ4qLNjYUEX4XJp62R9VDwj7h9/8TQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795663981;
	h=DMARC-Filter:X-SpamFilter-By:DKIM-Signature:Received:Received:
	 Received:From:To:CC:Subject:Date:Message-ID:X-Mailer:In-Reply-To:
	 References:MIME-Version:Content-Transfer-Encoding:Content-Type;
	bh=+jN0VcdpvLekZruacmIw0jXDrzU60lSohURpZVwtWFI=;
	b=dPM7rb+OJNaklMuHVzdE/F8vJ0GE/6xga8IybzaWc669aPcYgJiINl7mxz0tXuaEW+1Z
	 mgq1Iun53WSiBEvwPUNvu3Sdbhf2A5eaw0wbLN+LVHiP7wVEhlNtxjs50wxVPaQKFlN7o
	 kZYQtbg5I6SSnAzKxsgJcmaw5EOUY9d/pvv3mTzm/oTj6NKRWpTkvkUfKK1d2kxqNpEzc
	 uCvons7M0WiRetmnifDWpGHVPmfFVPSmmZMMOoaRAX+k6hu4ttjL1t7Z7y5dnRy3xI2h5
	 YkJyuntOq2MqY4R6P4oPnnaR1zgUcnpe+kQlZ/jtwsTQ8gOxd2Eg/DzH2j2JX9N3WBg==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=realtek.com;
	spf=pass smtp.mailfrom=realtek.com;
	dkim=pass header.d=realtek.com header.i=@realtek.com header.a=rsa-sha256 header.s=dkim header.b=STBK5FbN;
	arc=none smtp.remote-ip=211.75.126.72
X-Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0E8F2606A697;
	Thu, 26 Nov 2026 03:32:59 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 0E8F2606A697
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=realtek.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=realtek.com
X-SpamFilter-By: ArmorX SpamTrap 5.80 with qID 6AQ3WGXd83951801, This message is accepted by code: ctloc85258
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=realtek.com; s=dkim;
	t=1795663936; bh=+jN0VcdpvLekZruacmIw0jXDrzU60lSohURpZVwtWFI=;
	h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:
	 MIME-Version:Content-Transfer-Encoding:Content-Type;
	b=STBK5FbNzJI/f6C03qXxluEtqq6jAS5ua390Kb2j/0Bto5IdkWE3n17++xfzs+fFL
	 iLTod6UtMn5NTENA37rLctZX4MCEqt1bH6yk8Q1FWj24VHQaS5RoofN8IK9plkieud
	 Cjec6y72z5dSZGU+oK0iwfflrPLrMlZzHQg34tWgVEVls5WRT5ArvIuYAze4QZd9H1
	 IcUx/pBVmUYCuPVA6t+EcTj2AvlILFjwwv2JT9T+tMVT7ZC1NVmI0cfOdVuj+EocHT
	 pFw9Vc4np7r4xoboKBttRJyWsZijsJWA2i1LCNzQOcc+iw06STQmau0budwJvFsnGZ
	 mNsi+F9wRHdiw==
X-Received: from mail.realtek.com (rtkexhmbs03.realtek.com.tw[10.21.1.53])
	by rtits2.realtek.com.tw (8.15.2/3.29/5.94) with ESMTPS id 6AQ3WGXd83951801
	(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL);
	Thu, 26 Nov 2026 11:32:16 +0800
X-Received: from RTKEXHMBS06.realtek.com.tw (10.21.1.56) by
 RTKEXHMBS03.realtek.com.tw (10.21.1.53) with Microsoft SMTP Server
 (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.2.2562.56; Thu, 26 Nov 2026 11:32:16 +0800
X-Received: from fc44.realtek.com.tw (172.22.241.7) by
 RTKEXHMBS06.realtek.com.tw (10.21.1.56) with Microsoft SMTP Server id
 15.2.2562.56 via Frontend Transport; Thu, 26 Nov 2026 11:32:16 +0800
X-CC: <netdev@vger.kernel.org>, <nic_swsd@realtek.com>,
	<linux-kernel@vger.kernel.org>, <linux-usb@vger.kernel.org>,
	<edumazet@google.com>, <bjorn@mork.no>, <pabeni@redhat.com>,
	<hsu.chih.kai@realtek.com>, <andrew+netdev@lunn.ch>, <mail@birger-koblitz.de>
X-Mailer: git-send-email 2.54.0
X-In-Reply-To: <20261126033211.51850-1-nic_swsd@realtek.com>
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list