From: "Mark-YW Chen (陳揚文)" <Mark-YW.Chen@mediatek.com>
To: Paul Menzel <pmenzel@molgen.mpg.de>
Cc: "Aaron Hou (侯俊仰)" <Aaron.Hou@mediatek.com>,
"kaichuan.hsieh@canonical.com" <kaichuan.hsieh@canonical.com>,
"linux-bluetooth@vger.kernel.org"
<linux-bluetooth@vger.kernel.org>,
"linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"marcel@holtmann.org" <marcel@holtmann.org>,
"johan.hedberg@gmail.com" <johan.hedberg@gmail.com>,
"Luiz Augusto von Dentz" <luiz.dentz@gmail.com>,
"Sean Wang" <Sean.Wang@mediatek.com>
Subject: RE: [PATCH] Bluetooth: btusb: Handle download_firmware failure cases.
Date: Mon, 6 Dec 2021 14:47:42 +0000 [thread overview]
Message-ID: <SL2PR03MB44574A50769EABFA9EE3739BB36D9@SL2PR03MB4457.apcprd03.prod.outlook.com> (raw)
In-Reply-To: <61e772a7-6e46-7c0f-32ba-b3e3ad88062c@molgen.mpg.de>
Hi Paul,
Thanks for your comment.
> -----Original Message-----
> From: Paul Menzel <pmenzel@molgen.mpg.de>
> Sent: Monday, December 6, 2021 5:51 PM
> To: Mark-YW Chen (陳揚文) <Mark-YW.Chen@mediatek.com>
> Cc: Aaron Hou (侯俊仰) <Aaron.Hou@mediatek.com>;
> kaichuan.hsieh@canonical.com; linux-bluetooth@vger.kernel.org;
> linux-mediatek@lists.infradead.org; linux-kernel@vger.kernel.org;
> marcel@holtmann.org; johan.hedberg@gmail.com; Luiz Augusto von Dentz
> <luiz.dentz@gmail.com>; Sean Wang <Sean.Wang@mediatek.com>
> Subject: Re: [PATCH] Bluetooth: btusb: Handle download_firmware failure
> cases.
>
> Dear Mark,
>
>
> Some small nitpicks:
>
> Am 06.12.21 um 10:25 schrieb mark-yw.chen@mediatek.com:
> > From: mark-yw.chen <mark-yw.chen@mediatek.com>
>
> Instead of the user name, maybe you can use Mark Chen (or the whole
> name)?
>
> $ git config --global user.name "Mark Chen"
> $ git commit --amend --reset-author="Mark Chen
> <mark-yw.chen@mediatek.com>"
>
> Also could you please remove the trailing dot/period at the end of the git
> commit message summary?
>
> > For Mediatek chipset, if there are no firmware bin or command_timeout,
> > the process should be terminated in btusb_mtk_setup().
>
> Otherwise what happens?
For Mediatek Chipset, it cannot be enabled if there are something wrong in btmtk_setup_firmware_79xx().
err = btmtk_setup_firmware_79xx(hdev, fw_bin_name,
btusb_mtk_hci_wmt_sync);
/* Enable Bluetooth protocol */
param = 1;
wmt_params.op = BTMTK_WMT_FUNC_CTRL;
wmt_params.flag = 0;
wmt_params.dlen = sizeof(param);
wmt_params.data = ¶m;
wmt_params.status = NULL;
err = btusb_mtk_hci_wmt_sync(hdev, &wmt_params);
if (err < 0) {
| bt_dev_err(hdev, "Failed to send wmt func ctrl (%d)", err);
| return err;
}
The process should be terminated and returned the error code.
>
> > Signed-off-by: mark-yw.chen <mark-yw.chen@mediatek.com>
> > Change-Id: I99f1d7b72fa70643d9123e7e6cdc8d0b4369ce52
>
> To what Gerrit instance does the Change-Id belong? Without that
> information (Reviewed-on tag?), it should be removed?
>
> > ---
> > drivers/bluetooth/btmtk.c | 1 +
> > drivers/bluetooth/btusb.c | 4 ++++
> > 2 files changed, 5 insertions(+)
> >
> > diff --git a/drivers/bluetooth/btmtk.c b/drivers/bluetooth/btmtk.c
> > index c2ee5c4b975a..526dfdf1fe01 100644
> > --- a/drivers/bluetooth/btmtk.c
> > +++ b/drivers/bluetooth/btmtk.c
> > @@ -121,6 +121,7 @@ int btmtk_setup_firmware_79xx(struct hci_dev
> *hdev, const char *fwname,
> > } else {
> > bt_dev_err(hdev, "Failed wmt patch dwnld
> status (%d)",
> > status);
> > + err = -EIO;
> > goto err_release_fw;
> > }
> > }
> > diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
> > index ab169fc673ea..3ea04b1d0750 100644
> > --- a/drivers/bluetooth/btusb.c
> > +++ b/drivers/bluetooth/btusb.c
> > @@ -2554,6 +2554,10 @@ static int btusb_mtk_setup(struct hci_dev
> *hdev)
> > dev_id & 0xffff, (fw_version & 0xff) + 1);
> > err = btmtk_setup_firmware_79xx(hdev, fw_bin_name,
> > btusb_mtk_hci_wmt_sync);
> > + if (err < 0) {
> > + bt_dev_err(hdev, "Failed to setup firmware (%d)", err);
>
> The verb is spelled with a space: set up.
>
> Also, this error message seems unrelated to the patch in question. Maybe
> add it in a separate commit?
>
> > + return err;
> > + }
> >
> > /* It's Device EndPoint Reset Option Register */
> > btusb_mtk_uhw_reg_write(data, MTK_EP_RST_OPT,
> > MTK_EP_RST_IN_OUT_OPT);
> >
>
>
> Kind regards,
>
> Paul
prev parent reply other threads:[~2021-12-06 14:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-06 9:25 [PATCH] Bluetooth: btusb: Handle download_firmware failure cases mark-yw.chen
2021-12-06 9:50 ` Paul Menzel
2021-12-06 14:47 ` Mark-YW Chen (陳揚文) [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=SL2PR03MB44574A50769EABFA9EE3739BB36D9@SL2PR03MB4457.apcprd03.prod.outlook.com \
--to=mark-yw.chen@mediatek.com \
--cc=Aaron.Hou@mediatek.com \
--cc=Sean.Wang@mediatek.com \
--cc=johan.hedberg@gmail.com \
--cc=kaichuan.hsieh@canonical.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=luiz.dentz@gmail.com \
--cc=marcel@holtmann.org \
--cc=pmenzel@molgen.mpg.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).