Received: by 2002:ab2:1347:0:b0:1f4:ac9d:b246 with SMTP id g7csp224655lqg; Thu, 11 Apr 2024 00:11:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXCPW5r6jxTd+n2RpxAjEyYSolLjYdaB6DkOuFCp7jHNbfYChPKXxzMtwaF/MZO2QvZm3ASgEvxw3FXAb3RTTU6bKRxx7L9IVaD/25fwQ== X-Google-Smtp-Source: AGHT+IHTLXYexkQJz8e5HJqAIighQFrVwRYtKVqVQ0GFrYDOELjDoGbUsBXduyvv8tM4kus2L/5O X-Received: by 2002:a05:6a20:9785:b0:1a3:c43c:9ccd with SMTP id hx5-20020a056a20978500b001a3c43c9ccdmr4935453pzc.42.1712819462067; Thu, 11 Apr 2024 00:11:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712819462; cv=pass; d=google.com; s=arc-20160816; b=oEjv6qse3MfZlUDrTQjN7bzP91NnABr04d/LV4jF13szp27Z9enOnXcHJi/1gaB06D X54d8aozOiLpghn8u2nYF9+EqdXySLU/E6YiWeeamC2w+DcwVtNdZrZ6WL3bDjZzqrjm f35PmIziu1b4JVg/il903wMlP+3oYDTD0HbtT02V5vEevckQeJTEvc2lnsXUhRv2hyKj fkMthz4rs1PUUMuzybIyBN/PUKpM/93JtQ97BzS6487P8n+GDyIfMf9MOj2urk4WkBia Bc/IHzxXmnfmZRmnM8RpKRzOrQ/TFEuzn6PD6SJ3j8ebmsDLEuhixkHQLa4Z5Vmw9nbn t6Og== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from:dkim-signature; bh=jmHHs4/bEcCXs2lLAqswDa6fIkQUgFGHvAfMYM2tPh0=; fh=M+xh/9V+QbDp40IiMi7hvyd/+ZizxziwCUaG507cMSY=; b=TflCyHmVkdjKSAXW0Ma3GCKQfUGjejsmyngPOC3zK8W9dCufaMdSGK4pB3EZZgwFNm /F9N1WDD1hqDzsHbjaRml+Q4xsbfQU8gfTBcaOUxpL4aO+HltI6y7XeUSc/ku3snFB0D OGdO6epJUwsXj9tg8m34jM7loDfA24G/plegi6xYGk71m1KMLfvh+QicxNn3MwQCkKlD Zob33bFOJy2qOgBbF6j6SfhU+9axNrh2yr+bk6BPJSBVA4G3pjpN6YPLpSDtQtGS2BAB P9+dYcHgF/LNB0z9lo15PhWCF0C6oIgDCY1PIe4PCHcOVyuIrWUBBy1BsyW4u9rEKUmJ La4w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ku5tSdxO; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-6146-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6146-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.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 p35-20020a056a0026e300b006ed17908318si869602pfw.319.2024.04.11.00.11.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 00:11:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-6146-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=@kernel.org header.s=k20201202 header.b=ku5tSdxO; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-6146-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6146-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.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 B26D5280F6F for ; Thu, 11 Apr 2024 07:11:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 10DBC13DDC5; Thu, 11 Apr 2024 07:08:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ku5tSdxO" X-Original-To: linux-wireless@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E06DD13DDC3 for ; Thu, 11 Apr 2024 07:08:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712819332; cv=none; b=mHWG3JZ4BU1Imv+BKMeQAf6xzxkz44vnhEODAMUSXObB8YiCjFaqGXDFRwHUr1My84LFU7Qrimi9cv6G59XWCVqIVoeiJs0AWvP+mSY+zXXTrTsUROItuOv0l9CQc1OFmcG1HKHbnFOJi+OCkGgPTT/wpbl7oi/JjSdGXGC98I0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712819332; c=relaxed/simple; bh=JOiGvpeX5ent4J7D33rKQHoM/IvqydTc5RevJ+ufxLI=; h=From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID: MIME-Version:Content-Type; b=l8u4xEkOsxR2sXm64Q46wdjIiEM9wRHlDviSrsuSONxqz+7ZVuN1a3xM9kmD82Z+K/oolzagBSu6hucNoJoTbaGkc6gxeDq3aC8np6ZOfbtS6XUb/rNEMXBdcdzwiVlPcSrkEuqLQmkYYsaLqi3NdPBP0OADJ2onCFdfkOq6P3Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ku5tSdxO; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 571A4C433C7; Thu, 11 Apr 2024 07:08:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712819331; bh=JOiGvpeX5ent4J7D33rKQHoM/IvqydTc5RevJ+ufxLI=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=ku5tSdxOPHLXw8+75hytUR+u3j29Vj9wgoIe9a72RjzNcXIvNMh0mL1TRaHEXPhng 4K+FFu49pCwp1dQug9kuatJxe/GyBtx/y7yMlrMbu1OJzBINX2aWA2gR8limGLUf6e K+bKSnp3rBEHmIBQrEuRK99Oil4dHV7/Y5ywH/zxbmz4Z2Y3coOrtYb4v1bBDQobrk 7QeOn4YCRuvc1msyXuvJILvzeTw0b2e6RaoYzzMyJUZGlT11tN1+z83WUwjYjGWSfx lrq5qDyBpFTm9k3wCCz40iZmeMsc3j8BPvGRNBth7+YFxjxDBfnVeyIVmZfMkT8NhK oq27p4zpOlekw== From: Kalle Valo To: Larry Finger Cc: Ping-Ke Shih , Larry Finger , Johannes Berg , "linux-wireless@vger.kernel.org" Subject: Re: [RFC] rtw88: Fix startup problems for SDIO wifi plus UART Bluetooth References: <4umro86wvv84.MjDfYvt4P5uZryt8boBK8Q2@1EHFQ.trk.elasticemail.com> <5af71338f3904aac9d2c237637c851e7@realtek.com> <287e9d4e-316a-4579-961e-58e75abea534@lwfinger.net> Date: Thu, 11 Apr 2024 10:08:47 +0300 In-Reply-To: <287e9d4e-316a-4579-961e-58e75abea534@lwfinger.net> (Larry Finger's message of "Wed, 10 Apr 2024 21:47:58 -0500") Message-ID: <87o7agjs00.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain (dropping stable list from cc) Larry Finger writes: > On 4/10/24 9:13 PM, Ping-Ke Shih wrote: >> Larry Finger wrote: >> >>> As discussed in the links below, the SDIO part of RTW8821CS fails to >>> start correctly if such startup happens while the UART portion of >>> the chip is initializing. >> I checked with SDIO team internally, but they didn't meet this case, >> so we may >> take this workaround. >> SDIO team wonder if something other than BT cause this failure, and >> after >> system boots everything will be well. Could you boot the system without WiFi/BT >> drivers, but insmod drivers manually after booting? > > I sent the request to the user with the problem. I do not have any SDIO devices. > >> >>> --- >>> drivers/net/wireless/realtek/rtw88/sdio.c | 28 +++++++++++++++++++++++ >>> 1 file changed, 28 insertions(+) >>> >>> diff --git a/drivers/net/wireless/realtek/rtw88/sdio.c b/drivers/net/wireless/realtek/rtw88/sdio.c >>> index 0cae5746f540..eec0ad85be72 100644 >>> --- a/drivers/net/wireless/realtek/rtw88/sdio.c >>> +++ b/drivers/net/wireless/realtek/rtw88/sdio.c >>> @@ -1325,6 +1325,34 @@ int rtw_sdio_probe(struct sdio_func *sdio_func, >> [...] >> >>> + mdelay(500); >> Will it better to use sleep function? > > My thoughts were that a sleep function would tie up a CPU, whereas the > delay would not. It's actually the opposite, msleep() allows other processes to run. "In general, use of mdelay is discouraged and code should be refactored to allow for the use of msleep." https://docs.kernel.org/timers/timers-howto.html -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches