All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@kernel.org>
To: Christian Marangi <ansuelsmth@gmail.com>
Cc: Felix Fietkau <nbd@nbd.name>,
	 Lorenzo Bianconi <lorenzo@kernel.org>,
	Ryder Lee <ryder.lee@mediatek.com>,
	 Shayne Chen <shayne.chen@mediatek.com>,
	 Sean Wang <sean.wang@mediatek.com>,
	 Matthias Brugger <matthias.bgg@gmail.com>,
	 AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	 Simon Horman <horms@kernel.org>,
	 Alexander Couzens <lynxis@fe80.eu>,
	 Nicolas Cavallari <nicolas.cavallari@green-communications.fr>,
	 Daniel Golle <daniel@makrotopia.org>,
	 linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
	 linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org,  stable@vger.kernel.org
Subject: Re: [net-next RFC PATCH 1/6] wifi: mt76: fix broken precal loading from MTD for mt7915
Date: Wed, 18 Oct 2023 09:10:07 +0300	[thread overview]
Message-ID: <87a5sgea0w.fsf@kernel.org> (raw)
In-Reply-To: <20231017190510.27163-1-ansuelsmth@gmail.com> (Christian Marangi's message of "Tue, 17 Oct 2023 21:05:05 +0200")

Christian Marangi <ansuelsmth@gmail.com> writes:

> Commit 495184ac91bb ("mt76: mt7915: add support for applying
> pre-calibration data") was fundamentally broken and never worked.
>
> The idea (before NVMEM support) was to expand the MTD function and pass
> an additional offset. For normal EEPROM load the offset would always be
> 0. For the purpose of precal loading, an offset was passed that was
> internally the size of EEPROM, since precal data is right after the
> EEPROM.
>
> Problem is that the offset value passed is never handled and is actually
> overwrite by
>
> 	offset = be32_to_cpup(list);
> 	ret = mtd_read(mtd, offset, len, &retlen, eep);
>
> resulting in the passed offset value always ingnored. (and even passing
> garbage data as precal as the start of the EEPROM is getting read)
>
> Fix this by adding to the current offset value, the offset from DT to
> correctly read the piece of data at the requested location.
>
> Cc: stable@vger.kernel.org
> Fixes: 495184ac91bb ("mt76: mt7915: add support for applying pre-calibration data")
> Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>

mt76 patches go to Felix's tree, not net-next.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


WARNING: multiple messages have this Message-ID (diff)
From: Kalle Valo <kvalo@kernel.org>
To: Christian Marangi <ansuelsmth@gmail.com>
Cc: Felix Fietkau <nbd@nbd.name>,
	 Lorenzo Bianconi <lorenzo@kernel.org>,
	Ryder Lee <ryder.lee@mediatek.com>,
	 Shayne Chen <shayne.chen@mediatek.com>,
	 Sean Wang <sean.wang@mediatek.com>,
	 Matthias Brugger <matthias.bgg@gmail.com>,
	 AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	 Simon Horman <horms@kernel.org>,
	 Alexander Couzens <lynxis@fe80.eu>,
	 Nicolas Cavallari <nicolas.cavallari@green-communications.fr>,
	 Daniel Golle <daniel@makrotopia.org>,
	 linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
	 linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org,  stable@vger.kernel.org
Subject: Re: [net-next RFC PATCH 1/6] wifi: mt76: fix broken precal loading from MTD for mt7915
Date: Wed, 18 Oct 2023 09:10:07 +0300	[thread overview]
Message-ID: <87a5sgea0w.fsf@kernel.org> (raw)
In-Reply-To: <20231017190510.27163-1-ansuelsmth@gmail.com> (Christian Marangi's message of "Tue, 17 Oct 2023 21:05:05 +0200")

Christian Marangi <ansuelsmth@gmail.com> writes:

> Commit 495184ac91bb ("mt76: mt7915: add support for applying
> pre-calibration data") was fundamentally broken and never worked.
>
> The idea (before NVMEM support) was to expand the MTD function and pass
> an additional offset. For normal EEPROM load the offset would always be
> 0. For the purpose of precal loading, an offset was passed that was
> internally the size of EEPROM, since precal data is right after the
> EEPROM.
>
> Problem is that the offset value passed is never handled and is actually
> overwrite by
>
> 	offset = be32_to_cpup(list);
> 	ret = mtd_read(mtd, offset, len, &retlen, eep);
>
> resulting in the passed offset value always ingnored. (and even passing
> garbage data as precal as the start of the EEPROM is getting read)
>
> Fix this by adding to the current offset value, the offset from DT to
> correctly read the piece of data at the requested location.
>
> Cc: stable@vger.kernel.org
> Fixes: 495184ac91bb ("mt76: mt7915: add support for applying pre-calibration data")
> Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>

mt76 patches go to Felix's tree, not net-next.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2023-10-18  6:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-17 19:05 [net-next RFC PATCH 1/6] wifi: mt76: fix broken precal loading from MTD for mt7915 Christian Marangi
2023-10-17 19:05 ` Christian Marangi
2023-10-17 19:05 ` [net-next RFC PATCH 2/6] wifi: mt76: fix typo in mt76_get_of_eeprom_from_nvmem function Christian Marangi
2023-10-17 19:05   ` Christian Marangi
2023-10-17 19:05 ` [net-next RFC PATCH 3/6] wifi: mt76: limit support of precal loading for mt7915 to MTD only Christian Marangi
2023-10-17 19:05   ` Christian Marangi
2023-10-17 19:05 ` [net-next RFC PATCH 4/6] wifi: mt76: make mt76_get_of_eeprom static again Christian Marangi
2023-10-17 19:05   ` Christian Marangi
2023-10-17 19:05 ` [net-next RFC PATCH 5/6] wifi: mt76: permit to use alternative cell name to eeprom NVMEM load Christian Marangi
2023-10-17 19:05   ` Christian Marangi
2023-10-17 19:05 ` [net-next RFC PATCH 6/6] wifi: mt76: permit to load precal from NVMEM cell for mt7915 Christian Marangi
2023-10-17 19:05   ` Christian Marangi
2023-10-18  6:10 ` Kalle Valo [this message]
2023-10-18  6:10   ` [net-next RFC PATCH 1/6] wifi: mt76: fix broken precal loading from MTD " Kalle Valo

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=87a5sgea0w.fsf@kernel.org \
    --to=kvalo@kernel.org \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=ansuelsmth@gmail.com \
    --cc=daniel@makrotopia.org \
    --cc=horms@kernel.org \
    --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=lorenzo@kernel.org \
    --cc=lynxis@fe80.eu \
    --cc=matthias.bgg@gmail.com \
    --cc=nbd@nbd.name \
    --cc=nicolas.cavallari@green-communications.fr \
    --cc=ryder.lee@mediatek.com \
    --cc=sean.wang@mediatek.com \
    --cc=shayne.chen@mediatek.com \
    --cc=stable@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.