Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2169825ybi; Thu, 20 Jun 2019 10:12:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqy9ppec2/TL62mUxGODtIutV4Nvlx0HILlvx3pbQptrjVt+hVIHH4LosYj9Wl6XSvL/Iylm X-Received: by 2002:a17:90a:29c5:: with SMTP id h63mr643727pjd.83.1561050767400; Thu, 20 Jun 2019 10:12:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561050767; cv=none; d=google.com; s=arc-20160816; b=FP404dhmiVBR/W/tc8BQRVJzgIOrPPpewC8PBJ9dP48QFHFZKBE3yeBjE5hsO6N2T/ /H2V4OGLasyH4MqzwNs5ndzoe9sHlsHg66PgR+u93vnKuGFeCqIfyCWsDkVoIBVCmkTX 5jPuQ2m6zG1GpJXwTyqZ6UdPjpfmoHumcyvxlbhko5+IVxucF8FueYxL67Ej9/7fC7Cu f4c1LKudVJ6KprQo24QPsEBA8eoIGcM4omF7eMtcTyRUe3itVw+FOTVnRqzoe1OaLruS OLXhQxMtW0YN69Mqi7cgb5JZKEj+xzM/5yFX8lOqaNnHN1jXckULIcNE51el+ToJh/kq 2DKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Yx2Wp9dttClieD7TlsGeOZ4zZSnzvq0Tohc6gic5eYs=; b=JDbtFwFHpxsObx5at9rWSYjy8ybb9hUpM0PGLPFHwC9AcTmOZJBIMoNR4+Z/wOw0cC 5IO8UFvhOn8WHbO9JJnUWWMIdXWLYcVbAu8MnRr2TMeOkb4O2xwguIlyO3qSIAwG3qY8 lNoh94ifeVKZc/0OTlraCnOW51rduSsbn651FQ5NC+BXHa7e0E8eVTHcibH277G2MXbn tii7EbKml833FS92gPGW4LTydER7JHc6a+O+SJIc1KUN6824yMCsrqyxEQ2htpYInH+6 gs0+S6sRE7sUCNJmUE7SdcLkallwL8lOKaUDRlsoT9u4Z6CRmNSNarMZ6K6I9TTNHbvo pC1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LWlLGHKf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l10si18584pgq.226.2019.06.20.10.12.32; Thu, 20 Jun 2019 10:12:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LWlLGHKf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726934AbfFTRLI (ORCPT + 99 others); Thu, 20 Jun 2019 13:11:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:43740 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726562AbfFTRLI (ORCPT ); Thu, 20 Jun 2019 13:11:08 -0400 Received: from localhost (unknown [106.51.107.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 14F3B2082C; Thu, 20 Jun 2019 17:11:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561050667; bh=n6B7VqKGVawxjMyw2yq5bPlq66NxeaTyVE4Kp1Ja2ZM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LWlLGHKfRvVKXAbg+FOMx8R3T3+6/zBofP35Xv3UB02sJZ8RbG6xzepsaHKuAw3Oe Hx7hWFcZxUud2TKy0YCCXiKtFtQNuDIWamTPThRtWwkE5jZI1nfEV56+G2oecmcCI2 +43jxUUZG35+r9g0ikqflgR1BuWRO1SRThpYLZjQ= Date: Thu, 20 Jun 2019 22:37:56 +0530 From: Vinod Koul To: Greg Kroah-Hartman Cc: Mathias Nyman , linux-arm-msm@vger.kernel.org, Bjorn Andersson , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Yoshihiro Shimoda , Christian Lamparter Subject: Re: [PATCH 5/5] usb: xhci: allow multiple firmware versions Message-ID: <20190620170756.GP2962@vkoul-mobl> References: <20190620102154.20805-1-vkoul@kernel.org> <20190620102154.20805-6-vkoul@kernel.org> <20190620122013.GE19295@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190620122013.GE19295@kroah.com> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > Cc: Yoshihiro Shimoda > > Cc: Christian Lamparter > > --- > > 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