Received: by 2002:a05:6a10:8395:0:0:0:0 with SMTP id n21csp648033pxh; Tue, 9 Nov 2021 16:48:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJzIaN+nWYtQnXz1ZdWKRXVtTLgePBY0SCLlWPOCN82K5HrxCsQmqpDReBHbAS/E5vaf0Jqr X-Received: by 2002:a05:6e02:16c9:: with SMTP id 9mr8394183ilx.166.1636505324487; Tue, 09 Nov 2021 16:48:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636505324; cv=none; d=google.com; s=arc-20160816; b=cHFdwuDz3/+sWPfAYI1YxA7ZnvMZNPCeDL6N2lJQaioWxZY1dahMRGTDVuuOKeEegS KCqPas2eZx/YhuYzcccaXtPPzQon1U4GVCB0C2f/TxZBp3RqL9GEzGeRyFl12LVxACFw 1vo2an4rSAuoFZ9hXTouuRJVE2rgMu3ux75sWSX+41aaaaPam1afrKSF+zoaU1sacdgC LKVT44j37YE6q1g2HtJADI5iQf0/4iFSWXp4BM1d+vCltJ70xFU6N+r2B22wHIx5NrRj M4f1O2FWWqjkyt24wq3yyQiRX7eNVGrhjSyl5ghukzNv0ytZLuKIyPsjqV1CrCI5B+dJ DzVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=NNBlkyCfDq9pVW5kW5Bl/ZDUnuVfkvlAxyA5xr2Xf1Q=; b=0RhDlMvdK3T5I5NFcfmYO/rb089kuqH0WYPIp/WqqTb/jrrkYY50rlkGAEW1cKFG8P jyZK0qnLpedt1g6iqLGcCHGfCLFW0yg1XwI5pHs4+dX5SesZR2JZT3SVRStyU3GsNvxB q1fUp45YW8L223B3zD+1qyZmfhZ0j08Y5JJRXj2Krov9B9rFB9L3z3keUYpMkKzT8XDd LaUgYmOZL6z1t9lld/kdmuNtgE76e4VYvHHER7Dc5aZB4vuRl4qjYRbOj1p8FeSZS79E kqgRI6mz8SQ/Xosygab55irjHhx5xta5uLK2IPtPVLyUcS7X0tEKPeX4aRqSCCChyeUL u+LA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Fpx8m9oK; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f25si4254129iox.8.2021.11.09.16.48.32; Tue, 09 Nov 2021 16:48:44 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Fpx8m9oK; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229850AbhKIXQL (ORCPT + 99 others); Tue, 9 Nov 2021 18:16:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232357AbhKIXQK (ORCPT ); Tue, 9 Nov 2021 18:16:10 -0500 Received: from mail-ua1-x934.google.com (mail-ua1-x934.google.com [IPv6:2607:f8b0:4864:20::934]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C959C061766 for ; Tue, 9 Nov 2021 15:13:24 -0800 (PST) Received: by mail-ua1-x934.google.com with SMTP id b3so1023509uam.1 for ; Tue, 09 Nov 2021 15:13:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NNBlkyCfDq9pVW5kW5Bl/ZDUnuVfkvlAxyA5xr2Xf1Q=; b=Fpx8m9oKe3uyyaRAY/ExGIjwkpUJwAtPb6DqhS5w07r7u9oHE8/5bdRiwlhX86Wx1Z sKIaXYteg29YI+AZc/XOFuDBFKccRRnKiuOaK4Q7g5ZwhK0o88c3+O6HV6GDaejx0Dj4 bbnE5YWY+dBwa6red1int5Powh/eNN3ieq3NY52bVysB4T8rG9vMmCoMAfluW+sAtlly rE51StE7GZr5XTgr27OOJ2zxzWsHR0/4MpVva/uLhFU/BABz8uCL8D93a2BYT9KpV0Im +0FMKRTmbmgN75dp1a4EN9Ha1OEpgk+FIvGWaJ5VunM9+Vz6pnBepsuod4K+9GJHxgFX nYxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NNBlkyCfDq9pVW5kW5Bl/ZDUnuVfkvlAxyA5xr2Xf1Q=; b=DE00jeNlo92HJZANm7Cx5Qz3FPsuZ/eINqt6mK5LKrAn1tbLrnSNgUNqKoKafcamGj 9+3w6EQcP85Je8SC8H54atOt7qjQf+tbHUVMmih3LJts/4aZTJKWQEhJ1Z5kMipidxN4 5mjkRmZnjxPICnHBAXrS6tuEODhi848WL6vDqJsA60dQY/3qcf220OacK02EYUM7wVKT is71gvo9B8+GEoO57pNkHLDFRyY3rAHNxuQFF91sNoylsz6XDBi2fJAIxrsZIFQy3cuK tyP2nkWfUMeGtRkYx2M2lsHmWRv6kTpJ2Yme0Vqroho1KNIlzvtPNJOf1c6K7QVNUm0c /uvg== X-Gm-Message-State: AOAM532MZ0ljpEMgEAgwWGK8GF562aPukE24ikAXV+KcNZCKuRAySCaJ Y9mxGzPrU/cY2bC8YTjN02pCSZusrP1jYYbqS5Y= X-Received: by 2002:a67:b844:: with SMTP id o4mr125542735vsh.61.1636499603057; Tue, 09 Nov 2021 15:13:23 -0800 (PST) MIME-Version: 1.0 References: <20211109164113.65981-1-benjamin@sipsolutions.net> <20211109164113.65981-4-benjamin@sipsolutions.net> In-Reply-To: <20211109164113.65981-4-benjamin@sipsolutions.net> From: Luiz Augusto von Dentz Date: Tue, 9 Nov 2021 15:13:12 -0800 Message-ID: Subject: Re: [PATCH 3/4] Bluetooth: hci_core: Signal TX failure if sending a frame failed To: Benjamin Berg Cc: "linux-bluetooth@vger.kernel.org" , Benjamin Berg Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Benjamin, On Tue, Nov 9, 2021 at 2:35 PM Benjamin Berg wrote: > > From: Benjamin Berg > > Call the hci_tx_error handler in case a frame cannot be send. > > Signed-off-by: Benjamin Berg > --- > net/bluetooth/hci_core.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c > index bbb35188e41f..8664c2fbacdb 100644 > --- a/net/bluetooth/hci_core.c > +++ b/net/bluetooth/hci_core.c > @@ -4200,6 +4200,8 @@ static void hci_send_frame(struct hci_dev *hdev, struct sk_buff *skb) > if (err < 0) { > bt_dev_err(hdev, "sending frame failed (%d)", err); > kfree_skb(skb); > + > + hci_tx_error(hdev, -err); Either we do this here by calling directly hci_cmd_sync_cancel like I suggested previously or perhaps we should have the error returned by hci_send_frame otherwise the current thread still has to wait to get the error from req_result which perhaps is not necessary if we already got a proper error here just return it so the thread doesn't even need to sleep. > } > } > > -- > 2.31.1 > -- Luiz Augusto von Dentz