All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vinod Koul <vkoul@kernel.org>
To: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Cc: dmaengine@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	stable@vger.kernel.org,
	Phuong Nguyen <phuong.nguyen.xw@renesas.com>
Subject: [v2] dmaengine: usb-dmac: Make DMAC system sleep callbacks explicit
Date: Sun, 20 Jan 2019 16:30:06 +0530	[thread overview]
Message-ID: <20190120110006.GR4635@vkoul-mobl> (raw)

On 17-01-19, 17:44, Yoshihiro Shimoda wrote:
> From: Phuong Nguyen <phuong.nguyen.xw@renesas.com>
> 
> This commit fixes the issue that USB-DMAC hangs silently after system
> resumes on R-Car Gen3 hence renesas_usbhs will not work correctly
> when using USB-DMAC for bulk transfer e.g. ethernet or serial
> gadgets.
> 
> The issue can be reproduced by these steps:
>  1. modprobe g_serial
>  2. Suspend and resume system.
>  3. connect a usb cable to host side
>  4. Transfer data from Host to Target
>  5. cat /dev/ttyGS0 (Target side)
>  6. echo "test" > /dev/ttyACM0 (Host side)
> 
> The 'cat' will not result anything. However, system still can work
> normally.
> 
> Currently, USB-DMAC driver does not have system sleep callbacks hence
> this driver relies on the PM core to force runtime suspend/resume to
> suspend and reinitialize USB-DMAC during system resume. After
> the commit 17218e0092f8 ("PM / genpd: Stop/start devices without
> pm_runtime_force_suspend/resume()"), PM core will not force
> runtime suspend/resume anymore so this issue happens.
> 
> To solve this, make system suspend resume explicit by using
> pm_runtime_force_{suspend,resume}() as the system sleep callbacks.
> SET_NOIRQ_SYSTEM_SLEEP_PM_OPS() is used to make sure USB-DMAC
> suspended after and initialized before renesas_usbhs."

Applied, thanks

WARNING: multiple messages have this Message-ID (diff)
From: Vinod Koul <vkoul@kernel.org>
To: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Cc: dmaengine@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	stable@vger.kernel.org,
	Phuong Nguyen <phuong.nguyen.xw@renesas.com>
Subject: Re: [PATCH v2] dmaengine: usb-dmac: Make DMAC system sleep callbacks explicit
Date: Sun, 20 Jan 2019 16:30:06 +0530	[thread overview]
Message-ID: <20190120110006.GR4635@vkoul-mobl> (raw)
In-Reply-To: <1547714657-22780-1-git-send-email-yoshihiro.shimoda.uh@renesas.com>

On 17-01-19, 17:44, Yoshihiro Shimoda wrote:
> From: Phuong Nguyen <phuong.nguyen.xw@renesas.com>
> 
> This commit fixes the issue that USB-DMAC hangs silently after system
> resumes on R-Car Gen3 hence renesas_usbhs will not work correctly
> when using USB-DMAC for bulk transfer e.g. ethernet or serial
> gadgets.
> 
> The issue can be reproduced by these steps:
>  1. modprobe g_serial
>  2. Suspend and resume system.
>  3. connect a usb cable to host side
>  4. Transfer data from Host to Target
>  5. cat /dev/ttyGS0 (Target side)
>  6. echo "test" > /dev/ttyACM0 (Host side)
> 
> The 'cat' will not result anything. However, system still can work
> normally.
> 
> Currently, USB-DMAC driver does not have system sleep callbacks hence
> this driver relies on the PM core to force runtime suspend/resume to
> suspend and reinitialize USB-DMAC during system resume. After
> the commit 17218e0092f8 ("PM / genpd: Stop/start devices without
> pm_runtime_force_suspend/resume()"), PM core will not force
> runtime suspend/resume anymore so this issue happens.
> 
> To solve this, make system suspend resume explicit by using
> pm_runtime_force_{suspend,resume}() as the system sleep callbacks.
> SET_NOIRQ_SYSTEM_SLEEP_PM_OPS() is used to make sure USB-DMAC
> suspended after and initialized before renesas_usbhs."

Applied, thanks

-- 
~Vinod

             reply	other threads:[~2019-01-20 11:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-20 11:00 Vinod Koul [this message]
2019-01-20 11:00 ` [PATCH v2] dmaengine: usb-dmac: Make DMAC system sleep callbacks explicit Vinod Koul
  -- strict thread matches above, loose matches on Subject: below --
2019-01-17  8:44 [v2] " Yoshihiro Shimoda
2019-01-17  8:44 ` [PATCH v2] " Yoshihiro Shimoda

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=20190120110006.GR4635@vkoul-mobl \
    --to=vkoul@kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=phuong.nguyen.xw@renesas.com \
    --cc=stable@vger.kernel.org \
    --cc=yoshihiro.shimoda.uh@renesas.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.