lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170828172322.7166-11-Badhri@google.com>
Date:   Mon, 28 Aug 2017 10:23:22 -0700
From:   Badhri Jagan Sridharan <badhri@...gle.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Guenter Roeck <linux@...ck-us.net>
Cc:     devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
        Badhri Jagan Sridharan <Badhri@...gle.com>
Subject: [PATCH 11/11 v3] staging: typec: tcpm: Switch to PORT_RESET instead of SNK_UNATTACHED

When VBUS is not discovered within PD_T_PS_SOURCE_ON although Rp
is detected on CC, TCPM switches the port to SNK_UNATTACHED
state. SNK_UNATTACHED, however does not force TYPEC_CC_OPEN which
makes the partner(source) to think that it is connected.

To overcome this issue, force the port into PORT_RESET state
to make sure the CC lines are open.

Signed-off-by: Badhri Jagan Sridharan <Badhri@...gle.com>
Reviewed-by: Guenter Roeck <linux@...ck-us.net>
---
Changelog since previous version:
- Only one previous version of the patch was sent.
  Numbering this V3 instead of V2 to keep the sequence
  number in sync with the rest of the patches in the
  patch list.
- added Reviewed-by: Guenter Roeck <linux@...ck-us.net>
- fixed version/sequence numbers

 drivers/staging/typec/tcpm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/typec/tcpm.c b/drivers/staging/typec/tcpm.c
index 9e0111dea7c4..47b8fec5ea36 100644
--- a/drivers/staging/typec/tcpm.c
+++ b/drivers/staging/typec/tcpm.c
@@ -2380,7 +2380,7 @@ static void run_state_machine(struct tcpm_port *port)
 				       0);
 		else
 			/* Wait for VBUS, but not forever */
-			tcpm_set_state(port, SNK_UNATTACHED, PD_T_PS_SOURCE_ON);
+			tcpm_set_state(port, PORT_RESET, PD_T_PS_SOURCE_ON);
 		break;
 
 	case SRC_TRY:
-- 
2.14.1.342.g6490525c54-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