All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ferry Toth <fntoth@gmail.com>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: Andrey Smirnov <andrew.smirnov@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Felipe Balbi <balbi@kernel.org>,
	Thinh Nguyen <thinhn@synopsys.com>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Subject: Re: [PATCH v4] usb: dwc3: Don't switch OTG -> peripheral if extcon is present
Date: Thu, 22 Sep 2022 22:35:14 +0200	[thread overview]
Message-ID: <580eb9fe-db26-ddd4-6368-c763bb4ebdba@gmail.com> (raw)
In-Reply-To: <YyxjJxnbhroflkH6@smile.fi.intel.com>

Hi,

Op 22-09-2022 om 15:29 schreef Andy Shevchenko:
> On Thu, Sep 22, 2022 at 12:23:04PM +0200, Ferry Toth wrote:
>> On 22-09-2022 12:08, Andy Shevchenko wrote:
>>> On Sun, Apr 03, 2022 at 09:49:07AM -0700, Andrey Smirnov wrote:
>>>> If the extcon device exists, get the mode from the extcon device. If
>>>> the controller is DRD and the driver is unable to determine the mode,
>>>> only then default the dr_mode to USB_DR_MODE_PERIPHERAL.
>>> According to Ferry (Cc'ed) this broke Intel Merrifield platform. Ferry, can you
>>> share bisect log?
git bisect start
# bad: [3d7cb6b04c3f3115719235cc6866b10326de34cd] Linux 5.19
git bisect bad 3d7cb6b04c3f3115719235cc6866b10326de34cd
# good: [4b0986a3613c92f4ec1bdc7f60ec66fea135991f] Linux 5.18
git bisect good 4b0986a3613c92f4ec1bdc7f60ec66fea135991f
# good: [c011dd537ffe47462051930413fed07dbdc80313] Merge tag 
'arm-soc-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
git bisect good c011dd537ffe47462051930413fed07dbdc80313
# good: [5d4af9c1f04ab0411ba5818baad9a68e87f33099] Merge branch 
'mv88e6xxx-fixes-for-reading-serdes-state'
git bisect good 5d4af9c1f04ab0411ba5818baad9a68e87f33099
# bad: [7a68065eb9cd194cf03f135c9211eeb2d5c4c0a0] Merge tag 
'gpio-fixes-for-v5.19-rc2' of 
git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux
git bisect bad 7a68065eb9cd194cf03f135c9211eeb2d5c4c0a0
# bad: [54c2cc79194c961a213c1d375fe3aa4165664cc4] Merge tag 
'usb-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
git bisect bad 54c2cc79194c961a213c1d375fe3aa4165664cc4
# good: [6a31a95135da0bb2c5349e49e37d76e9909ab7ea] staging: r8188eu: 
remove include/rtw_debug.h
git bisect good 6a31a95135da0bb2c5349e49e37d76e9909ab7ea
# good: [04d93b2b8bc7a68ec45a6a156f34a611ede5aa60] Merge tag 
'spdx-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx
git bisect good 04d93b2b8bc7a68ec45a6a156f34a611ede5aa60
# good: [c069d2756c01ed36121fae6a42c14fdf1325c71d] serial: sifive: 
Sanitize CSIZE and c_iflag
git bisect good c069d2756c01ed36121fae6a42c14fdf1325c71d
# bad: [3120aac6d0ecd9accf56894aeac0e265f74d3d5a] usb: dwc2: gadget: 
don't reset gadget's driver->bus
git bisect bad 3120aac6d0ecd9accf56894aeac0e265f74d3d5a
# bad: [0f01017191384e3962fa31520a9fd9846c3d352f] usb: dwc3: Don't 
switch OTG -> peripheral if extcon is present
git bisect bad 0f01017191384e3962fa31520a9fd9846c3d352f
# good: [b8a19881337678c02bb3d72ae821602e1a4c377d] usb: gadget: u_audio: 
clean up some inconsistent indenting
git bisect good b8a19881337678c02bb3d72ae821602e1a4c377d
# good: [424bef51fa530389b0b9008c9e144e40c10e8458] usb: musb: Fix 
missing of_node_put() in omap2430_probe
git bisect good 424bef51fa530389b0b9008c9e144e40c10e8458

>>> I can but not right now. But what I did was bisect between 5.18.0 (good) and
>>> 5.19.0 (bad) then when I got near the culprit (~20 remaining) based on the
>>> commit message I tried 0f01017191384e3962fa31520a9fd9846c3d352f "usb: dwc3:
>>> Don't switch OTG -> peripheral if extcon is present" (bad) and commit before
>>> that (good).
5c29e864999763baec9eedb9ea5bd557aa4cbd77
>>> The effect of the patch is that on Merrifield (I tested with Intel Edison
>>> Arduino board which has a HW switch to select between host and device mode)
>>> device mode works but in host mode USB is completely not working.
>>>
>>> Currently on host mode - when working - superfluous error messages from
>>> tusb1210 appear. When host mode is not working there are no tusb1210
>>> messages in the logs / on the console at all. Seemingly tusb1210 is not
>>> probed, which points in the direction of a relation to extcon.
>>>
>>> Taking into account the late cycle, I would like to revert the change. And
>>> Ferry and I would help to test any other (non-regressive) approach).
>> I have not yet tested if a simple revert fixes the problem but will tonight.
> For clean revert you might need to revert the merge conflict fixes first:
> 8bd6b8c4b100 ("USB: fixup for merge issue with "usb: dwc3: Don't switch
> OTG -> peripheral if extcon is present"").

