Patch "ionic: use ee->offset when returning sprom data" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ionic: use ee->offset when returning sprom data

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     ionic-use-ee-offset-when-returning-sprom-data.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit e37a88561309d7d35a024ae330f604acabe6bd4d
Author: Shannon Nelson <shannon.nelson@xxxxxxx>
Date:   Thu Dec 12 13:31:57 2024 -0800

    ionic: use ee->offset when returning sprom data
    
    [ Upstream commit b096d62ba1323391b2db98b7704e2468cf3b1588 ]
    
    Some calls into ionic_get_module_eeprom() don't use a single
    full buffer size, but instead multiple calls with an offset.
    Teach our driver to use the offset correctly so we can
    respond appropriately to the caller.
    
    Fixes: 4d03e00a2140 ("ionic: Add initial ethtool support")
    Signed-off-by: Shannon Nelson <shannon.nelson@xxxxxxx>
    Reviewed-by: Jacob Keller <jacob.e.keller@xxxxxxxxx>
    Link: https://patch.msgid.link/20241212213157.12212-4-shannon.nelson@xxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c
index d7370fb60a16..928ef2933990 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c
@@ -828,8 +828,8 @@ static int ionic_get_module_eeprom(struct net_device *netdev,
 	len = min_t(u32, sizeof(xcvr->sprom), ee->len);
 
 	do {
-		memcpy(data, xcvr->sprom, len);
-		memcpy(tbuf, xcvr->sprom, len);
+		memcpy(data, &xcvr->sprom[ee->offset], len);
+		memcpy(tbuf, &xcvr->sprom[ee->offset], len);
 
 		/* Let's make sure we got a consistent copy */
 		if (!memcmp(data, tbuf, len))




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux