Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4438080pxf; Tue, 16 Mar 2021 13:31:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxXEvRCPHByy9bpR3G6Tz7oWSnLwcC8kQMk4lrqCl1SUR0dN6uxstRiso/dkgxdd1hXwZSb X-Received: by 2002:aa7:da46:: with SMTP id w6mr38701104eds.40.1615926679228; Tue, 16 Mar 2021 13:31:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615926679; cv=none; d=google.com; s=arc-20160816; b=G+NFZBcMdnsIa66DRH68mjuePkN0UdmfHY/dlXSwOVIyAnb1X/bmfuyFkdI5//+IQ2 qpeSwALLD9cEIZ3jAAE5ccS86PBFLYP9ULJ+xsBym4NHXPjbooNwtwnb1VzsXckHTmaQ ue8g88dtsO4Ca+8rEPftCi6jB/mVEmFkXlVeTidWyyxgETjZgltelkn0LIHkY8Malz38 jFY1e+DwOU1TeHMTkwNbWynoE8izpBXRRPIbuj0iTqylT9aZFt6pw34l1IEW+I4uko8r t2669/xe1PAgcJELPACWSYk2qngAYcNd9LULR01dQM9jjCX/EyMnc8G7+5b/jF3K1k+d d7pQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=5ZCVo8lEDV0FyfBm2oSNfGCC/53uogXonDV0zR2HdeU=; b=lEmG5kiKKVXHsHNDP1zzFhTTqkxpLxKHE6C/DXzWLq4WNPjln0nmudvwWDDMgD0wPQ VysqXMTjniRuCKzoPxXhBqKDCdUxJxVI8IaCkZjvECyIjZOr8eFPQY/iYqMDnpYSN99v KmMyoa3aXBVcFi+acvz55EZoIUtu4wlXokU/eL2qq3qizqCTY+xc0XjnZOdyx3WAP+0V K+iXkoxI3Wm+Z5PWfjpIE5EteV3Z1KDgeZfVYQLoRH2gFamw5liWAEuFS1pwIlJxXK4K kr045B17XIYARvpevpaCq2O+6bdr0F02b4HFTqY6+JqEN9jlcg6H0VE5xG92S9cU6xBG u2OA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t3si15094913ejy.142.2021.03.16.13.30.56; Tue, 16 Mar 2021 13:31:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235198AbhCPOBn convert rfc822-to-8bit (ORCPT + 99 others); Tue, 16 Mar 2021 10:01:43 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:41449 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231547AbhCPOBN (ORCPT ); Tue, 16 Mar 2021 10:01:13 -0400 Received: from marcel-macbook.holtmann.net (p4fefc126.dip0.t-ipconnect.de [79.239.193.38]) by mail.holtmann.org (Postfix) with ESMTPSA id 50230CECFB; Tue, 16 Mar 2021 15:08:49 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Subject: Re: [PATCH v9 1/9] Bluetooth: btintel: Check firmware version before download From: Marcel Holtmann In-Reply-To: <6644650bbd0e5748368a2468e1df9f181bdc413c.camel@gmail.com> Date: Tue, 16 Mar 2021 15:01:11 +0100 Cc: Luiz Augusto von Dentz , linux-bluetooth@vger.kernel.org Content-Transfer-Encoding: 8BIT Message-Id: <58062484-8891-4E66-9B6C-918273C31668@holtmann.org> References: <20210315174002.1778447-1-luiz.dentz@gmail.com> <6644650bbd0e5748368a2468e1df9f181bdc413c.camel@gmail.com> To: Tedd Ho-Jeong An X-Mailer: Apple Mail (2.3654.60.0.2.21) Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Tedd, >> This checks the firmware build number, week and year against the >> repective loaded version. If details are a match, skip the download >> process. >> >> Signed-off-by: Luiz Augusto von Dentz >> --- >> v2: Add patch that mover checks for operational mode after the version >> checking. >> v3: Fix not checking for operation mode before using btintel_read_boot_params >> since some models depend on that to contruct the fw filename. Also attempt to >> cleanup duplicated code. >> v4: Fix forwarding -EALREADY when firmware has already been loaded. >> v5: Fix not advancing fw_ptr. >> v6: Fix btusb_setup_intel_new_get_fw_name error checking for ddc. >> v7: Disable version checking for WsP/SfP. >> v8: Really disables version checking for WsP/SfP. >> v9: Reintroduce bootloader checks and add workaround for version checking when >> operation and version cannot be read. >> >> drivers/bluetooth/btintel.c | 106 +++++++++++++++++++++++++++------- >> drivers/bluetooth/btintel.h | 5 +- >> drivers/bluetooth/btusb.c | 18 +++++- >> drivers/bluetooth/hci_intel.c | 7 ++- >> 4 files changed, 109 insertions(+), 27 deletions(-) > > I ran a quick test the v9 with the devices what I have. > > Test cases are: > - cold boot - expect to downloading the firmware > - reboot - expect to no firmware downloading > - fw upgrade - expect to device reset and download new firmware > > Devices tests: > SfP, WsP, ThP, TyP > > Results: > ThP, TyP: All 3 test cases were passed. > SfP, WsP: fw upgrade case(#3) didn't work but it was known issue > - insufficient fw version information in the firmware file > > Tested-by: Tedd Ho-Jeong An > Tested-by: Kiran K so I should go ahead and apply these patches? Regards Marcel