From c4085b6ce2a05d3f47b10e49520396800621c1bb Mon Sep 17 00:00:00 2001 From: Jack Pham Date: Fri, 17 Aug 2018 10:52:17 -0700 Subject: [PATCH] usb: pd: Don't reject sink request based on max current A fixed sink PDO request includes both operating current and max current. Although the max current requested may be greater than the available source advertisement, as per spec only the operating current request needs to be considered. The sink will likely have also set the Capability Mismatch bit as well. Hence, don't reject the request otherwise the sink will keep re-requesting and never enter a contract. Change-Id: Ia15e2e17abe43f2bcbc1fe7011b70ab0e0f5d9eb Signed-off-by: Jack Pham --- drivers/usb/pd/policy_engine.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/pd/policy_engine.c b/drivers/usb/pd/policy_engine.c index a2cb7147a8ee..540498548978 100644 --- a/drivers/usb/pd/policy_engine.c +++ b/drivers/usb/pd/policy_engine.c @@ -1113,8 +1113,6 @@ static void usbpd_set_state(struct usbpd *pd, enum usbpd_state next_state) case PE_SRC_NEGOTIATE_CAPABILITY: if (PD_RDO_OBJ_POS(pd->rdo) != 1 || PD_RDO_FIXED_CURR(pd->rdo) > - PD_SRC_PDO_FIXED_MAX_CURR(*default_src_caps) || - PD_RDO_FIXED_CURR_MINMAX(pd->rdo) > PD_SRC_PDO_FIXED_MAX_CURR(*default_src_caps)) { /* send Reject */ ret = pd_send_msg(pd, MSG_REJECT, NULL, 0, SOP_MSG);