All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: Felipe Balbi <felipe.balbi@linux.intel.com>,
	Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
	"mathias.nyman@intel.com" <mathias.nyman@intel.com>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
Cc: "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-renesas-soc@vger.kernel.org"
	<linux-renesas-soc@vger.kernel.org>
Subject: Re: [PATCH v2 0/2] usb: host: xhci: rcar: fix the quirks setting of XHCI_NO_64BIT_SUPPORT
Date: Wed, 01 Jun 2016 14:41:46 +0300	[thread overview]
Message-ID: <574EC9FA.2090105@linux.intel.com> (raw)
In-Reply-To: <8760ttl573.fsf@linux.intel.com>

>>> isn't the following enough?
>>>
>>> @@ -4886,7 +4886,7 @@ int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks)
>>>   		xhci->hcc_params2 = readl(&xhci->cap_regs->hcc_params2);
>>>   	xhci_print_registers(xhci);
>>>
>>> -	xhci->quirks = quirks;
>>> +	xhci->quirks |= quirks;
>>>
>>>   	get_quirks(dev, xhci);
>>
>> Thank you for the comment!
>> You're correct. This also can resolve the issue.
>> Do you prefer such a simple patch?
>> At least, I prefer such a simple patch :)
>
> I'll defer that to Mathias :-)
>

I think that xhci->quirks |= quirks will do as a rc fix.

looks like setting xhci->quirks need some generic cleanup for usb-next.
Now in 4.7-rc1 we set xhci->quirks before xhci_gen_setup in xhci_priv_init_quirk(),
and during xhci_gen_setup() when copying module parameters quirk, and when calling
the get_quirk() callback.

There is nothing special happening between xhci_priv_init_quirk and when calling
get_quirks() in xhci_gen_setup() that need quirks to be set in two stages.

xhci pci drivers only use the get_quirk callback, platform drivers use both.

Looks like the get_quirk() callback is a legacy thing from when the memory for
the xhci struct was allocated in xhci_gen_setup, and xhci->quirks could only be
set after that.

Now xhci struct is part of the usb_hcd, so we could probably get rid of the get_quirk
callback alltogether by setting the pci quirks in xhci_pci_setup

-Mathias  

  reply	other threads:[~2016-06-01 11:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-01  6:44 [PATCH v2 0/2] usb: host: xhci: rcar: fix the quirks setting of XHCI_NO_64BIT_SUPPORT Yoshihiro Shimoda
2016-06-01  6:44 ` [PATCH v2 1/2] usb: host: xhci: plat: add ->quirks value for platform-specific Yoshihiro Shimoda
2016-06-01  6:44 ` [PATCH v2 2/2] usb: host: xhci: rcar: fix the quirks setting of XHCI_NO_64BIT_SUPPORT Yoshihiro Shimoda
2016-06-01  7:01 ` [PATCH v2 0/2] " Felipe Balbi
2016-06-01  7:47   ` Yoshihiro Shimoda
2016-06-01  7:49     ` Felipe Balbi
2016-06-01 11:41       ` Mathias Nyman [this message]
2016-06-02  4:53         ` 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=574EC9FA.2090105@linux.intel.com \
    --to=mathias.nyman@linux.intel.com \
    --cc=felipe.balbi@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --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.