From: Hayes Wang <hayeswang@realtek.com>
To: Marek Szyprowski <m.szyprowski@samsung.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Cc: nic_swsd <nic_swsd@realtek.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"pmalani@chromium.org" <pmalani@chromium.org>,
"grundler@chromium.org" <grundler@chromium.org>,
"'Linux Samsung SOC'" <linux-samsung-soc@vger.kernel.org>,
Krzysztof Kozlowski <krzk@kernel.org>
Subject: RE: [PATCH net-next] r8152: support request_firmware for RTL8153
Date: Wed, 23 Oct 2019 09:48:28 +0000 [thread overview]
Message-ID: <0835B3720019904CB8F7AA43166CEEB2F18ED3FA@RTITMBSVM03.realtek.com.tw> (raw)
In-Reply-To: <44261242-ff44-0067-bbb9-2241e400ad53@samsung.com>
Marek Szyprowski [mailto:m.szyprowski@samsung.com]
> Sent: Wednesday, October 23, 2019 5:17 PM
> Subject: Re: [PATCH net-next] r8152: support request_firmware for RTL8153
>
> Hi Hayes,
>
> On 16.10.2019 05:02, Hayes Wang wrote:
> > This patch supports loading additional firmware file through
> > request_firmware().
> >
> > A firmware file may include a header followed by several blocks
> > which have different types of firmware. Currently, the supported
> > types are RTL_FW_END, RTL_FW_PLA, and RTL_FW_USB.
> >
> > The firmware is used to fix some compatible or hardware issues. For
> > example, the device couldn't be found after rebooting several times.
> >
> > The supported chips are
> > RTL_VER_04 (rtl8153a-2.fw)
> > RTL_VER_05 (rtl8153a-3.fw)
> > RTL_VER_06 (rtl8153a-4.fw)
> > RTL_VER_09 (rtl8153b-2.fw)
> >
> > Signed-off-by: Hayes Wang <hayeswang@realtek.com>
> > Reviewed-by: Prashant Malani <pmalani@chromium.org>
>
> This patch (which landed in linux-next last days) causes a following
> kernel oops on the ARM 32bit Exynos5422 SoC based Odroid XU4 board:
Please try the following patch.
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index d3c30ccc8577..283b35a76cf0 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -4000,8 +4000,8 @@ static void rtl8152_fw_mac_apply(struct r8152 *tp, struct fw_mac *mac)
static void rtl8152_apply_firmware(struct r8152 *tp)
{
struct rtl_fw *rtl_fw = &tp->rtl_fw;
- const struct firmware *fw = rtl_fw->fw;
- struct fw_header *fw_hdr = (struct fw_header *)fw->data;
+ const struct firmware *fw;
+ struct fw_header *fw_hdr;
struct fw_phy_patch_key *key;
u16 key_addr = 0;
int i;
@@ -4009,6 +4009,9 @@ static void rtl8152_apply_firmware(struct r8152 *tp)
if (IS_ERR_OR_NULL(rtl_fw->fw))
return;
+ fw = rtl_fw->fw;
+ fw_hdr = (struct fw_header *)fw->data;
+
if (rtl_fw->pre_fw)
rtl_fw->pre_fw(tp);
> > +static void rtl8152_apply_firmware(struct r8152 *tp)
> > +{
> > + struct rtl_fw *rtl_fw = &tp->rtl_fw;
> > + const struct firmware *fw = rtl_fw->fw;
> > + struct fw_header *fw_hdr = (struct fw_header *)fw->data;
> > + int i;
> > +
> > + if (IS_ERR_OR_NULL(rtl_fw->fw))
> > + return;
> > +
> > + if (rtl_fw->pre_fw)
> > + rtl_fw->pre_fw(tp);
> > +
Best Regards,
Hayes
next prev parent reply other threads:[~2019-10-23 9:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-16 3:02 [PATCH net-next] r8152: support request_firmware for RTL8153 Hayes Wang
2019-10-16 18:31 ` David Miller
[not found] ` <CGME20191023091648eucas1p12dcc4e9041169e3c7ae43f4ea525dd7f@eucas1p1.samsung.com>
2019-10-23 9:16 ` Marek Szyprowski
2019-10-23 9:48 ` Hayes Wang [this message]
2019-10-23 10:22 ` Marek Szyprowski
2019-10-23 11:52 ` Hayes Wang
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=0835B3720019904CB8F7AA43166CEEB2F18ED3FA@RTITMBSVM03.realtek.com.tw \
--to=hayeswang@realtek.com \
--cc=grundler@chromium.org \
--cc=krzk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=netdev@vger.kernel.org \
--cc=nic_swsd@realtek.com \
--cc=pmalani@chromium.org \
/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;
as well as URLs for NNTP newsgroup(s).