Linux-USB Archive on lore.kernel.org
 help / color / Atom feed
From: Vinod Koul <vkoul@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Mathias Nyman <mathias.nyman@intel.com>,
	linux-arm-msm@vger.kernel.org,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
	Christian Lamparter <chunkeey@googlemail.com>
Subject: Re: [PATCH 5/5] usb: xhci: allow multiple firmware versions
Date: Thu, 20 Jun 2019 22:37:56 +0530
Message-ID: <20190620170756.GP2962@vkoul-mobl> (raw)
In-Reply-To: <20190620122013.GE19295@kroah.com>

On 20-06-19, 14:20, Greg Kroah-Hartman wrote:
> On Thu, Jun 20, 2019 at 03:51:54PM +0530, Vinod Koul wrote:
> > Allow multiple firmware file versions in table and load them in
> > increasing order as we find them in the file system.
> > 
> > Signed-off-by: Vinod Koul <vkoul@kernel.org>
> > Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> > Cc: Christian Lamparter <chunkeey@googlemail.com>
> > ---
> >  drivers/usb/host/xhci-pci.c | 39 +++++++++++++++++++++++++++++++++++++
> >  1 file changed, 39 insertions(+)
> > 
> > diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
> > index 3574afac44c5..2ee9e6bbabcb 100644
> > --- a/drivers/usb/host/xhci-pci.c
> > +++ b/drivers/usb/host/xhci-pci.c
> > @@ -333,9 +333,12 @@ static const struct renesas_fw_entry {
> >  	 *  - uPD720201 ES 2.0 sample whose revision ID is 2.
> >  	 *  - uPD720201 ES 2.1 sample & CS sample & Mass product, ID is 3.
> >  	 *  - uPD720202 ES 2.0 sample & CS sample & Mass product, ID is 2.
> > +	 *
> > +	 *  Entry expected_version should be kept in increasing order
> 
> Why?

I should have explained more :)
This is required only for the devices which have multiple versions
available, so it will pick one try it out and if not found go to
subsequent one. So I thought it would be make sense to keep the version
values for a specific device (not whole table) ordered so that we can
pick the next entry. Of course if you have better idea to manage two
versions, am all ears :)

> 
> >  	 */
> >  	{ "K2013080.mem", 0x0014, 0x02, 0x2013 },
> >  	{ "K2013080.mem", 0x0014, 0x03, 0x2013 },
> > +	{ "K2026090.mem", 0x0014, 0x03, 0x2026 },
> >  	{ "K2013080.mem", 0x0015, 0x02, 0x2013 },
> 
> Just put a { } entry here at the end and then you don't care about the
> order at all.  Much simpler and easier to maintain over time.
> 

-- 
~Vinod

      reply index

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-20 10:21 [PATCH 0/5] usb: xhci: Add support for Renesas USB controllers Vinod Koul
2019-06-20 10:21 ` [PATCH 1/5] usb: xhci: add firmware loader for uPD720201 and uPD720202 w/o ROM Vinod Koul
2019-06-20 12:19   ` Greg Kroah-Hartman
2019-06-20 17:03     ` Vinod Koul
2019-06-20 19:12       ` Christian Lamparter
2019-06-21  4:42         ` Vinod Koul
2019-06-20 10:21 ` [PATCH 2/5] usb: xhci: handle " Vinod Koul
2019-06-20 10:21 ` [PATCH 3/5] usb: xhci: Use register defined and field names Vinod Koul
2019-06-20 10:21 ` [PATCH 4/5] usb: xhci: Add ROM loader for uPD720201 Vinod Koul
2019-06-20 10:21 ` [PATCH 5/5] usb: xhci: allow multiple firmware versions Vinod Koul
2019-06-20 12:20   ` Greg Kroah-Hartman
2019-06-20 17:07     ` Vinod Koul [this message]

Reply instructions:

You may reply publically 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=20190620170756.GP2962@vkoul-mobl \
    --to=vkoul@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=chunkeey@googlemail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@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

Linux-USB Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-usb/0 linux-usb/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-usb linux-usb/ https://lore.kernel.org/linux-usb \
		linux-usb@vger.kernel.org linux-usb@archiver.kernel.org
	public-inbox-index linux-usb

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-usb


AGPL code for this site: git clone https://public-inbox.org/ public-inbox