linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Hutchings <ben.hutchings@codethink.co.uk>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org
Cc: stable@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>,
	John Youn <johnyoun@synopsys.com>,
	Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>,
	Douglas Anderson <dianders@chromium.org>,
	Chen Yu <chenyu56@huawei.com>,
	Felipe Balbi <felipe.balbi@linux.intel.com>,
	linux-usb@vger.kernel.org,
	Minas Harutyunyan <hminas@synopsys.com>,
	John Stultz <john.stultz@linaro.org>,
	Sasha Levin <alexander.levin@verizon.com>
Subject: [4.4,13/49] usb: dwc2: Fix UDC state tracking
Date: Fri, 08 Dec 2017 03:37:17 +0000	[thread overview]
Message-ID: <1512704237.18523.221.camel@codethink.co.uk> (raw)

On Thu, 2017-12-07 at 14:07 +0100, Greg Kroah-Hartman wrote:
> 4.4-stable review patch.  If anyone has any objections, please let me
> know.
> 
> ------------------
> 
> From: John Stultz <john.stultz@linaro.org>
> 
> 
> [ Upstream commit ce2b21a4e5ce042c0a42c9db8fa9e0f849427d5e ]
> 
> It has been noticed that the dwc2 udc state reporting doesn't
> seem to work (at least on HiKey boards). Where after the initial
> setup, the sysfs /sys/class/udc/f72c0000.usb/state file would
> report "configured" no matter the state of the OTG port.
> 
> This patch adds a call so that we report to the UDC layer when
> the gadget device is disconnected.
> 
> This patch does depend on the previous patch ("usb: dwc2:
> Improve gadget state disconnection handling") in this patch set
> in order to properly work.

Then you should add that (commit d2471d4a24df).

Ben.

> Cc: Wei Xu <xuwei5@hisilicon.com>
> Cc: Guodong Xu <guodong.xu@linaro.org>
> Cc: Amit Pundir <amit.pundir@linaro.org>
> Cc: YongQin Liu <yongqin.liu@linaro.org>
> Cc: John Youn <johnyoun@synopsys.com>
> Cc: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
> Cc: Douglas Anderson <dianders@chromium.org>
> Cc: Chen Yu <chenyu56@huawei.com>
> Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: linux-usb@vger.kernel.org
> Acked-by: Minas Harutyunyan <hminas@synopsys.com>
> Tested-by: Minas Harutyunyan <hminas@synopsys.com>
> Reported-by: Amit Pundir <amit.pundir@linaro.org>
> Signed-off-by: John Stultz <john.stultz@linaro.org>
> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
> Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
>  drivers/usb/dwc2/gadget.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> --- a/drivers/usb/dwc2/gadget.c
> +++ b/drivers/usb/dwc2/gadget.c
> @@ -2206,6 +2206,8 @@ void dwc2_hsotg_disconnect(struct dwc2_h
>  
>  	call_gadget(hsotg, disconnect);
>  	hsotg->lx_state = DWC2_L3;
> +
> +	usb_gadget_set_state(&hsotg->gadget, USB_STATE_NOTATTACHED);
>  }
>  
>  /**
> 
> 
>

             reply	other threads:[~2017-12-08  3:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-08  3:37 Ben Hutchings [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-12-12  0:27 [4.4,13/49] usb: dwc2: Fix UDC state tracking Levin, Alexander
2017-12-09 17:12 Greg Kroah-Hartman
2017-12-07 13:07 Greg Kroah-Hartman

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=1512704237.18523.221.camel@codethink.co.uk \
    --to=ben.hutchings@codethink.co.uk \
    --cc=Minas.Harutyunyan@synopsys.com \
    --cc=alexander.levin@verizon.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=hminas@synopsys.com \
    --cc=john.stultz@linaro.org \
    --cc=johnyoun@synopsys.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stable@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).