From: Felipe Balbi <balbi@kernel•org>
To: Vicente Bergas <vicencb@gmail•com>, Robin Murphy <robin.murphy@arm•com>
Cc: Matthias Brugger <mbrugger@suse•com>,
Heiko Stuebner <heiko@sntech•de>,
MarcZyngier <marc.zyngier@arm•com>,
Catalin Marinas <catalin.marinas@arm•com>,
linux-usb@vger•kernel.org, Will Deacon <will.deacon@arm•com>,
linux-rockchip@lists•infradead.org,
Greg Kroah-Hartman <gregkh@linuxfoundation•org>,
linux-arm-kernel@lists•infradead.org
Subject: Re: [PATCH] usb: dwc3: Add shutdown to platform_driver
Date: Tue, 27 Aug 2019 14:53:04 +0300 [thread overview]
Message-ID: <87v9uix1sv.fsf@gmail.com> (raw)
In-Reply-To: <8d48017a-64c5-4b25-8d85-113ffcf502c9@gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 1852 bytes --]
Hi,
Vicente Bergas <vicencb@gmail•com> writes:
> On Saturday, August 17, 2019 7:41:40 PM CEST, Vicente Bergas wrote:
>> Otherwise the device keeps writing to memory after kexec and disturbs
>> the next kernel.
>>
>> Signed-off-by: Vicente Bergas <vicencb@gmail•com>
>> ---
>> drivers/usb/dwc3/dwc3-of-simple.c | 6 ++++++
>> 1 file changed, 6 insertions(+)
>>
>> Hi Felipe, Robin,
>> this version calls 'remove' from 'shutdown' instead of just asserting
>> a reset because it looks like a cleaner way to stop the device.
>>
>> Calling remove from shutdown in core.c instead of dwc3-of-simple.c does not
>> fix the issue either.
>>
>> It has been tested on the sapphire board, a RK3399 platform.
>>
>> Regards,
>> Vicenç.
>>
>> diff --git a/drivers/usb/dwc3/dwc3-of-simple.c
>> b/drivers/usb/dwc3/dwc3-of-simple.c
>> index bdac3e7d7b18..d5fd45c64901 100644
>> --- a/drivers/usb/dwc3/dwc3-of-simple.c
>> +++ b/drivers/usb/dwc3/dwc3-of-simple.c
>> @@ -133,6 +133,11 @@ static int dwc3_of_simple_remove(struct
>> platform_device *pdev)
>> return 0;
>> }
>>
>> +static void dwc3_of_simple_shutdown(struct platform_device *pdev)
>> +{
>> + dwc3_of_simple_remove(pdev);
>> +}
>> +
>> static int __maybe_unused
>> dwc3_of_simple_runtime_suspend(struct device *dev)
>> {
>> struct dwc3_of_simple *simple = dev_get_drvdata(dev);
>> @@ -190,6 +195,7 @@ MODULE_DEVICE_TABLE(of, of_dwc3_simple_match);
>> static struct platform_driver dwc3_of_simple_driver = {
>> .probe = dwc3_of_simple_probe,
>> .remove = dwc3_of_simple_remove,
>> + .shutdown = dwc3_of_simple_shutdown,
why don't you just have shutdown use the same exact function as remove?
Frankly, though, I still don't fully understand what's going wrong
here. Why is the device still alive during kexec?
cheers
--
balbi
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists•infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-08-27 11:53 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-22 14:31 kexec on rk3399 Vicente Bergas
2019-07-22 14:46 ` Will Deacon
2019-07-22 16:08 ` Vicente Bergas
2019-07-22 14:47 ` Matthias Brugger
2019-07-22 16:56 ` Vicente Bergas
2019-07-22 14:54 ` Marc Zyngier
2019-07-22 17:05 ` Vicente Bergas
2019-07-22 17:35 ` Robin Murphy
2019-07-22 18:53 ` Vicente Bergas
2019-07-23 13:32 ` Robin Murphy
2019-08-14 12:53 ` Vicente Bergas
2019-08-14 13:06 ` Felipe Balbi
2019-08-14 13:15 ` Vicente Bergas
2019-08-15 6:00 ` Felipe Balbi
2019-08-14 13:12 ` Robin Murphy
2019-08-15 1:15 ` Vicente Bergas
2019-08-15 6:06 ` Felipe Balbi
2019-08-15 11:09 ` Robin Murphy
2019-08-17 17:41 ` [PATCH] usb: dwc3: Add shutdown to platform_driver Vicente Bergas
2019-08-27 11:45 ` Vicente Bergas
2019-08-27 11:53 ` Felipe Balbi [this message]
2019-08-27 12:16 ` Vicente Bergas
2019-09-09 15:07 ` Vicente Bergas
2019-10-23 6:31 ` Felipe Balbi
2019-10-24 12:15 ` Vicente Bergas
2019-10-25 10:25 ` Felipe Balbi
2019-10-25 10:42 ` Vicente Bergas
2019-09-19 11:36 ` Vicente Bergas
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=87v9uix1sv.fsf@gmail.com \
--to=balbi@kernel$(echo .)org \
--cc=catalin.marinas@arm$(echo .)com \
--cc=gregkh@linuxfoundation$(echo .)org \
--cc=heiko@sntech$(echo .)de \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=linux-rockchip@lists$(echo .)infradead.org \
--cc=linux-usb@vger$(echo .)kernel.org \
--cc=marc.zyngier@arm$(echo .)com \
--cc=mbrugger@suse$(echo .)com \
--cc=robin.murphy@arm$(echo .)com \
--cc=vicencb@gmail$(echo .)com \
--cc=will.deacon@arm$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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