From patchwork Wed Oct 4 11:11:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergio Costas Rodriguez X-Patchwork-Id: 1843233 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4S0sT34NBJz1yng for ; Wed, 4 Oct 2023 22:11:35 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1qnzmo-0007X8-Dj; Wed, 04 Oct 2023 11:11:26 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1qnzmf-0007Wi-Fn for kernel-team@lists.ubuntu.com; Wed, 04 Oct 2023 11:11:17 +0000 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 0C66B3F457 for ; Wed, 4 Oct 2023 11:11:14 +0000 (UTC) Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-3f5df65f9f4so13609595e9.2 for ; Wed, 04 Oct 2023 04:11:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696417872; x=1697022672; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=D+Alym55MbmuzQQj5MZQQiXVIRR1nIXp+jwIk+6pJX8=; b=pH9KjGCCgNemSFqLrrxa+y5EayEkyaFm/C4jVQ4AxVltgIt1zbowSFf8nQpqUZfO5U /X3T/FsB6ljP2Q0dOEdmCj1YTZr5gUvwg3XCNIvpX4GOq2vQjCHs06c/GER9n9faBYWm XuFfM4oU36sOZfDQSFNEu62SDS68kDTtZPXkPo1IGOIkA4ck6wPmwLXcBlrL8GzJkTm6 Ee6RcbIogvr8UOe8cfp+VYU/OBoH7U2o1J9N07TLeZfPYsHt3fR/MFUd3KcqHwIz+/lD JLMhrt6IsOuU975teJnnnXrxnV3pP//oBFdaw2AMZZ85IKicfCUkSBvVvp5B0wGt/ZLy Mjxw== X-Gm-Message-State: AOJu0YweSBortEUy/Ve9ePB6j7BgZmhruEZVMvvgqIZVkxEYHzZlFpt9 4jirzS4g50PRrFz6rUJE25bo+hfyCxBAbIjqLbkWhLHLTPrZmHb7G1MIGCRSK2S8PkpWXYM88/T gSJWhQmdUz1QlzvBY6fZiduevQkJItpi4tUjrmZp+27CFh7z23GAZ X-Received: by 2002:a1c:7419:0:b0:406:7d74:a2a6 with SMTP id p25-20020a1c7419000000b004067d74a2a6mr1943300wmc.24.1696417872108; Wed, 04 Oct 2023 04:11:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHtUoGOl168H/jpI41xC02z/H5vFFQ6fiUxdwfFmU4C4R7xkfsp8uDgkQrON5pSOJreN9J5jA== X-Received: by 2002:a1c:7419:0:b0:406:7d74:a2a6 with SMTP id p25-20020a1c7419000000b004067d74a2a6mr1943284wmc.24.1696417871694; Wed, 04 Oct 2023 04:11:11 -0700 (PDT) Received: from localhost (95.138.117.91.dynamic.reverse-mundo-r.com. [91.117.138.95]) by smtp.gmail.com with ESMTPSA id u12-20020adfa18c000000b00327de0173f6sm411461wru.115.2023.10.04.04.11.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 04:11:11 -0700 (PDT) From: Sergio Costas Rodriguez To: kernel-team@lists.ubuntu.com Subject: [PATCH] Add missing Atheros firmware files Date: Wed, 4 Oct 2023 13:11:07 +0200 Message-Id: <20231004111107.366994-1-sergio.costas@canonical.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <2a4cbba8-76d4-4d77-9536-207eb646416c@canonical.com> References: <2a4cbba8-76d4-4d77-9536-207eb646416c@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" When using the Ubuntu Core 22 kernel in an Asus Zenbook UX22, this error is shown in journalctl: usb 1-1-1: Direct firmware load for ar3k/AthrBT_0x01020200.dfu failed with error -2 Bluetooth: Patch file not found ar3k/AthrBT_0x01020200.dfu Bluetooth: Loading patch file failed ath3k: probe of 1-1.1:1.0 failed with error -2 and, of course, bluetooth doesn't work. This patch adds the missing files, and makes bluetooth work. Fix https://bugs.launchpad.net/ubuntu/+bug/2025054 Signed-off-by: Sergio Costas Rodriguez --- trim-firmware | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/trim-firmware b/trim-firmware index 148c964..e2fe269 100755 --- a/trim-firmware +++ b/trim-firmware @@ -68,6 +68,24 @@ if [ -e "${DESTDIR}"/firmware/regulatory.db ] ; then cp "${DESTDIR}"/firmware/regulatory.* "${DESTDIR}"/firmware.new fi +# Copy all AthrBT files, because they are needed for some devices +# like the original Asus Zenbook, but only if the module ath3k.ko +# is compiled +if [[ -n `find "${DESTDIR}"/modules -name ath3k.ko` ]] ; then + if [ -d "${DESTDIR}"/firmware/ar3k ] ; then + mkdir -p "${DESTDIR}"/firmware.new/ar3k + cp -a "${DESTDIR}"/firmware/ar3k/AthrBT_0x*.dfu "${DESTDIR}"/firmware.new/ar3k/ + # the "ramps_" files are refered in the source code of the driver, so + # we must add them too. + cp -a "${DESTDIR}"/firmware/ar3k/ramps_0x*.dfu "${DESTDIR}"/firmware.new/ar3k/ + else + # fail if the folder doesn't exist, because that means that this + # script requires a rework + echo "The firmware folder for the Atheros Bluetoot firmware doesn't exist". + exit 1 + fi +fi + # Move kernel firmware files to the new firmware directory for d in "${DESTDIR}"/modules/* ; do if [ -d "${DESTDIR}"/firmware/"${d##*/}" ] ; then