Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp6272077rwn; Tue, 13 Sep 2022 01:23:26 -0700 (PDT) X-Google-Smtp-Source: AA6agR75CxHLgm4cy/xqsOYajY9JMZI0TJTvVJi6BzlC1kdjbxZ+/Vi5pRrMFLDtYRfE9edsBQbi X-Received: by 2002:a17:90b:4a0c:b0:202:b4ed:1a2b with SMTP id kk12-20020a17090b4a0c00b00202b4ed1a2bmr2687664pjb.67.1663057405918; Tue, 13 Sep 2022 01:23:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663057405; cv=none; d=google.com; s=arc-20160816; b=ow400bonvBNRJRppA4GDy7mO1TICv31oF/PL36rECowvBk5kJ1PRvm2m/wVC2GyI9P 9T/ia3UMK3yoIsJ9tfvasg2vDcpSkWkrPNPHRs6I+ZG2zMaLU1PrgJBq6176rsf19dPt 8it3Hw0OSBXVH/F3bmTaKEpB9qFMSlUuWMzUl4S+ERU0p0pDq91ySMpU3zVfX1shdl35 NLbAeG6heiM9h0rKDlpvcADjKsPCajImJN3VMwP+RA2gSO3BpsQLbNHzDXK1dqzzeZWF mr6h/mV2amrKYerdXMdetvKb6gzar7x8jxkyZ6BQXJfvx0jrPp9EYaMRZb19k5gHrGpC tMiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=02557o6QWwGoA5/orMYBbco61qHxyewTQ7Y8qKzdwOg=; b=ZOWkxbwaqUzCabzOBqSHhrdDkpbf5gFby8yfNbjjhAu0Nw/AQs6ofol1qgC0yFY458 SrJ6su7e3pyBO+w7fGDkZfvH6dq41oQhc4sheeA2vJDD9BSkGusoUsValgQNX0u7dfGS +mG7pmOANKRXTMUEwO/te/tVrl8cLUdRj2xgDxljvzUdBDq02BXrwHwlNixrU5wij2si YNQstlZ3XmIX1Mv1GvTGMg1PKL0OxJey4yEi4vwQ4AcTgfWCFAnZrdlpPrQJUAJ4CsNX IKIfWX+kXHWa5VmiXW9vBadYdACJioHrDD2m1Wbmhqip5RSTBJIJVho+mQBNLrDhQZt2 6BSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=m0lJiLGU; 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=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g4-20020a170902740400b001746ff6ee6dsi1035735pll.413.2022.09.13.01.23.06; Tue, 13 Sep 2022 01:23:25 -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=@collabora.com header.s=mail header.b=m0lJiLGU; 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=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231260AbiIMHtb (ORCPT + 99 others); Tue, 13 Sep 2022 03:49:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231290AbiIMHtY (ORCPT ); Tue, 13 Sep 2022 03:49:24 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9BCD25A3DF; Tue, 13 Sep 2022 00:49:21 -0700 (PDT) Received: from [192.168.1.100] (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 4DBC86601FFD; Tue, 13 Sep 2022 08:49:18 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1663055359; bh=mD9+p5CeWAabFjztyVRaFCcTYIBpRki8qYznPTDJVbA=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=m0lJiLGUXAo4Quv7c6czRS5bVuvU8uC2f1jClP6A6drPqz+deYjO9gv0HMKBujiTy d9tgiMfaLaFexlr0QHL7mF5M79PHGzLZOOhj9eIxJbH7HjlBpx6nobxm1eNubGmTYu F5WwQKqa5gvdT/S8NLu22a6ZpaZyabHgP8iJL7zpZjg03AkMjwHY9IzsyTtwGju/AZ 60xSLZzDThQbGPliZ3Vil9fbDcE8tF3n52YWrYA2m8sd2XtdJ9dkCvsVe4uSe8VhbY AbVhLdTmFG/xAvtAgg+p7/VE0ZnBkEWF7Mlx+rlK6gS41Pw/ObwXa/9v9zxREaowyu L5AFScQjtX3dg== Message-ID: <07016e51-a5b5-a350-cad2-b9fcebfe3706@collabora.com> Date: Tue, 13 Sep 2022 09:49:15 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.0 Subject: Re: [PATCH 3/4] Bluetooth: btusb: mediatek: reset the device as WMT failed Content-Language: en-US To: sean.wang@mediatek.com, marcel@holtmann.org, johan.hedberg@gmail.com, luiz.dentz@gmail.com Cc: Soul.Huang@mediatek.com, YN.Chen@mediatek.com, Leon.Yen@mediatek.com, Eric-SY.Chang@mediatek.com, Deren.Wu@mediatek.com, km.lin@mediatek.com, robin.chiu@mediatek.com, Eddie.Chen@mediatek.com, ch.yeh@mediatek.com, posh.sun@mediatek.com, ted.huang@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, abhishekpandit@chromium.org, mcchou@chromium.org, shawnku@google.com, linux-bluetooth@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org References: <43b68b1f48c20b1dfcd7e6663c3dcb38e4e0648c.1663020936.git.objelf@gmail.com> From: AngeloGioacchino Del Regno In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,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 Il 13/09/22 00:18, sean.wang@mediatek.com ha scritto: > From: Sean Wang > > Reset the BT device whenever the driver detected any WMT failure happened > to recover such kind of system-level error as soon as possible. > > Signed-off-by: Sean Wang This looks like a fix, so you probably want a Fixes tag for backport. Regards, Angelo > --- > drivers/bluetooth/btusb.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c > index 653f57a98233..dc86726c8271 100644 > --- a/drivers/bluetooth/btusb.c > +++ b/drivers/bluetooth/btusb.c > @@ -2576,6 +2576,10 @@ static int btusb_mtk_hci_wmt_sync(struct hci_dev *hdev, > data->evt_skb = NULL; > err_free_wc: > kfree(wc); > + > + if (err < 0) > + btmtk_reset_sync(hdev); > + > return err; > } >