Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp174335imu; Thu, 24 Jan 2019 23:52:57 -0800 (PST) X-Google-Smtp-Source: ALg8bN5xNNKdAfHd3ISwXTMVH+pXMyfD713MkdwaiwSdYa8zF3LqT1hurxoqslB2soRT4Tl6KomY X-Received: by 2002:a65:590b:: with SMTP id f11mr9095394pgu.60.1548402776946; Thu, 24 Jan 2019 23:52:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548402776; cv=none; d=google.com; s=arc-20160816; b=EpOkc26CtNQUVzbdx06EvnZ1BFMhI78pjyR5DrB/13IUL5v38c9dbGZVF0mcGMAkbn UJHahxvWGPWFFrvDfvDKTsKRlsEA5LaqSYSybK0tSrTnbkPKmsW1KBYkhg83fiSN7S3x /HREcAdNLwa8v0/Mv6+ig7SlGHLnI8z8/hmERK17eVnmfanrSRL56EUumqtmWYQFfm+j UqsXKwdCdZx86uUKY0ZoDpp8Yp5Aq/A/mVarw25Dm/eI0/olmgws2cfJHeIX3lZ/TfLT nN2Yp06EA0AYKseADpwCQhuChzcxqmU42JzEyXpVJLW67BhDZdfn0XXhP44v5DscCdiX o81w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=YiV4Bo+mA+W1TbE0bL51ow2T+xo57BDFLTQu57UaTaE=; b=tR3gZ4VK1p184dT6ealnGjbv4rrF6I//HCb2Z8+7j4V3IW8CNv6FXzt1VULBPd19FZ 22CBvcDhNjKe3vg0pqgkyQsygqc1EgoIV04Cda34d89HI0aw22v0rhDTtLNsjHtcBJE4 +PqE48rIAaG0Xp9xRLiLNjgloH2wM65iIfLuDUnBAs0ErdpSDBBSO8fSaYvKmmK+RQPL UMMQBgSgJjjINY6mPcNN8KCKgv5BQ8z2tnUig0U4P7yvojx2qYC+a9wLnJo53/gyn47t p+iaZddoan+L0HE8JKyYsUeJYtzz14s0H1T+Y8gLFmJaAnXxXjPGBzQf+tF3qyiFXiur 8QvQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z129si19803393pfz.13.2019.01.24.23.52.41; Thu, 24 Jan 2019 23:52:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728855AbfAYHvT (ORCPT + 99 others); Fri, 25 Jan 2019 02:51:19 -0500 Received: from coyote.holtmann.net ([212.227.132.17]:38959 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728680AbfAYHvS (ORCPT ); Fri, 25 Jan 2019 02:51:18 -0500 Received: from marcel-macpro.fritz.box (p4FF9FD60.dip0.t-ipconnect.de [79.249.253.96]) by mail.holtmann.org (Postfix) with ESMTPSA id 155D9CF174; Fri, 25 Jan 2019 08:59:04 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\)) Subject: Re: [PATCH v6 4/4] Bluetooth: btusb: Use the cmd_timeout method to reset the Intel BT chip From: Marcel Holtmann In-Reply-To: <20190124232814.252661-4-rajatja@google.com> Date: Fri, 25 Jan 2019 08:51:16 +0100 Cc: Johan Hedberg , Greg Kroah-Hartman , "David S. Miller" , Dmitry Torokhov , Alex Hung , linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, netdev@vger.kernel.org, rajatxjain@gmail.com, dtor@google.com, raghuram.hegde@intel.com, chethan.tumkur.narayan@intel.com, sukumar.ghorai@intel.com Content-Transfer-Encoding: 7bit Message-Id: <9916633A-DB56-49E2-94D5-CE809AE20A31@holtmann.org> References: <20181117010748.24347-1-rajatja@google.com> <20190124232814.252661-1-rajatja@google.com> <20190124232814.252661-4-rajatja@google.com> To: Rajat Jain X-Mailer: Apple Mail (2.3445.102.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rajat, > If the platform provides it, use the reset gpio to reset the Intel BT > chip, as part of cmd_timeout handling. This has been found helpful on > Intel bluetooth controllers where the firmware gets stuck and the only > way out is a hard reset pin provided by the platform. > > Signed-off-by: Rajat Jain > --- > v6: Move the cmd_timeout() hook assignment with other hooks, move the > reset_gpio check in the timeout function. > v5: Rename the hook to cmd_timeout, and wait for 5 timeouts before > resetting the device. > v4: Use data->flags instead of clearing the quirk in btusb_hw_reset() > v3: Better error handling for gpiod_get_optional() > v2: Handle the EPROBE_DEFER case. > > drivers/bluetooth/btusb.c | 54 +++++++++++++++++++++++++++++++++++++++ > 1 file changed, 54 insertions(+) patch has been applied to bluetooth-next tree. Regards Marcel