lkml.org 
[lkml]   [2019]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/5] usb: xhci: allow multiple firmware versions
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

\
 
 \ /
  Last update: 2019-06-20 19:11    [W:2.350 / U:0.700 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site