From: Shuah Khan <skhan@linuxfoundation.org>
To: Eric Biggers <ebiggers@kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Mario Limonciello <mario.limonciello@amd.com>
Cc: "Matthew Schwartz" <matthew.schwartz@linux.dev>,
"Thomas Weißschuh" <linux@weissschuh.net>,
"Mikhail Gavrilov" <mikhail.v.gavrilov@gmail.com>,
"Mario Limonciello" <superm1@kernel.org>,
"Johannes Berg" <johannes@sipsolutions.net>,
quan.zhou@mediatek.com, "Felix Fietkau" <nbd@nbd.name>,
lorenzo@kernel.org, ryder.lee@mediatek.com,
linux-wireless@vger.kernel.org,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
"Linux ARM" <linux-arm-kernel@lists.infradead.org>,
linux-mediatek@lists.infradead.org, shuah <shuah@kernel.org>
Subject: Re: Linux 6.19-rc1 mediatek mt7921e broke badly
Date: Wed, 31 Dec 2025 14:08:29 -0700 [thread overview]
Message-ID: <8b3d207c-76a2-4312-a149-724e55fbd0cb@linuxfoundation.org> (raw)
In-Reply-To: <30d14c51-3325-49be-9510-43f4661ff6c4@linuxfoundation.org>
On 12/30/25 21:07, Shuah Khan wrote:
> On 12/30/25 21:00, Shuah Khan wrote:
>> On 12/30/25 18:57, Eric Biggers wrote:
>>> On Tue, Dec 30, 2025 at 05:27:13PM -0800, Linus Torvalds wrote:
>>>> On Tue, 30 Dec 2025 at 15:57, Shuah Khan <skhan@linuxfoundation.org> wrote:
>>>>>
>>>>> I would recommend reverting f804a5895eba instead of trying
>>>>> fix it. Then find a better way to eliminate extra newline that
>>>>> shows up in dmesg when firmware build date happens to have
>>>>> a newline.
>>>>
>>>> Yeah. Let's revert it.
>>>>
>>>> And the way to fix the extra newline is trivial: just remove it from
>>>> the "dev_info()" format string.
>>>>
>>>> Our kernel printing logic will add a newline for the next line anyway
>>>> if it is missing (unless somebody explicitly uses PR_CONT).
>>>>
>>>> Can whoever saw the problem confirm that just a revert and a "remove
>>>> \n from that dev_info()" fixes the output for them?
>>>
>>> That works for me. The revert by itself makes the FORTIFY_SOURCE crash
>>> go away and reintroduces a blank line in the log. Removing the \n from
>>> the string passed to dev_info as well makes the blank line go away.
>>>
>>
>> I just sent the revert. I will try removing \n from dev_info()
>> later on tomorrow.
>>
>> My quick trial still showed extra line which didn't make sense
>> to me. More trials have to wait for tomorrow.
>>
>
> Hmm - there are 3 places that print build_date in mt76_connac2_load_ram()
>
> 3022 dev_info(dev->dev, "WM Firmware Version: %.10s, Build Time: %.15s\n ",
> 3023 hdr->fw_ver, hdr->build_date);
>
>
> 3051 dev_info(dev->dev, "WA Firmware Version: %.10s, Build Time: %.15s\n ",
> 3052 hdr->fw_ver, hdr->build_date);
>
> 3127 dev_info(dev->dev, "HW/SW Version: 0x%x, Build Time: %.16s\n",
> 3128 be32_to_cpu(hdr->hw_sw_ver), hdr->build_date);
>
> The last one prints %.16s and other two do %.15s - is the fix simply
> changing last one on line 3127 to print %.15s - this avoids printing
> the extra \n?
>
The following change fixed the blank line problem on my system.
Mario, if you want to send this patch after testing on your system,
let me know. Otherwise I will send it.
==============================================
diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
index fba7025ffd3f..0457712286d5 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
@@ -3019,7 +3019,7 @@ int mt76_connac2_load_ram(struct mt76_dev *dev, const char *fw_wm,
}
hdr = (const void *)(fw->data + fw->size - sizeof(*hdr));
- dev_info(dev->dev, "WM Firmware Version: %.10s, Build Time: %.15s\n",
+ dev_info(dev->dev, "WM Firmware Version: %.10s, Build Time: %.15s",
hdr->fw_ver, hdr->build_date);
ret = mt76_connac_mcu_send_ram_firmware(dev, hdr, fw->data, false);
@@ -3048,7 +3048,7 @@ int mt76_connac2_load_ram(struct mt76_dev *dev, const char *fw_wm,
}
hdr = (const void *)(fw->data + fw->size - sizeof(*hdr));
- dev_info(dev->dev, "WA Firmware Version: %.10s, Build Time: %.15s\n",
+ dev_info(dev->dev, "WA Firmware Version: %.10s, Build Time: %.15s",
hdr->fw_ver, hdr->build_date);
ret = mt76_connac_mcu_send_ram_firmware(dev, hdr, fw->data, true);
@@ -3124,7 +3124,7 @@ int mt76_connac2_load_patch(struct mt76_dev *dev, const char *fw_name)
}
hdr = (const void *)fw->data;
- dev_info(dev->dev, "HW/SW Version: 0x%x, Build Time: %.16s\n",
+ dev_info(dev->dev, "HW/SW Version: 0x%x, Build Time: %.16s",
be32_to_cpu(hdr->hw_sw_ver), hdr->build_date);
for (i = 0; i < be32_to_cpu(hdr->desc.n_region); i++) {
========================================
thanks,
-- Shuah
next prev parent reply other threads:[~2025-12-31 21:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-27 9:07 Linux 6.19-rc1 mediatek mt7921e broke badly Shuah Khan
2025-12-27 12:25 ` Thomas Weißschuh
2025-12-30 0:41 ` Linus Torvalds
2025-12-30 4:21 ` Matthew Schwartz
2025-12-30 23:57 ` Shuah Khan
2025-12-31 1:27 ` Linus Torvalds
2025-12-31 1:57 ` Eric Biggers
2025-12-31 4:00 ` Shuah Khan
2025-12-31 4:07 ` Shuah Khan
2025-12-31 21:08 ` Shuah Khan [this message]
2025-12-31 10:36 ` Thomas Weißschuh
2025-12-31 16:21 ` Shuah Khan
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=8b3d207c-76a2-4312-a149-724e55fbd0cb@linuxfoundation.org \
--to=skhan@linuxfoundation.org \
--cc=ebiggers@kernel.org \
--cc=johannes@sipsolutions.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linux@weissschuh.net \
--cc=lorenzo@kernel.org \
--cc=mario.limonciello@amd.com \
--cc=matthew.schwartz@linux.dev \
--cc=mikhail.v.gavrilov@gmail.com \
--cc=nbd@nbd.name \
--cc=quan.zhou@mediatek.com \
--cc=ryder.lee@mediatek.com \
--cc=shuah@kernel.org \
--cc=superm1@kernel.org \
--cc=torvalds@linux-foundation.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