2022-09-27 16:36:36

by Andy Shevchenko

[permalink] [raw]
Subject: [PATCH v2 0/2] usb: dwc3: revert OTG changes for Intel Merrifield

As agreed with the author, the v5.19 change is going to be reverted by
this series, so we will collaborate on a new one in the future that
brings no regressions.

Changelog v2:
- added Cc: stable@ and Fixes tags (Greg)
- rewritten cover letter to point out what the version is touched and
what the decision made with the author of the original change (Greg)
- fixed the placement of one piece of code (Andrey)
- added Tested-by tags (Ferry)

Andy Shevchenko (2):
Revert "USB: fixup for merge issue with "usb: dwc3: Don't switch OTG
-> peripheral if extcon is present""
Revert "usb: dwc3: Don't switch OTG -> peripheral if extcon is
present"

drivers/usb/dwc3/core.c | 50 +----------------------------------------
drivers/usb/dwc3/drd.c | 50 +++++++++++++++++++++++++++++++++++++++++
2 files changed, 51 insertions(+), 49 deletions(-)

--
2.35.1


2022-09-27 17:19:26

by Andy Shevchenko

[permalink] [raw]
Subject: [PATCH v2 1/2] Revert "USB: fixup for merge issue with "usb: dwc3: Don't switch OTG -> peripheral if extcon is present""

This reverts commit 8bd6b8c4b1009d7d2662138d6bdc6fe58a9274c5.

Prerequisite revert for the reverting of the original commit 0f0101719138.

