From: Felipe Balbi <balbi@kernel.org>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Peter Chen <peter.chen@nxp.com>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
dl-linux-imx <linux-imx@nxp.com>
Subject: Re: [PATCH 1/1] usb: gadget: core: wait gadget device .release finishing at usb_del_gadget_udc
Date: Mon, 07 Sep 2020 17:26:22 +0300 [thread overview]
Message-ID: <871rjdoe7l.fsf@kernel.org> (raw)
In-Reply-To: <20200907141814.GA762136@rowland.harvard.edu>
[-- Attachment #1: Type: text/plain, Size: 1319 bytes --]
Hi,
Alan Stern <stern@rowland.harvard.edu> writes:
> On Mon, Sep 07, 2020 at 10:48:29AM +0300, Felipe Balbi wrote:
>> Greg Kroah-Hartman <gregkh@linuxfoundation.org> writes:
>>
>> Hi,
>>
>> > On Fri, Jul 31, 2020 at 02:06:20PM +0000, Peter Chen wrote:
>> >> > And this no-op function is horrid. There used to be documentation in
>> >> > the kernel where I could rant about this, but instead, I'll just say,
>> >> > "why are people trying to work around warnings we put in the core kernel
>> >> > to fix common problems? Do they think we did that just because we
>> >> > wanted to be mean???"
>> >> >
>> >>
>> >> So, like kernel doc for device_initialize said, a proper fix for dwc3
>> >> should be zeroed gadget device memory at its own driver before the
>> >> gadget device register to driver core, right?
>> >
>> > It should get a totally different, dynamically allocated structure.
>> > NEVER recycle them.
>>
>> then we break usage of container_of(). That's okay, but we have to add
>> some sort of private_data to the gadget structure so UDC drivers can get
>> their own pointers back.
>
> As you've probably seen by now, Peter solved this problem by storing the
> private back-pointer in gadget->dev.platform_data.
Cool, as long as we have a solution :-)
--
balbi
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 857 bytes --]
prev parent reply other threads:[~2020-09-07 16:30 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-31 9:59 [PATCH 1/1] usb: gadget: core: wait gadget device .release finishing at usb_del_gadget_udc Peter Chen
2020-07-31 11:55 ` Greg Kroah-Hartman
2020-07-31 12:11 ` Peter Chen
2020-07-31 12:25 ` Greg Kroah-Hartman
2020-07-31 14:06 ` Peter Chen
2020-07-31 14:12 ` Alan Stern
2020-07-31 23:42 ` Peter Chen
2020-08-01 6:53 ` Peter Chen
2020-08-01 7:04 ` Jun Li
2020-08-01 15:44 ` Alan Stern
2020-07-31 14:16 ` Greg Kroah-Hartman
2020-09-07 7:48 ` Felipe Balbi
2020-09-07 14:18 ` Alan Stern
2020-09-07 14:26 ` Felipe Balbi [this message]
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=871rjdoe7l.fsf@kernel.org \
--to=balbi@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-imx@nxp.com \
--cc=linux-usb@vger.kernel.org \
--cc=peter.chen@nxp.com \
--cc=stern@rowland.harvard.edu \
/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).