mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chih Kai Hsu <hsu.chih.kai@realtek.com>
To: <davem@davemloft.net>, <kuba@kernel.org>
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>
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	[thread overview]
Message-ID: <20261126033211.51850-8-nic_swsd@realtek.com> (raw)
In-Reply-To: <20261126033211.51850-1-nic_swsd@realtek.com>

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


  parent reply	other threads:[~2026-11-26  3:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-26  3:31 [PATCH net-next v9 00/12] r8152: refactor and extend RTL8157/8159 support Chih Kai Hsu
2026-11-26  3:32 ` [PATCH net-next v9 01/12] r8152: fix RTL8156/RTL8156B/RTL8157/RTL8159 up and down settings Chih Kai Hsu
2026-11-26  3:32 ` [PATCH net-next v9 02/12] r8152: add rtl8157_unload() for RTL8157 and RTL8159 Chih Kai Hsu
2026-11-26  3:32 ` [PATCH net-next v9 03/12] r8152: add rtl8157_change_mtu() " Chih Kai Hsu
2026-11-26  3:32 ` [PATCH net-next v9 04/12] r8152: fix flow control for RTL8156/RTL8156B/RTL8157/RTL8159 Chih Kai Hsu
2026-11-26  3:32 ` [PATCH net-next v9 05/12] r8152: split r8156_init by generation and factor out wait_autoload_done Chih Kai Hsu
2026-11-26  3:32 ` [PATCH net-next v9 06/12] r8152: add new init writes for RTL8156/8156B/8157/8159 Chih Kai Hsu
2026-11-26  3:32 ` Chih Kai Hsu [this message]
2026-11-26  3:32 ` [PATCH net-next v9 08/12] r8152: split RTL_VER_17 into QFN68 and QFN100 package variants Chih Kai Hsu
2026-11-26  3:32 ` [PATCH net-next v9 09/12] r8152: split rtl8156_enable/up/down into per-generation functions Chih Kai Hsu
2026-11-26  3:32 ` [PATCH net-next v9 10/12] r8152: split r8157_hw_phy_cfg into RTL8157 and RTL8159 variants Chih Kai Hsu
2026-11-26  3:32 ` [PATCH net-next v9 11/12] r8152: add TGPHY register access for RTL8157 and RTL8159 Chih Kai Hsu
2026-11-26  3:32 ` [PATCH net-next v9 12/12] r8152: enable UPS for RTL8157 and RTL8159 QFN68 Chih Kai Hsu
2026-11-26  3:38 ` [PATCH net-next v9 00/12] r8152: refactor and extend RTL8157/8159 support netdev-bot+sinfo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261126033211.51850-8-nic_swsd@realtek.com \
    --to=hsu.chih.kai@realtek.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=bjorn@mork.no \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mail@birger-koblitz.de \
    --cc=netdev@vger.kernel.org \
    --cc=nic_swsd@realtek.com \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®