Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp3180405lqo; Tue, 21 May 2024 09:00:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU6JSMIVB5O78EWEaLrlS6wNfVLH000ee9zyYIf2lTdIVzg5MSAbwWUsUUulI+iN+tvtHr6FHmo8qJxhoy59XVNWr0MwliX/Su/sOwZuw== X-Google-Smtp-Source: AGHT+IGwdoTA7MN6mQHLyw5f3QUx+R0oW+EEVQzokN9dpzWMiUsMNtdjxkeWbdXAJ7Xh9fftOilc X-Received: by 2002:a17:902:9a4b:b0:1eb:5b59:fab9 with SMTP id d9443c01a7336-1ef4404a1admr322446085ad.53.1716307227096; Tue, 21 May 2024 09:00:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716307226; cv=pass; d=google.com; s=arc-20160816; b=p9VNrasL0DRPSaujWTc4MEGeQpBpuhIAd7NKFpJ1Xy0H4xTk9ZqGRhDyMPd464W323 tMaVeMgN4hDbY+jbwXlsEs79KYkzDs+vYeijUJWFY8aX2ahT/zgVZ+KMuNLtZ0I9CU4p DcJvssbt0+v9RNizReonrYDimyFxa6dyUAl/ilZ0f0zgwOAbPSVfy+yeLcP36Q1RkNoh LxEJ5erjQYqA9zDy/4+Wb1IDH++sokUsuCP98LwIaP1pHkJvDJZ5P8DWJQw5mbK8XvJa FHolPEz97EBRROJE4U3/CbbaxSmzzupqFRmoHCv8ike5WSCjSXL3zXDoOGLgKHl7bVcI 0Zjw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :from:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=8P8f3Xe3WKGb6+A4BlKH0j6nQd7Typm/M8fTWRmWe/8=; fh=oHAf46Z3SjDVj0tElsX7u5lQg+l0957rl1rnrRfIpdU=; b=JUTCAdNak9qSQt++9gZvZoxS0OsE2RisGnEzBw9vVnu7kLu6J2x9LYsn8rUAvVJFyJ RUGH5FwXxFv8yQpGPEPZ+aVB98mx7bg/Qjgzr8CUv+Spj/802ckiI5h/SdFzI8xrCjTX /v7DuU9hcnbTS8DZtrv/jkZn7jtVO5Ltv5riTe4AUD4cEM+QpD98yxWORFDqs6igpTbx SnCubidG77GiZn9hSy41B53y9SYEJhQuw/e+5xLEc+FXGgSB7h665Cy75cpPD9PVJa1y WxPeVuxO0OkGax9RglllWTVbX8e9NO6ywIBoaV5U5Un3Vc5e3bxadyUSgFvQbC5wRqOl 6fMw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Mg+AIiCY; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-bluetooth+bounces-4844-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-4844-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d9443c01a7336-1ef0bf31450si41130275ad.313.2024.05.21.09.00.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 09:00:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-4844-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Mg+AIiCY; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-bluetooth+bounces-4844-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-4844-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 8AE642819B2 for ; Tue, 21 May 2024 16:00:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9365A1BC46; Tue, 21 May 2024 16:00:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Mg+AIiCY" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 283BA18054 for ; Tue, 21 May 2024 16:00:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716307219; cv=none; b=S0eaATDTFFsOVm4d4SuI+8G6B24QzyiQkh/AazvTFJXw33D38sTcY/iTTWsSBuQzMoZVcy0PxShmD6KkOzGKIpK5sjknaNqMre1DPcyG9ZyErMYOOwxne4TlFEBI+xkfASwhI1H+3rpXA5hGBG3/1H0wb2aM0wReq/RP1djYnII= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716307219; c=relaxed/simple; bh=vVAEAyfrohFgwQUdSFubvGXi+5gPA2p8YiWJ6hKb29M=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=lU7KoR2hMBD1InZOF7E7st/Sfcayj9wHOyRfB8dESy+4zk6W8dHW8Q3aBxXTIhjgixGZpQ1bHHbhUm8WDtmiKUnuQzIBlFMUpav/gt/5KQTQZGASmnY8NbkghnIWnYCVk/66Zp/jpEtHUtKW3LuxKFE0u55WKmzHegRTlm2WMp0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=Mg+AIiCY; arc=none smtp.client-ip=209.85.221.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-34e0d8b737eso2134330f8f.1 for ; Tue, 21 May 2024 09:00:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716307215; x=1716912015; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=8P8f3Xe3WKGb6+A4BlKH0j6nQd7Typm/M8fTWRmWe/8=; b=Mg+AIiCYQYFNBMQw58mWdM5x1Bm+gIFhMJGoq4VxtlgsdJl3+nSiPq978Zf2xOntdL /eWu+s+uGmGkdslfLexbBocoMHIDQg2/nfjuJsklDZgWkFZcNx2zF6TVgnkGySDEsCP9 4fL0Tg/yap0+XNqHXlRQkOAmZCLLP/Vj3yi5tUYD3t5KJAwucFWDQh1eIoOTrTRlw7iY M6gWuedvwV2qQ7RuQVNJS0itJj13MK6cBr1jjZB9dy+Q5vfbZMC6z/9P085hZ5uQRfdI IS9O532QPt87qFtuovdUT3rW0yb2md4g8mDiANzGzpZxwApzfItOj/HQUyXBX5I+57Re 7t0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716307215; x=1716912015; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8P8f3Xe3WKGb6+A4BlKH0j6nQd7Typm/M8fTWRmWe/8=; b=Kk7jzMir/CG/qUyP10BZzAZjnIJLOn0vw2UCibo2pcsQQgkIbjRqixuAmkNnBxGRRj ZS1G7+kyTPoKiv+hvP35AFUtIqra2kUBcskpc2k/aFoQuEvBDL8Y630XjvzPq/dGtBbC hmhufcb6jgHfTmCq107nm8tw17inZ619RyfSAUpEpDZwqvZWks45J46fQ8cLx2GrkfNK a14cOjmOa1gutTuSlVLIIWcJtgCmbtKYxEkjLGKo8KYu7Fg9YqzOn4qFbdGC/8AIk022 O/ZhCZ1xwwWYAyReWf2bpusl+Yk5xz6f1p2BEVx+5B/SlnVPdGlxdKad+uJKaXxhlnjt jgtg== X-Forwarded-Encrypted: i=1; AJvYcCW+ohmnV8g/vJKNk7sUVwEM5QdUmuoYPx34G8Ih0lIOWi+QJllW0vpdJX9GkCpecqisIjc6MdudcsbAFAemlCWCqtnS7wgbzubxtgGkv0cr X-Gm-Message-State: AOJu0Yxi75GiHBleP2zCQD9fZab59XdGUVy9PFxUXIPsGT9Q5DLb8FKS ScJPP1W9wnZqNNfgcoV5ieN6I3/BociBftmD+10IOFcB2tJ07W/XyyWOmYZX108= X-Received: by 2002:adf:a18c:0:b0:34c:cae0:c989 with SMTP id ffacd0b85a97d-354b8e38ec8mr8449631f8f.33.1716307215517; Tue, 21 May 2024 09:00:15 -0700 (PDT) Received: from [192.168.1.20] ([178.197.206.169]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-354cece0054sm2411078f8f.102.2024.05.21.09.00.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 21 May 2024 09:00:14 -0700 (PDT) Message-ID: <4ed8d1fc-40b9-4254-90a1-9d621adc71a4@linaro.org> Date: Tue, 21 May 2024 18:00:12 +0200 Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] Bluetooth: qca: Fix BT enable failure again for QCA6390 after warm reboot To: Luiz Augusto von Dentz , Lk Sii Cc: Zijun Hu , luiz.von.dentz@intel.com, marcel@holtmann.org, linux-bluetooth@vger.kernel.org, wt@penguintechs.org, regressions@lists.linux.dev, pmenzel@molgen.mpg.de, stable@vger.kernel.org References: <1715866294-1549-1-git-send-email-quic_zijuhu@quicinc.com> <34a8e7c3-8843-4f07-9eef-72fb1f8e9378@163.com> From: Krzysztof Kozlowski Content-Language: en-US Autocrypt: addr=krzysztof.kozlowski@linaro.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2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JQqmEApiRqH6b4jRBOgJ+cY qc+rJggwMQcJL9F+oDm3wX47nr6jIsEB5ZftdybIzpMZ5V9v45lUwmdnMrSzZVgC4jRGXzsU EViBQt2CopXtHtYfPAO5nAkIvKSNp3jmGxZw4aTc5xoAZBLo0OV+Ezo71pg3AYvq0a3/oGRG KQ06ztUMRrj8eVtpImjsWCd0bDWRaaR4vqhCHvAG9iWXZu4qh3ipie2Y0oSJygcZT7H3UZxq fyYKiqEmRuqsvv6dcbblD8ZLkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le D2GYIS41Kv4Isx2dEFh+/Q== In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 21/05/2024 17:48, Luiz Augusto von Dentz wrote: >> driver->remove() even is not triggered during above steps. >>>> Commit C: 272970be3dab ("Bluetooth: hci_qca: Fix driver shutdown on >>>> closed serdev") >>>> this commit is to fix issue B which is actually caused by Commit B, but >>>> it has Fixes tag for Commit A. and it also introduces the regression >>>> issue A. >>>> >>> >>> > > Reading again the commit message for the UAF fix it sounds like a > different problem: > > The driver shutdown callback (which sends EDL_SOC_RESET to the device > over serdev) should not be invoked when HCI device is not open (e.g. if > hci_dev_open_sync() failed), because the serdev and its TTY are not open > either. Also skip this step if device is powered off > (qca_power_shutdown()). > > So if hci_dev_open_sync has failed it says serdev and its TTY will not > be open either, so I guess that's why HCI_SETUP was added as a > condition to bail out? So it seems correct to do that although I'd > change the comments. > > @Krzysztof Kozlowski do you still have a test setup for 272970be3dab > ("Bluetooth: hci_qca: Fix driver shutdown on closed serdev"), can you > try with these changes? Unfortunately not at the moment, because mainline never had a proper support for a variant of this Bluetooth/WiFi on our boards, so it was working with few out of tree patches. I think Bartosz is working on fixing it via power sequence, but that's not in the mainline yet. Best regards, Krzysztof