linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Chen <hzpeterchen@gmail.com>
To: Mathias Nyman <mathias.nyman@linux.intel.com>
Cc: Tejas Joglekar <Tejas.Joglekar@synopsys.com>,
	Mathias Nyman <mathias.nyman@intel.com>,
	Felipe Balbi <balbi@kernel.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	John Youn <John.Youn@synopsys.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [RESEND PATCH v6 3/3] usb: dwc3: Pass quirk as platform data
Date: Fri, 8 Jan 2021 10:55:22 +0800	[thread overview]
Message-ID: <20210108025521.GC4672@b29397-desktop> (raw)
In-Reply-To: <a9217abb-7923-6a9a-0fed-a81480336730@linux.intel.com>

On 21-01-06 00:35:04, Mathias Nyman wrote:
> On 5.1.2021 11.30, Tejas Joglekar wrote:
> > Hi Mathias,
> > On 1/4/2021 9:13 PM, Greg Kroah-Hartman wrote:
> >> On Mon, Jan 04, 2021 at 09:32:13AM +0000, Tejas Joglekar wrote:
> >>> Hi Greg,
> >>> On 1/4/2021 1:55 PM, Greg Kroah-Hartman wrote:
> >>>> On Mon, Jan 04, 2021 at 01:38:43PM +0530, Tejas Joglekar wrote:
> >>>>> This commit adds the platform device data to setup
> >>>>> the XHCI_SG_TRB_CACHE_SIZE_QUIRK quirk. DWC3 hosts
> >>>>> which are PCI devices does not use OF to create platform device
> >>>>> but create xhci-plat platform device at runtime. So
> >>>>> this patch allows parent device to supply the quirk
> >>>>> through platform data.
> >>>>>
> >>>>> Signed-off-by: Tejas Joglekar <joglekar@synopsys.com>
> >>>>> ---
> >>>>>  drivers/usb/dwc3/host.c | 10 ++++++++++
> >>>>>  1 file changed, 10 insertions(+)
> >>>> What changed from previous versions?
> >>> Resent the patch as it was missed for review by Felipe and I saw your mail
> >>>
> >>> to resend the patch if not reviewed. Other two patches from series are
> >>>
> >>> picked up by Mathias, this one is remaining for review.
> >> Ah, how was I supposed to guess that?  :)
> >>
> >>>>> diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c
> >>>>> index e195176580de..0434bc8cec12 100644
> >>>>> --- a/drivers/usb/dwc3/host.c
> >>>>> +++ b/drivers/usb/dwc3/host.c
> >>>>> @@ -11,6 +11,11 @@
> >>>>>  #include <linux/platform_device.h>
> >>>>>  
> >>>>>  #include "core.h"
> >>>>> +#include "../host/xhci-plat.h"
> >>>> That feels really wrong.  Are you sure about that?
> >>> To use the struct xhci_plat_priv this was included, can you suggest alternative?
> >> If that is the "normal" way to do this with the xhci driver, ok, but I
> >> would like to get an ack from Mathias for this before taking it.
> >>
> > Can you please review this patch which is including the xhci-plat header?  Let me
> > 
> > know if anything should be modified. Ack if this patch looks ok so Greg can
> > 
> > take it.
> > 
> 
> This doesn't look right. 
> 
> dwc3 shouldn't need to know about xhci platform private structures,

Then, how dwc3 host let xhci know which xhci quirks it needs to use?

> besides, this patch now adds the quirk to all xhci platform devices created by dwc3.
> 
> I haven't touched dwc3 at all, but I'd guess you probably need to add a new entry to
> the dwc3_pci_id_table[] in dwc3-pci.c, add a device property, and then look for that
> property in xhci-plat.c, and set the quirk. 
> 

For non-PCI devices, it uses common platform bus, the specific platform
drivers use platform data to pass platform quirks to common driver, so
I added below patch.

46034a999c07 usb: host: xhci-plat: add platform data support

At platform data, the specific host driver could add xhci quirks and let
xhci handle later.

-- 

Thanks,
Peter Chen


  reply	other threads:[~2021-01-08  2:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-23 16:37 [PATCH v6 0/3] Add logic to consolidate TRBs for Synopsys xHC Tejas Joglekar
2020-11-23 16:38 ` [PATCH v6 1/3] usb: xhci: Set quirk for XHCI_SG_TRB_CACHE_SIZE_QUIRK Tejas Joglekar
2020-11-23 16:38 ` [PATCH v6 2/3] usb: xhci: Use temporary buffer to consolidate SG Tejas Joglekar
2020-11-24 13:00   ` liulongfang
2020-11-23 16:38 ` [PATCH v6 3/3] usb: dwc3: Pass quirk as platform data Tejas Joglekar
2021-01-04  8:08   ` [RESEND PATCH " Tejas Joglekar
2021-01-04  8:25   ` Greg Kroah-Hartman
2021-01-04  9:32     ` Tejas Joglekar
2021-01-04 15:43       ` Greg Kroah-Hartman
2021-01-05  9:30         ` Tejas Joglekar
2021-01-05 22:35           ` Mathias Nyman
2021-01-08  2:55             ` Peter Chen [this message]
2021-01-08  7:06             ` Tejas Joglekar
2020-11-24 13:15 ` [PATCH v6 0/3] Add logic to consolidate TRBs for Synopsys xHC Mathias Nyman

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=20210108025521.GC4672@b29397-desktop \
    --to=hzpeterchen@gmail.com \
    --cc=John.Youn@synopsys.com \
    --cc=Tejas.Joglekar@synopsys.com \
    --cc=balbi@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=mathias.nyman@linux.intel.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 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).