All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Stultz <john.stultz@linaro.org>
To: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
Cc: John Youn <John.Youn@synopsys.com>,
	lkml <linux-kernel@vger.kernel.org>,
	Wei Xu <xuwei5@hisilicon.com>, Guodong Xu <guodong.xu@linaro.org>,
	Amit Pundir <amit.pundir@linaro.org>,
	YongQin Liu <yongqin.liu@linaro.org>,
	Douglas Anderson <dianders@chromium.org>,
	Chen Yu <chenyu56@huawei.com>,
	Felipe Balbi <felipe.balbi@linux.intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Subject: Re: [RESEND x2][PATCH 0/3] dwc2 fixes for edge cases on hikey
Date: Thu, 19 Oct 2017 13:20:49 -0700	[thread overview]
Message-ID: <CALAqxLWBrnOwgA3QATMY3NGQgm5GZOXQRSpeDtoo7OA7UwRCJA@mail.gmail.com> (raw)
In-Reply-To: <410670D7E743164D87FA6160E7907A560113A3036D@am04wembxa.internal.synopsys.com>

On Wed, Oct 18, 2017 at 11:46 PM, Minas Harutyunyan
<Minas.Harutyunyan@synopsys.com> wrote:
> Could you please apply this patch. Please not apply your patch series
> "[PATCH 0/3] dwc2 fixes for edge cases on hikey" to check only below patch.
> If you confirm that this patch fix your issue with "Transaction Error"
> and " ChHltd set, but reason is unknown" I'll submit to LKML as final patch.
> Then can be applied your patch series, without patch 1/3 (changing in
> connector id status change) to correctly set UDC states.
>
> diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c index
> f4ef159b538e..7da22152df68 100644
> --- a/drivers/usb/dwc2/hcd.c
> +++ b/drivers/usb/dwc2/hcd.c
> @@ -331,6 +331,9 @@ static void dwc2_gusbcfg_init(struct dwc2_hsotg *hsotg)
>          usbcfg = dwc2_readl(hsotg->regs + GUSBCFG);
>          usbcfg &= ~(GUSBCFG_HNPCAP | GUSBCFG_SRPCAP);
>
> +       /* Set HS/FS Timeout Calibration */
> +       usbcfg |= GUSBCFG_TOUTCAL(7);
> +
>          switch (hsotg->hw_params.op_mode) {
>          case GHWCFG2_OP_MODE_HNP_SRP_CAPABLE:
>                  if (hsotg->params.otg_cap ==


So while using this patch and the earlier one from Vardan, I don't see
the "Transaction Error"
and " ChHltd set, but reason is unknown" messages, but I do see:

[  272.290459] dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently
in Host mode
[  272.290476] dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently
in Host mode
[  272.290491] dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently
in Host mode
[  272.290507] dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently
in Host mode
[  272.290522] dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently
in Host mode
[  272.290538] dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently
in Host mode
[  272.290554] dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently
in Host mode
[  272.290570] dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently
in Host mode
[  272.290585] dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently
in Host mode
[  272.290687] dwc2 f72c0000.usb: dwc2_hsotg_ep_stop_xfr: timeout DIEPINT.NAKEFF
[  272.290702] dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently
in Host mode
[  272.290717] dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently
in Host mode

After which the USB eth device stops functioning.

So its not really much functional change from without the patch from
my perspective.

Additionally, I'm still not seeing any disconnect calls when removing
the B plug.

Re-adding my three patches ontop of this change and Vardan's does fix
both the UDC state handling and avoids usb devices from failing when
the board is in host mode and the /dev/usb-ffs/adb/ep0 file is closed
by adbd.


thanks
-john

  reply	other threads:[~2017-10-19 20:20 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-20 19:57 [RESEND x2][PATCH 0/3] dwc2 fixes for edge cases on hikey John Stultz
2017-09-20 19:57 ` [RESEND x2][PATCH 1/3] usb: dwc2: Improve gadget state disconnection handling John Stultz
2017-09-20 19:57 ` [RESEND x2][PATCH 2/3] usb: dwc2: Error out of dwc2_hsotg_ep_disable() if we're in host mode John Stultz
2017-10-03 10:02   ` Minas Harutyunyan
2017-09-20 19:57 ` [RESEND x2][PATCH 3/3] usb: dwc2: Fix UDC state tracking John Stultz
2017-10-03 10:02   ` Minas Harutyunyan
2017-09-30 17:13 ` [RESEND x2][PATCH 0/3] dwc2 fixes for edge cases on hikey John Youn
2017-10-03  9:58   ` Minas Harutyunyan
2017-10-09 21:50     ` John Stultz
2017-10-12  7:59       ` Minas Harutyunyan
2017-10-12 18:06         ` John Stultz
2017-10-16  8:36           ` Minas Harutyunyan
2017-10-16 21:34             ` John Stultz
2017-10-17  8:41               ` Minas Harutyunyan
2017-10-19  6:46                 ` Minas Harutyunyan
2017-10-19 20:20                   ` John Stultz [this message]
2017-10-20 11:48                     ` Minas Harutyunyan
2017-10-23  9:19                       ` Minas Harutyunyan
2017-10-23 20:41                         ` John Stultz
2017-10-23 21:36                           ` John Stultz
2017-10-24  9:47                           ` Minas Harutyunyan
2017-10-19 20:06                 ` John Stultz
2017-10-20 11:26                   ` Minas Harutyunyan

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=CALAqxLWBrnOwgA3QATMY3NGQgm5GZOXQRSpeDtoo7OA7UwRCJA@mail.gmail.com \
    --to=john.stultz@linaro.org \
    --cc=John.Youn@synopsys.com \
    --cc=Minas.Harutyunyan@synopsys.com \
    --cc=amit.pundir@linaro.org \
    --cc=chenyu56@huawei.com \
    --cc=dianders@chromium.org \
    --cc=felipe.balbi@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=guodong.xu@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=xuwei5@hisilicon.com \
    --cc=yongqin.liu@linaro.org \
    /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.