Fixes: 8bd6b8c4b100 ("USB: fixup for merge issue with "usb: dwc3: Don't switch OTG -> peripheral if extcon is present"")
Fixes: 0f0101719138 ("usb: dwc3: Don't switch OTG -> peripheral if extcon is present")
Reported-by: Ferry Toth <[email protected]>
Cc: [email protected]
Signed-off-by: Andy Shevchenko <[email protected]>
Tested-by: Ferry Toth <[email protected]> # for Merrifield
---
drivers/usb/dwc3/core.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index d0237b30c9be..c2b463469d51 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -1684,8 +1684,13 @@ static struct extcon_dev *dwc3_get_extcon(struct dwc3 *dwc)
* This device property is for kernel internal use only and
* is expected to be set by the glue code.
*/
- if (device_property_read_string(dev, "linux,extcon-name", &name) == 0)
- return extcon_get_extcon_dev(name);
+ if (device_property_read_string(dev, "linux,extcon-name", &name) == 0) {
+ edev = extcon_get_extcon_dev(name);
+ if (!edev)
+ return ERR_PTR(-EPROBE_DEFER);
+
+ return edev;
+ }

/*
* Try to get an extcon device from the USB PHY controller's "port"
--
2.35.1

2022-10-17 21:41:50

by Andrey Smirnov

[permalink] [raw]
Subject: Re: [PATCH v2 0/2] usb: dwc3: revert OTG changes for Intel Merrifield

On Tue, Sep 27, 2022 at 8:53 AM Andy Shevchenko
<[email protected]> wrote:
>
> As agreed with the author, the v5.19 change is going to be reverted by
> this series, so we will collaborate on a new one in the future that
> brings no regressions.
>
> Changelog v2:
> - added Cc: stable@ and Fixes tags (Greg)
> - rewritten cover letter to point out what the version is touched and
> what the decision made with the author of the original change (Greg)
> - fixed the placement of one piece of code (Andrey)
> - added Tested-by tags (Ferry)
>
> Andy Shevchenko (2):
> Revert "USB: fixup for merge issue with "usb: dwc3: Don't switch OTG
> -> peripheral if extcon is present""
> Revert "usb: dwc3: Don't switch OTG -> peripheral if extcon is
> present"
>

To spare everyone the need to read extra long thread in
[PATCH v2 2/2] Revert "usb: dwc3: Don't switch OTG -> peripheral if
extcon is present"

NAK, on the whole series. The regression doesn't repro on my
Edison/Merriefield setup and doesn't repro on the original reporter's
HW with my build, so it's very much unclear what's going on and what
the problem is and until it is the revert doesn't seem warranted.
Please don't apply this.

> drivers/usb/dwc3/core.c | 50 +----------------------------------------
> drivers/usb/dwc3/drd.c | 50 +++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 51 insertions(+), 49 deletions(-)
>
> --
> 2.35.1
>

2022-10-17 22:28:47

by Steev Klimaszewski

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] Revert "usb: dwc3: Don't switch OTG -> peripheral if extcon is present"

Hi,

Unfortunately, the reverts have already shown up in 6.0.2. I failed miserably
to reply in the thread correctly, but these broke USB and a few other things on
my Lenovo Yoga C630.

Reverting the reverts gets things working again.

-- steev

2022-10-17 23:01:49

by Thinh Nguyen

[permalink] [raw]
Subject: Re: [PATCH v2 0/2] usb: dwc3: revert OTG changes for Intel Merrifield

On Mon, Oct 17, 2022, Andrey Smirnov wrote:
> On Tue, Sep 27, 2022 at 8:53 AM Andy Shevchenko
> <[email protected]> wrote:
> >
> > As agreed with the author, the v5.19 change is going to be reverted by
> > this series, so we will collaborate on a new one in the future that
> > brings no regressions.
> >
> > Changelog v2:
> > - added Cc: stable@ and Fixes tags (Greg)
> > - rewritten cover letter to point out what the version is touched and
> > what the decision made with the author of the original change (Greg)
> > - fixed the placement of one piece of code (Andrey)
> > - added Tested-by tags (Ferry)
> >
> > Andy Shevchenko (2):
> > Revert "USB: fixup for merge issue with "usb: dwc3: Don't switch OTG
> > -> peripheral if extcon is present""
> > Revert "usb: dwc3: Don't switch OTG -> peripheral if extcon is
> > present"
> >
>
> To spare everyone the need to read extra long thread in
> [PATCH v2 2/2] Revert "usb: dwc3: Don't switch OTG -> peripheral if
> extcon is present"
>
> NAK, on the whole series. The regression doesn't repro on my
> Edison/Merriefield setup and doesn't repro on the original reporter's
> HW with my build, so it's very much unclear what's going on and what
> the problem is and until it is the revert doesn't seem warranted.
> Please don't apply this.
>

Thanks for your tests. The series was already applied. It's a bit messy,
but it seems like we need to revert series as there are already reports
that this it already breaks other setups.

Thanks,
Thinh

2022-10-17 23:48:40

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH v2 0/2] usb: dwc3: revert OTG changes for Intel Merrifield

On Mon, Oct 17, 2022 at 10:22:46PM +0000, Thinh Nguyen wrote:
> On Mon, Oct 17, 2022, Andrey Smirnov wrote:
> > On Tue, Sep 27, 2022 at 8:53 AM Andy Shevchenko
> > <[email protected]> wrote:
> > >
> > > As agreed with the author, the v5.19 change is going to be reverted by
> > > this series, so we will collaborate on a new one in the future that
> > > brings no regressions.
> > >
> > > Changelog v2:
> > > - added Cc: stable@ and Fixes tags (Greg)
> > > - rewritten cover letter to point out what the version is touched and
> > > what the decision made with the author of the original change (Greg)
> > > - fixed the placement of one piece of code (Andrey)
> > > - added Tested-by tags (Ferry)
> > >
> > > Andy Shevchenko (2):
> > > Revert "USB: fixup for merge issue with "usb: dwc3: Don't switch OTG
> > > -> peripheral if extcon is present""
> > > Revert "usb: dwc3: Don't switch OTG -> peripheral if extcon is
> > > present"
> > >
> >
> > To spare everyone the need to read extra long thread in
> > [PATCH v2 2/2] Revert "usb: dwc3: Don't switch OTG -> peripheral if
> > extcon is present"
> >
> > NAK, on the whole series. The regression doesn't repro on my
> > Edison/Merriefield setup and doesn't repro on the original reporter's
> > HW with my build, so it's very much unclear what's going on and what
> > the problem is and until it is the revert doesn't seem warranted.
> > Please don't apply this.
> >
>
> Thanks for your tests. The series was already applied. It's a bit messy,
> but it seems like we need to revert series as there are already reports
> that this it already breaks other setups.

I will prepare a patch to reapply what was before the revert.
Sorry for the mess.

--
With Best Regards,
Andy Shevchenko