Tested successfully on Intel Merrifield with v6.0-rc6 with reverted:

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

0f010171 ("usb: dwc3: Don't switch OTG -> peripheral if extcon is present")

I also tested on v5.19 which in addition requires a back port of

d4a0a189 ("phy: ti: tusb1210: Don't check for write errors when powering 
on")

>> I would be happy to test other approaches too.

  reply	other threads:[~2022-09-22 20:35 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-03 16:49 [PATCH v4] usb: dwc3: Don't switch OTG -> peripheral if extcon is present Andrey Smirnov
2022-09-22 10:08 ` Andy Shevchenko
2022-09-22 14:30   ` Ferry Toth
     [not found]   ` <691c3073-5105-9a2b-e6f2-ea0a4b8aaea8@gmail.com>
2022-09-22 13:29     ` Andy Shevchenko
2022-09-22 20:35       ` Ferry Toth [this message]
2022-09-22 23:32     ` Andrey Smirnov
2022-09-23 16:42       ` Andy Shevchenko
2022-09-23 18:23         ` Andrey Smirnov
2022-09-23 18:35           ` Sven Peter
2022-09-23 18:58             ` Andy Shevchenko
2022-09-24  1:07               ` Andrey Smirnov
2022-09-23 18:54           ` Andy Shevchenko
2022-09-24  1:27             ` Andrey Smirnov
2022-09-24 11:55               ` Ferry Toth
2022-09-23 20:10           ` Ferry Toth
2022-09-24 21:29           ` Ferry Toth
2022-09-25 19:21             ` Ferry Toth
2022-09-26  5:43               ` Andrey Smirnov
2022-09-26 10:19                 ` Andy Shevchenko
2022-09-26 18:31                   ` Andrey Smirnov
2022-09-27 12:21                     ` Andy Shevchenko
2022-09-26 10:45               ` Sven Peter
2022-09-23 21:12         ` Ferry Toth
2022-09-24  1:34           ` Andrey Smirnov
2022-09-24 16:06             ` Ferry Toth
2022-09-26 10:21               ` Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=580eb9fe-db26-ddd4-6368-c763bb4ebdba@gmail.com \
    --to=fntoth@gmail.com \
    --cc=Thinh.Nguyen@synopsys.com \
    --cc=andrew.smirnov@gmail.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=balbi@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=thinhn@synopsys.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.