Message ID | 20240627-piix4-spd-v2-1-617ce47b8ff4@weissschuh.net |
---|---|
State | New |
Headers | show |
Series | i2c: smbus cleanups and SPD support for piix4 | expand |
On 05.07.2024 07:55, Thomas Weißschuh wrote: > Jul 4, 2024 23:57:36 Andi Shyti <andi.shyti@kernel.org>: > >> Hi Thomas, >> >> On Thu, Jun 27, 2024 at 07:48:11PM GMT, Thomas Weißschuh wrote: >>> If there are less than eight slots in total, >>> only probe those. >>> Now the code matches the comment "..., then limit slots to 8". >>> >>> Fixes: 8821c8376993 ("i2c: smbus: Prepare i2c_register_spd for usage on muxed segments") >>> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> >> >> I don't see the need for the Fixes here... was there a bug that >> has been fixed? > > More addresses are probed than are possible. Later in the function there's the following: for (n = 0; n < slot_count && dimm_count; n++) { With dimm_count being decremented with each instantiated DIMM module. If a system has less than 8 slots, then it also has less than 8 modules and we finish once all modules have been instantiated. Having said that I don't see any excess probing. > Which is a change from the old behavior and also > contradicts the comment. > IMO it's a bug. Probably not a big one and I'm not sure if user-observable. > Surely nothing for stable. > > But I'm not hung up on it and will drop that tag in the next revision.
Hi Andi, On 2024-07-05 13:56:24+0000, Andi Shyti wrote: > On Fri, Jul 05, 2024 at 07:55:21AM GMT, Thomas Weißschuh wrote: > > Jul 4, 2024 23:57:36 Andi Shyti <andi.shyti@kernel.org>: > > > On Thu, Jun 27, 2024 at 07:48:11PM GMT, Thomas Weißschuh wrote: > > >> If there are less than eight slots in total, > > >> only probe those. > > >> Now the code matches the comment "..., then limit slots to 8". > > >> > > >> Fixes: 8821c8376993 ("i2c: smbus: Prepare i2c_register_spd for usage on muxed segments") > > >> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> > > > > > > I don't see the need for the Fixes here... was there a bug that > > > has been fixed? > > > > More addresses are probed than are possible. > > Which is a change from the old behavior and also > > contradicts the comment. > > IMO it's a bug. Probably not a big one and I'm not sure if user-observable. > > Surely nothing for stable. > > The Fixes tag means that you want the patch to be backported to > stable kernels. Someone will take the effort of taking all the > new "Fixes:" and port them to older kernels. It's my understanding that a Fixes tag itself is not enough for the stable process. For that it also needs a "Cc: stable@vger.kernel.org" in the patch or explicit notification of the stable team. (Or being picked up by Autosel) Anyways, I'll squash the commits and drop the Fixes tat, as there was no bug as pointed out by Heiner. > We want this when patches fix crashes, deadlocks, memory leaks, > security holes, misbehaviours, earthquakes and floodings. > > Andi > > > But I'm not hung up on it and will drop that tag in the next revision.
diff --git a/drivers/i2c/i2c-smbus.c b/drivers/i2c/i2c-smbus.c index f809f0ef2004..8f0403652606 100644 --- a/drivers/i2c/i2c-smbus.c +++ b/drivers/i2c/i2c-smbus.c @@ -356,7 +356,7 @@ void i2c_register_spd(struct i2c_adapter *adap) * as this is the max number of SPD EEPROMs that can be addressed per bus. */ if (i2c_parent_is_i2c_adapter(adap)) { - slot_count = 8; + slot_count = min(slot_count, 8); } else { if (slot_count > 8) { dev_warn(&adap->dev,
If there are less than eight slots in total, only probe those. Now the code matches the comment "..., then limit slots to 8". Fixes: 8821c8376993 ("i2c: smbus: Prepare i2c_register_spd for usage on muxed segments") Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> --- drivers/i2c/i2c-smbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)