Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp2442563iob; Sat, 30 Apr 2022 08:39:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyNjvWSpnQyFFbv1Hb0iaU9exEpQleUgntzGTWjc/cY+C7S/voyjK2ArvkCA6I8HcvSMw4/ X-Received: by 2002:a05:6512:ac9:b0:470:e6d0:1bd8 with SMTP id n9-20020a0565120ac900b00470e6d01bd8mr3314257lfu.614.1651333184558; Sat, 30 Apr 2022 08:39:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651333184; cv=none; d=google.com; s=arc-20160816; b=wDWXcVAUZoVbJcUz9wmtnbbBpQLsYjp26vqz2VNFTgzQDAaPKh0QaP5zDz3xlEhumc j1CtN1BWUgFR5qhWFgZM4nIbr2I4HG6C1RvPBZnxji4LblN5FkjEhgHIMoY3lk/7U3If GIQIGwYml04ziFUlEVVesCkylIpyKO6Vny2T+ydH6gdLbMjhkzeGDTVdUPnRCAwBX4J9 8gi6eTXQtr9wzxeAfPq/EPQkhMIQyvz1U/5JTL6ZSwiEjihas9hVvsMx6CtYC9+bvc9N EF2IHCCY2PDLjH7ZsoH/H2fBRKBHflDxzRTFfc3Mfgyv27XCUb0VXtBE2VHtKStjvcdE MUew== 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=H81vdSVi+DDJ66eHxNYxxeDde+zaAf5R+leWs+THmQc=; b=xuQlkz/+raYwwMusfxsJ9aMfTb2USz8caSR1JlsJRvcy2BteFI8KloCqbb4AugraIg dovMHUbLTo8Ej7FZi4juRH09x7XRde3uvOP/3nSpQ1PpJfpKUJcjbfNgYe3mLfqdYZc+ zp/zr6kVYrHTDCoqbEx8F9nmZcZ4qUgb2T8KFAHw/WBJ0JueRwMAI1uUozQ1tfu4GyVB kvXcimk9lt0hXDS5cidN7J8fYEtEIXUVmn1f2xQFBKFQL5UvkBm4dpqcdgVwRimu/F4o j7T0dI2EoaDZkYqsRpxTiHyOTTVwUSp5nH0EEaLSvVIHbtc+I4iXkH3U6yIOTjoBypY8 mUbw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n13-20020a2e82cd000000b0024dba8c1cd5si9817762ljh.392.2022.04.30.08.38.57; Sat, 30 Apr 2022 08:39:44 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377915AbiD2Ow0 convert rfc822-to-8bit (ORCPT + 99 others); Fri, 29 Apr 2022 10:52:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377919AbiD2OwZ (ORCPT ); Fri, 29 Apr 2022 10:52:25 -0400 Received: from mail.holtmann.org (coyote.holtmann.net [212.227.132.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2B115939BB for ; Fri, 29 Apr 2022 07:49:04 -0700 (PDT) Received: from smtpclient.apple (p5b3d2ea3.dip0.t-ipconnect.de [91.61.46.163]) by mail.holtmann.org (Postfix) with ESMTPSA id E034FCED21; Fri, 29 Apr 2022 16:49:03 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.80.82.1.1\)) Subject: Re: [PATCH] btusb: CSR chip hangs when unbound From: Marcel Holtmann In-Reply-To: <20220429114113.356263-1-jtornosm@redhat.com> Date: Fri, 29 Apr 2022 16:49:03 +0200 Cc: Johan Hedberg , Luiz Augusto von Dentz , linux-bluetooth@vger.kernel.org Content-Transfer-Encoding: 8BIT Message-Id: References: <20220429114113.356263-1-jtornosm@redhat.com> To: Jose Ignacio Tornos Martinez X-Mailer: Apple Mail (2.3696.80.82.1.1) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS 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 Jose, > Bluetooth Dongles with CSR chip (i.e. USB Bluetooth V4.0 Dongle by Trust) > hang when they are unbound from 'unbind' sysfs entry and can not be bound > again. > > The reason is CSR chip hangs when usb configuration command with index 0 > (used to unconfigure) is sent during disconnection. > > To avoid this unwanted result, it is necessary not to send this command > for CSR chip when usb device is unbound. Besides, "skip_unconfigure" sysfs > entry has been created for testing purposes with these or other devices. > > Athough device is not unconfigured, it is better to avoid device hanging to > be able to operate. Even bluetooth can be previously turned off. > On the other hand, this is not important if usb device is going to be bound > again (normal behavior), i.e. with usbip. > > Signed-off-by: Jose Ignacio Tornos Martinez > --- > drivers/bluetooth/btusb.c | 6 ++++++ > drivers/usb/core/generic.c | 2 +- > drivers/usb/core/sysfs.c | 36 ++++++++++++++++++++++++++++++++++++ > include/linux/usb.h | 2 ++ > 4 files changed, 45 insertions(+), 1 deletion(-) send this to the USB guys first and get their ACK. Regards Marcel