Message ID | 20200507004918.25975-2-peter.chen@kernel.org (mailing list archive) |
---|---|
State | Mainlined |
Commit | 91edf63d5022bd0464788ffb4acc3d5febbaf81d |
Headers | show |
Series | usb: chipidea: fixes for v5.7 | expand |
On Thu, May 07, 2020 at 08:49:18AM +0800, Peter Chen wrote: > From: Bryan O'Donoghue <bryan.odonoghue@linaro.org> > > Currently we check to make sure there is no error state on the extcon > handle for VBUS when writing to the HS_PHY_GENCONFIG_2 register. When using > the USB role-switch API we still need to write to this register absent an > extcon handle. > > This patch makes the appropriate update to ensure the write happens if > role-switching is true. > > Fixes: 05559f10ed79 ("usb: chipidea: add role switch class support") > > Cc: Peter Chen <Peter.Chen@nxp.com> No blank line needed, and you can drop your own Cc: in the patch :) I'll edit it by hand... greg k-h
On Thu, May 07, 2020 at 08:49:18AM +0800, Peter Chen wrote: > From: Bryan O'Donoghue <bryan.odonoghue@linaro.org> > > Currently we check to make sure there is no error state on the extcon > handle for VBUS when writing to the HS_PHY_GENCONFIG_2 register. When using > the USB role-switch API we still need to write to this register absent an > extcon handle. > > This patch makes the appropriate update to ensure the write happens if > role-switching is true. > > Fixes: 05559f10ed79 ("usb: chipidea: add role switch class support") This should also go do stable kernels, I'll mark that...
> > On Thu, May 07, 2020 at 08:49:18AM +0800, Peter Chen wrote: > > From: Bryan O'Donoghue <bryan.odonoghue@linaro.org> > > > > Currently we check to make sure there is no error state on the extcon > > handle for VBUS when writing to the HS_PHY_GENCONFIG_2 register. When > > using the USB role-switch API we still need to write to this register > > absent an extcon handle. > > > > This patch makes the appropriate update to ensure the write happens if > > role-switching is true. > > > > Fixes: 05559f10ed79 ("usb: chipidea: add role switch class support") > > This should also go do stable kernels, I'll mark that... Thanks, Greg. Peter
diff --git a/drivers/usb/chipidea/ci_hdrc_msm.c b/drivers/usb/chipidea/ci_hdrc_msm.c index af648ba6544d..46105457e1ca 100644 --- a/drivers/usb/chipidea/ci_hdrc_msm.c +++ b/drivers/usb/chipidea/ci_hdrc_msm.c @@ -114,7 +114,7 @@ static int ci_hdrc_msm_notify_event(struct ci_hdrc *ci, unsigned event) hw_write_id_reg(ci, HS_PHY_GENCONFIG_2, HS_PHY_ULPI_TX_PKT_EN_CLR_FIX, 0); - if (!IS_ERR(ci->platdata->vbus_extcon.edev)) { + if (!IS_ERR(ci->platdata->vbus_extcon.edev) || ci->role_switch) { hw_write_id_reg(ci, HS_PHY_GENCONFIG_2, HS_PHY_SESS_VLD_CTRL_EN, HS_PHY_SESS_VLD_CTRL_EN);