Message ID | 1671096096-20307-1-git-send-email-u0084500@gmail.com |
---|---|
State | New |
Headers | show |
Series | usb: typec: tcpm: Fix altmode re-registration causes sysfs create fail | expand |
On Thu, Dec 15, 2022 at 12:43:35PM +0100, Greg KH wrote: > On Thu, Dec 15, 2022 at 05:53:44PM +0800, ChiYuan Huang wrote: > > Greg KH <gregkh@linuxfoundation.org> 於 2022年12月15日 週四 下午5:44寫道: > > > > > > On Thu, Dec 15, 2022 at 05:21:36PM +0800, cy_huang wrote: > > > > From: ChiYuan Huang <cy_huang@richtek.com> > > > > > > Why not send directly from this address so we can validate that this is > > > the correct email address of yours? > > > > > It's the company mailbox policy. To send the external mail, there's > > the security text block at the bottom. > > Except this, some mail address are also blocked. To avoid this, I use > > my personal mail to send the patch > > and leave the SoB for the Richtek mailbox. > > It's lazy to fight for this. > > Please fix it, otherwise your company's email address will be spoofed > and people can claim to be sending changes from their domain. > > Please fix that up, abusing random gmail addresses like this is not ok, > sorry. Thanks for your comment. After the work with MIS for several weeks, we finnaly got one way to do it. But I'm not sure all mail account can receive the mail. If anyone cannot receive the mail, please inform me. ChiYuan Huang. > > greg k-h ************* Email Confidentiality Notice ******************** The information contained in this e-mail message (including any attachments) may be confidential, proprietary, privileged, or otherwise exempt from disclosure under applicable laws. It is intended to be conveyed only to the designated recipient(s). Any use, dissemination, distribution, printing, retaining or copying of this e-mail (including its attachments) by unintended recipient(s) is strictly prohibited and may be unlawful. If you are not an intended recipient of this e-mail, or believe that you have received this e-mail in error, please notify the sender immediately (by replying to this e-mail), delete any and all copies of this e-mail (including any attachments) from your system, and do not disclose the content of this e-mail to any other person. Thank you!
On Mon, Jan 09, 2023 at 09:41:23AM +0800, ChiYuan Huang wrote: > ************* Email Confidentiality Notice ******************** > > The information contained in this e-mail message (including any attachments) may be confidential, proprietary, privileged, or otherwise exempt from disclosure under applicable laws. It is intended to be conveyed only to the designated recipient(s). Any use, dissemination, distribution, printing, retaining or copying of this e-mail (including its attachments) by unintended recipient(s) is strictly prohibited and may be unlawful. If you are not an intended recipient of this e-mail, or believe that you have received this e-mail in error, please notify the sender immediately (by replying to this e-mail), delete any and all copies of this e-mail (including any attachments) from your system, and do not disclose the content of this e-mail to any other person. Thank you! Now deleted. For obvious reasons, this wording is not compatible with kernel development :(
diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c index 904c7b4..59b366b 100644 --- a/drivers/usb/typec/tcpm/tcpm.c +++ b/drivers/usb/typec/tcpm/tcpm.c @@ -4594,14 +4594,13 @@ static void run_state_machine(struct tcpm_port *port) tcpm_set_state(port, ready_state(port), 0); break; case DR_SWAP_CHANGE_DR: - if (port->data_role == TYPEC_HOST) { - tcpm_unregister_altmodes(port); + tcpm_unregister_altmodes(port); + if (port->data_role == TYPEC_HOST) tcpm_set_roles(port, true, port->pwr_role, TYPEC_DEVICE); - } else { + else tcpm_set_roles(port, true, port->pwr_role, TYPEC_HOST); - } tcpm_ams_finish(port); tcpm_set_state(port, ready_state(port), 0); break;