Patch "net: pse-pd: tps23881: Fix the device ID check" has been added to the 6.10-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

    net: pse-pd: tps23881: Fix the device ID check

to the 6.10-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:
     net-pse-pd-tps23881-fix-the-device-id-check.patch
and it can be found in the queue-6.10 subdirectory.

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



commit 8e55abe94209a3f0f393ba56da6f21124dbbe2dd
Author: Kyle Swenson <kyle.swenson@xxxxxxxx>
Date:   Wed Jul 31 15:42:14 2024 +0000

    net: pse-pd: tps23881: Fix the device ID check
    
    [ Upstream commit 89108cb5c28527c1882df2987394e5c261a1f4aa ]
    
    The DEVID register contains two pieces of information: the device ID in
    the upper nibble, and the silicon revision number in the lower nibble.
    The driver should work fine with any silicon revision, so let's mask
    that out in the device ID check.
    
    Fixes: 20e6d190ffe1 ("net: pse-pd: Add TI TPS23881 PSE controller driver")
    Signed-off-by: Kyle Swenson <kyle.swenson@xxxxxxxx>
    Reviewed-by: Thomas Petazzoni <thomas.petazzoni@xxxxxxxxxxx>
    Acked-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx>
    Link: https://patch.msgid.link/20240731154152.4020668-1-kyle.swenson@xxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/pse-pd/tps23881.c b/drivers/net/pse-pd/tps23881.c
index 98ffbb1bbf13c..e95109c1130dc 100644
--- a/drivers/net/pse-pd/tps23881.c
+++ b/drivers/net/pse-pd/tps23881.c
@@ -29,6 +29,8 @@
 #define TPS23881_REG_TPON	BIT(0)
 #define TPS23881_REG_FWREV	0x41
 #define TPS23881_REG_DEVID	0x43
+#define TPS23881_REG_DEVID_MASK	0xF0
+#define TPS23881_DEVICE_ID	0x02
 #define TPS23881_REG_SRAM_CTRL	0x60
 #define TPS23881_REG_SRAM_DATA	0x61
 
@@ -750,7 +752,7 @@ static int tps23881_i2c_probe(struct i2c_client *client)
 	if (ret < 0)
 		return ret;
 
-	if (ret != 0x22) {
+	if (FIELD_GET(TPS23881_REG_DEVID_MASK, ret) != TPS23881_DEVICE_ID) {
 		dev_err(dev, "Wrong device ID\n");
 		return -ENXIO;
 	}




[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