Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp208670pxf; Wed, 24 Mar 2021 03:15:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTWTZOXvyk1jf/2zHJmfxL30vU6K6WCOfC9uDLBAWTpuUAXvH7Qckv+9wfoR9B9Miijal9 X-Received: by 2002:a05:6402:22bb:: with SMTP id cx27mr2592944edb.148.1616580904092; Wed, 24 Mar 2021 03:15:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616580904; cv=none; d=google.com; s=arc-20160816; b=kFMDr+/4DMG4M14PPRrrNAPjsKlnUiXK9MWVbbPz7+/BktdEUzx6curbNehXlhaIZC aLlt6qhSorIfJLPiLiX71O0unU76FcCMieuW2P1SwVIqEpu8KQXoTgM45/J7ehAAFpVs 03cxU0GP8W+bSUX4cPme+3AuQgXXVKuAl1v0e3l6kx9s5Fto+HQaMCyEtwvihzF/8jQE phMZdQZvJWW93BkEirrvfmTayJdf0kMANzhpToCyYruojBCdTNRaH8RsioTYN33HqI+9 eq9rVMAAwHp2hwXunOpSzPE6QI57hI3ChwkSi15+d2+kCRqOBmZMwD4q0RHmAjH24OS7 PpLg== 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=mYZcutcZfeSu24nfXG/5oZ1l8793+jSige7/q2c5reQ=; b=Av4A8t0FYy2sVlAKH0lR5iuI0oKpiV1jKHDIr8Y9VvfmnwIvUHaBWmCA18h1aRXINB 4hcw0I4sk+FFEHBggbXqG+nq/6agp62XN1osORxB3rsBOjLq0jvBcl5TVAZKkzibQ6oa 7t/7Zclx1lEcPfCtGl0atbFl4zNV/oelUBC327+C28NZZll1Z/G/iw3ZNzBUV6stGKzA q30SChML9Td29yQjsbSSW1UGenmGC0rRvcbNQyYa9B9wZPgwF80XfvaSpQUmXhXhXG2n oNlKDy4i9cahfEOHYz/gTLimutrFFl9lWj1AaNdMq/mwrxbBW33jwfT+QeZ72S4t9Kx2 QV9A== 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 a10si1436657edv.308.2021.03.24.03.14.40; Wed, 24 Mar 2021 03:15:04 -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 S235661AbhCXHE7 convert rfc822-to-8bit (ORCPT + 99 others); Wed, 24 Mar 2021 03:04:59 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:39997 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230333AbhCXHEv (ORCPT ); Wed, 24 Mar 2021 03:04:51 -0400 Received: from mac-pro.holtmann.net (p4fefce19.dip0.t-ipconnect.de [79.239.206.25]) by mail.holtmann.org (Postfix) with ESMTPSA id 9C550CECD2; Wed, 24 Mar 2021 08:12:28 +0100 (CET) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Subject: Re: [PATCH v10 1/9] Bluetooth: btintel: Check firmware version before download From: Marcel Holtmann In-Reply-To: <0702034E-2AC9-4AB3-89F1-0E282650F7D8@intel.com> Date: Wed, 24 Mar 2021 08:04:49 +0100 Cc: Luiz Augusto von Dentz , "linux-bluetooth@vger.kernel.org" Content-Transfer-Encoding: 8BIT Message-Id: References: <20210323185904.3372987-1-luiz.dentz@gmail.com> <0702034E-2AC9-4AB3-89F1-0E282650F7D8@intel.com> To: "An, Tedd" X-Mailer: Apple Mail (2.3654.60.0.2.21) Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Tedd, > On 3/23/21, 12:00 PM, "Luiz Augusto von Dentz" wrote: > > From: Luiz Augusto von Dentz > > 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. > v10: Fix build error when BT_CONFIG_INTEL is not set. > > 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 did a quick check with v10 and all tests passed/expected. > > Test Scenarios: > Cold boot: Expect to download firmware > Reboot: Expect no firmware downloading > FW upgrade: Expect to detect firmware change and download new firmware. > > ThP, TyP: All 3 tests passed > WsP, SfP: Cold boot, Reboot passed. FW upgrade didn't work due to known issue. > > Tested-by: Tedd Ho-Jeong An so the verdict is that we should go ahead and apply this set? Regards Marcel