Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2450082pxu; Fri, 18 Dec 2020 13:41:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJx6jJku9A0JhgyHzGqgQ5Wk9FOd6uc9kXLg5Bmq8RUiQ86ftsbPy5JmoCP5P8frZ59cW4cw X-Received: by 2002:a05:6402:a45:: with SMTP id bt5mr6403739edb.130.1608327669073; Fri, 18 Dec 2020 13:41:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608327669; cv=none; d=google.com; s=arc-20160816; b=eYQuQBnDNI6kH7Xics6xisC1gCA0eL6QW5GjbOFyt+NCs5Gd7U7rhb6Xy1y9FaA65C XNp7kC/713VvdPc+155msdLF43hv34r4oSimXVkks4envmpY4+VSjrLH2+TXSnKpkBSj PP6jZ0U7044loQTRd2jtwRQ6OolyYMuyiM0PH7v3pNVWDsfNvFrIXFIhSla+jjUcEkcR 9zmh8AmTrOLo9EvF5PlHyJ+PcMT+zoffARbPnGoqcFC1UgaelxPgLVLYRz6Yv4QkPQhS F68eGYAMApoF9hKNL8bA8uSdUp8qR+BHJffaC8CEQXLf2nvedDTyxqF1KWhTQgVSDevE F25Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=w8hslxHiWjBASPsJrc/SQtjtaglY5jiFbokunShaZN0=; b=SJELI/D7uWwsKj0QBpeTVfFm/JZ9X2Q/ZFdNHEF7Z+UB+8YhPinqkkoy/POzJ/AeOJ IzxFa2ZKz+hFGTz5nIQfDNQX/XlSzmhzIr/zwjKLFBNehy1JtYgeqLrSFlxs926R/p6W mh+DthphgB3hnJMH7WvgGQdoRG5eRXnxeOBt2txUirIrI0bIEnsfDfT21KqmJJhZ8fu0 oChjumuppabPvj9Z8BN7Ac/XcyIFowMNj42hyxqZBOPCY1Nt5VGKTJihgeMtSbuGUht8 ya4Vu0L1x3uP/uQhDLpeJQ+VTD/kQFui6SWiasmo04bB1b6VriNxKryPsWQPXwAiH0tW nTDA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k10si7136475eds.206.2020.12.18.13.40.46; Fri, 18 Dec 2020 13:41:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726430AbgLRVkF convert rfc822-to-8bit (ORCPT + 99 others); Fri, 18 Dec 2020 16:40:05 -0500 Received: from coyote.holtmann.net ([212.227.132.17]:32840 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725813AbgLRVkF (ORCPT ); Fri, 18 Dec 2020 16:40:05 -0500 Received: from marcel-macbook.holtmann.net (p4fefcdf9.dip0.t-ipconnect.de [79.239.205.249]) by mail.holtmann.org (Postfix) with ESMTPSA id D4C92CED31; Fri, 18 Dec 2020 22:46:39 +0100 (CET) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.40.0.2.32\)) Subject: Re: [PATCH v2 1/4] Bluetooth: Keep MSFT ext info throughout a hci_dev's life cycle From: Marcel Holtmann In-Reply-To: <20201217145149.v2.1.Id9bc5434114de07512661f002cdc0ada8b3d6d02@changeid> Date: Fri, 18 Dec 2020 22:39:22 +0100 Cc: Bluetooth Kernel Mailing List , Alain Michaud , Luiz Augusto von Dentz , Archie Pusaka , Abhishek Pandit-Subedi , "David S. Miller" , Jakub Kicinski , Johan Hedberg , Luiz Augusto von Dentz , linux-kernel@vger.kernel.org, netdev@vger.kernel.org Content-Transfer-Encoding: 8BIT Message-Id: <7B6FEB99-5102-4A67-986C-4A5DEFDE2166@holtmann.org> References: <20201217145149.v2.1.Id9bc5434114de07512661f002cdc0ada8b3d6d02@changeid> To: Miao-chen Chou X-Mailer: Apple Mail (2.3654.40.0.2.32) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Miao-chen, > This moves msft_do_close() from hci_dev_do_close() to > hci_unregister_dev() to avoid clearing MSFT extension info. This also > avoids retrieving MSFT info upon every msft_do_open() if MSFT extension > has been initialized. what is the actual benefit of this? It is fundamentally one extra HCI command and that one does no harm. You are trying to outsmart the hdev->setup vs the !hdev->setup case. I don’t think this is a good idea. So unless I see a real argument why we want to do this, I am leaving this patch out. And on a side note, I named these function exactly this way so they are symmetric with hci_dev_do_{open,close}. Regards Marcel