Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp21310941rwd; Thu, 29 Jun 2023 14:13:15 -0700 (PDT) X-Google-Smtp-Source: APBJJlEAEHdUco6DxpUhhhqT1lYK3YyyTn0UAM4QAXm0Ni0716t7aQjoLUWsv7DeKjUFRcUtk3je X-Received: by 2002:a05:6a00:2355:b0:681:415d:ba2c with SMTP id j21-20020a056a00235500b00681415dba2cmr1223094pfj.31.1688073195538; Thu, 29 Jun 2023 14:13:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688073195; cv=none; d=google.com; s=arc-20160816; b=FHnXpjgEI2dzwK8nCR/1mhPB3U++RTmk0QMux0GYnEqJQ3eOO3lqU50NXRUq3jJuDG GHPk0uPpZ2mcTAdXFmE/65RwtSFcB0ntc1EsjlbFdVBJRdlp2TXI42ADuoIKKiA4nV2f QIr6NVnit9QZ1lWL6lFBSUWUF91YKkiTGImRP6jPBnZ/sH0xa/an2R7B1/iMH1R/W33W IhmlYid5jVZRYUVbI1ZVFjxjybTgHUzAKVegtFTjPcgh18QQkuQqVmrw2PFzU/oG7odZ 5lfyjWOJHOKwzuGag2LZOet1aL8aU6AZ5D3s5cc/ykXnbjyxSVHSwu4vls1BvoMSB4pK wz3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=tYM5SdXApbs5UlDa5x0c5XBikN3h6vAe0XNHAnuaE7A=; fh=gmANG+yOIB7DAInQ/8uI47tai7UIkR7ssVc9phY97+c=; b=VJgkqIYF2z/yGNThaunIjRI5xPgY4viSPON+VdreK9N5Cvj9nVO15NTkEW4ddybB8w 8WZBop0otvYKGAvIIO9zDaEbsKBBeDTO/1iV0yFe7DvCk+xBJNVNhtVgEplCd4/qvaRT FicsIbZdjRvAJ8l+nxTiJNR07KCl/xGnVFufhoKM4xa0HJ1q8bAtfuEizKXmWS/E2WnJ FAIkNzPXkhLeikITiy0O1cJaBXimo7prwiejMfZnJP3LymB3lXdeMC9DH0vdgfmxoMJc FFMxaTBVtqcRCBwcNYguRG+ta95hqf0eQdjWG9cjdToQ9XKN27SH1LbtI6oMuO0jXAYO YStg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=R0Czxeqa; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cu12-20020a056a00448c00b00672ad8f038csi9413799pfb.184.2023.06.29.14.12.52; Thu, 29 Jun 2023 14:13:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=R0Czxeqa; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-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 S231446AbjF2VIM (ORCPT + 99 others); Thu, 29 Jun 2023 17:08:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229727AbjF2VIL (ORCPT ); Thu, 29 Jun 2023 17:08:11 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CED2A2D4C; Thu, 29 Jun 2023 14:08:10 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 699EB61640; Thu, 29 Jun 2023 21:08:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CC82BC433CC; Thu, 29 Jun 2023 21:08:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688072889; bh=QVWWSgeIDy9G1T0y1s1CguF1zCjfXWdS83lM64yH870=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=R0CzxeqamLxMSeOUudK9QLDYHXutU4k1i7YAU/+nbdoHGbbXXiPe7urw9sDNEJLAL aVDE8AZM6wPuRaqrkBRJQ+Vsp7VabCX8CRCZyCzpLv0sGygnHpMeEzcuGK9nBIb98U Wj3wtfiP8Or1RUoId9/E1N7KZdRJTK/S+EsW7yEiRpxUebQt52CKB3gnG9nY9/9Fo5 OE9oWn+jsh5oWgUc3BBhvjBbt72tozVDtgMUSHcEabrlow+kZqmeyfQ2/OJFpl9UTk OeytmAd7bSVCpIXGYlID5yu9Gs8H4hh+ifQbjlMMRuDi4DLp9IO3GdvQOI7Qcl/6xJ TTi8z1bczuBiw== Received: by mail-lf1-f44.google.com with SMTP id 2adb3069b0e04-4f13c41c957so333166e87.1; Thu, 29 Jun 2023 14:08:09 -0700 (PDT) X-Gm-Message-State: ABy/qLaBOQEWDC8tMtpRYqtr8gNqtB1MmeW0zNSOh5SLjWwyBsNbSmpl vx86PpG3za5NJjDdfxTRcFMUHyuoPf+1syur/Ps= X-Received: by 2002:a05:651c:c97:b0:2b6:b9ee:a7b1 with SMTP id bz23-20020a05651c0c9700b002b6b9eea7b1mr708635ljb.5.1688072887642; Thu, 29 Jun 2023 14:08:07 -0700 (PDT) MIME-Version: 1.0 References: <1c40a12b51ccd6ee2ee002276f5b1ba92c377100.1687990098.git.objelf@gmail.com> <20b61d77-7397-e3ba-3215-232f49eb8c07@molgen.mpg.de> In-Reply-To: <20b61d77-7397-e3ba-3215-232f49eb8c07@molgen.mpg.de> From: Sean Wang Date: Thu, 29 Jun 2023 14:07:55 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3] Bluetooth: btmtk: add printing firmware information To: Paul Menzel Cc: Sean Wang , Chris Lu , marcel@holtmann.org, johan.hedberg@gmail.com, luiz.dentz@gmail.com, Soul.Huang@mediatek.com, Leon.Yen@mediatek.com, Deren.Wu@mediatek.com, km.lin@mediatek.com, robin.chiu@mediatek.com, Eddie.Chen@mediatek.com, ch.yeh@mediatek.com, jenhao.yang@mediatek.com, Stella.Chang@mediatek.com, Tom.Chou@mediatek.com, steve.lee@mediatek.com, jsiuda@google.com, frankgor@google.com, abhishekpandit@google.com, michaelfsun@google.com, mmandlik@google.com, abhishekpandit@chromium.org, mcchou@chromium.org, shawnku@google.com, linux-bluetooth@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org HI Paul, Thanks! I will update the patch with your suggestions. thanks! Sean On Wed, Jun 28, 2023 at 3:44=E2=80=AFPM Paul Menzel = wrote: > > Dear Sean, dear Chris, > > > Thank you for your patch. > > Am 29.06.23 um 00:20 schrieb sean.wang@mediatek.com: > > From: Chris Lu > > > > Add printing firmware information part when driver loading firmware tha= t > > user can get mediatek bluetooth information. > > Maybe use the commit message summary/title below: > > Bluetooth: btmtk: Log hw/sw version and fw build time > > Maybe also paste one log message example to the commit message. > > > Co-developed-by: Sean Wang > > Signed-off-by: Sean Wang > > Signed-off-by: Chris Lu > > --- > > v3: resend again with the latest tree > > --- > > drivers/bluetooth/btmtk.c | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/drivers/bluetooth/btmtk.c b/drivers/bluetooth/btmtk.c > > index 9482401d97fa..8490d59502a5 100644 > > --- a/drivers/bluetooth/btmtk.c > > +++ b/drivers/bluetooth/btmtk.c > > @@ -57,6 +57,7 @@ int btmtk_setup_firmware_79xx(struct hci_dev *hdev, c= onst char *fwname, > > wmt_cmd_sync_func_t wmt_cmd_sync) > > { > > struct btmtk_hci_wmt_params wmt_params; > > + struct btmtk_patch_header *hdr; > > struct btmtk_global_desc *globaldesc =3D NULL; > > struct btmtk_section_map *sectionmap; > > const struct firmware *fw; > > @@ -75,9 +76,13 @@ int btmtk_setup_firmware_79xx(struct hci_dev *hdev, = const char *fwname, > > > > fw_ptr =3D fw->data; > > fw_bin_ptr =3D fw_ptr; > > + hdr =3D (struct btmtk_patch_header *)fw_ptr; > > globaldesc =3D (struct btmtk_global_desc *)(fw_ptr + MTK_FW_ROM_P= ATCH_HEADER_SIZE); > > section_num =3D le32_to_cpu(globaldesc->section_num); > > > > + bt_dev_info(hdev, "HW/SW Version: 0x%04x%04x, Build Time: %s", > > Why not print 0x%04x/0x%04x, that means with a slash? > > > + le16_to_cpu(hdr->hwver), le16_to_cpu(hdr->swver), hdr= ->datetime); > > + > > for (i =3D 0; i < section_num; i++) { > > first_block =3D 1; > > fw_ptr =3D fw_bin_ptr; > > > Kind regards, > > Paul