Patch "usb: typec: ucsi: glink: fix off-by-one in connector_status" has been added to the 6.6-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

    usb: typec: ucsi: glink: fix off-by-one in connector_status

to the 6.6-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:
     usb-typec-ucsi-glink-fix-off-by-one-in-connector_sta.patch
and it can be found in the queue-6.6 subdirectory.

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



commit a133c18476098231cc3f082a93437920cc6dde7d
Author: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx>
Date:   Sat Nov 9 02:04:14 2024 +0200

    usb: typec: ucsi: glink: fix off-by-one in connector_status
    
    [ Upstream commit 4a22918810980897393fa1776ea3877e4baf8cca ]
    
    UCSI connector's indices start from 1 up to 3, PMIC_GLINK_MAX_PORTS.
    Correct the condition in the pmic_glink_ucsi_connector_status()
    callback, fixing Type-C orientation reporting for the third USB-C
    connector.
    
    Fixes: 76716fd5bf09 ("usb: typec: ucsi: glink: move GPIO reading into connector_status callback")
    Cc: stable@xxxxxxxxxxxxxxx
    Reported-by: Abel Vesa <abel.vesa@xxxxxxxxxx>
    Reviewed-by: Neil Armstrong <neil.armstrong@xxxxxxxxxx>
    Reviewed-by: Johan Hovold <johan+linaro@xxxxxxxxxx>
    Tested-by: Johan Hovold <johan+linaro@xxxxxxxxxx>
    Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20241109-ucsi-glue-fixes-v2-1-8b21ff4f9fbe@xxxxxxxxxx
    Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/usb/typec/ucsi/ucsi_glink.c b/drivers/usb/typec/ucsi/ucsi_glink.c
index f0b4d0a4bb19..82a1081d44f1 100644
--- a/drivers/usb/typec/ucsi/ucsi_glink.c
+++ b/drivers/usb/typec/ucsi/ucsi_glink.c
@@ -202,7 +202,7 @@ static void pmic_glink_ucsi_connector_status(struct ucsi_connector *con)
 	struct pmic_glink_ucsi *ucsi = ucsi_get_drvdata(con->ucsi);
 	int orientation;
 
-	if (con->num >= PMIC_GLINK_MAX_PORTS ||
+	if (con->num > PMIC_GLINK_MAX_PORTS ||
 	    !ucsi->port_orientation[con->num - 1])
 		return;
 




[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