Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2606597lqb; Tue, 28 May 2024 05:28:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVeFLHDfG60LGX0Xd1B+R2aqs4VUOHSxjKXaVp5sG4rfFukcbO1+7Q07vWl/sHMQEHy3I5813R/z0hrthU7pkGx3CYGlGILO4wmffv1kQ== X-Google-Smtp-Source: AGHT+IEwiP3KdavFtUOFnnES1H895eW6FCADNLdV4cv2KLKnzPVFS70NJTb/JoRyBzPQyCcmiQcw X-Received: by 2002:a05:6a20:258e:b0:1b1:f7a1:df9b with SMTP id adf61e73a8af0-1b212df0a0emr20046120637.40.1716899291033; Tue, 28 May 2024 05:28:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716899291; cv=pass; d=google.com; s=arc-20160816; b=QAr5egHtAjzYTh45SVWyf7o8ryrbefQWZ0ddqU079yLLUe67jyLy5KeWf0YzdcCQp6 bdyuoqKH/gXCc2bGI6BMR+dU6QKVceC87VaHsuLXEHnUIvmJlCVN3lv/pl1IumgQDYPj C6PbMsfqcOXH9sTwkX54yl0SsCy+fTfp5sLODB9cSXSy4QVhF7MVkFckCJE/vwY/JyRM JOH1G148e1aJBh/9OXd8j3lL5vB2WDIsc/Y2i4QMhj3RKty0Wj0DtIr9yDR3PPqi96V5 ScUeJ4FTNrAei/L6ssVY4YZ0NHqX/XxqEJMaMkNO0sztLYrYNJUfpi5/0fTpzMSEFeQm CFWg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=xtQTzcuwR5RIrvdVCwk6SoidJz/PMhtH2p6tuhNr0fc=; fh=ifdLxK92l6kfTrZHZj0ONZHOwBLmKmLjnAFTMHP+HsQ=; b=mOIS3UtEXhi5OCJHDUGl3Ebn/vxrxo8sNIqpXwm1URAaXytOCvhjV8cU35c9IQJqzX bAc4xK4CyIg+jQZTDfJqcGo7wzvkFfiWCe9xxMbDesTYUYhWWXOPAJ5ZnBc6xFLdp+tI qQ46fyWEeoU+rWC/ANIFH4BlYg8rR3mARZTD+DdfXv7HG0Q6fahiVGtjearST1u+mL7A VTt3Z0VOiaOPCtswoxDJ/YaZyxnezYym/2qTYXh4Xq9eenFXReZqo1CPjUzxwRk7sV4O 3MBXnEi5Hp0RLXk4mDDl/ru9lNeh321rQCOf/dlbLSUMyJ8LHUTH3rFwlczSHi5emJ2J AchA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=dRQwfNcZ; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-wireless+bounces-8197-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8197-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d2e1a72fcca58-70179be4840si3268239b3a.273.2024.05.28.05.28.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 05:28:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-8197-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=dRQwfNcZ; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-wireless+bounces-8197-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8197-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 0E39F28660B for ; Tue, 28 May 2024 12:27:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D88D36F08A; Tue, 28 May 2024 12:25:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dRQwfNcZ" X-Original-To: linux-wireless@vger.kernel.org Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.43]) (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 2FE7E16D4C8 for ; Tue, 28 May 2024 12:25:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716899145; cv=none; b=Uqca2q+H961hx9Ssw+9EOVEv/jcC+Lu5Awv0SdCUKQo4kqhL8IsHVEWHSpjfCRNtP//gQXswvXV1cie9FWBGC9XkHFwYsUEx5at4CcQB4ELpTFjlMeGwkCtVwLagJ9A3RusLe+shXVAK/xbRNqEqnWwFdN+vfyfGJG8vxnxIw8I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716899145; c=relaxed/simple; bh=0flKcpmTI1kGdeZhR/8SnoUbTYOKjlKrDabA8ATdfW4=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=B68a5jP1Sf1Cw48MsB2+M5UPizJ0oNFCSectwwCuBydnROlPopU/IdJJXf7LmA0WExfntJUm7+FDSsiH9yNAc76NtW+XrXOHvHcr2n/8AKisZjKhvZ2heth2Gp2CahHTMj/ELLuNaE4+DBjiJYpPvVklqCJ2iaUHtBWcrEQT8Ow= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=dRQwfNcZ; arc=none smtp.client-ip=209.85.218.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f43.google.com with SMTP id a640c23a62f3a-a635a74e0deso15154866b.0 for ; Tue, 28 May 2024 05:25:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716899142; x=1717503942; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=xtQTzcuwR5RIrvdVCwk6SoidJz/PMhtH2p6tuhNr0fc=; b=dRQwfNcZInTPsyGDrcvtDuwc7OmE7UhoNy6LnmBEvlCEKW2KEjhGzPrDdPwBSojqyJ KSbt+T6YVeSCQhLXhvjaky3shO7nvZ39Kkt89V5rLBrFtJOUXHg4tcPB8FVgHMnJWJj9 suSL0Vh4njlKc181X8jaWpILBd+E86USW/JP8mDyPaGOcxSbBhKvmHF72HpwBnYyGHRs wkhuaxduwrTneNFQz6kpa22gXHViVXzuoJQsQiAn0039pJ37EWcu/GzRhXZDvY9lwJFV lOXbfxQF9MX4xPK5Ta+Um1HOm6LvfaEjKWb2ebvJENoU+oI7Dv/qUhR1AhIOkIjM5PYI VgwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716899142; x=1717503942; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=xtQTzcuwR5RIrvdVCwk6SoidJz/PMhtH2p6tuhNr0fc=; b=pNcxfVRFk6OFi0zbgYNO16m1K76INZURl1L4OUt31t61Si5lLqIWrlu3V8rSvAfSIX +lWkOpRCRpXqf7tVqeoit6SlN34uLS1FJc77EPAzgiAZJg+RodrZOBfmlzcdVLUwub8X F/IB89ZfwUVa86CdUn+1n+LlFJ8l9l8co5a4+9a1l0Z63VhBsunh8fmu4tUwcGDpmzl4 AvaWSGmGr+ENOlHpGZUSlyVCOs9qTSDAYUuSIlHfosMb0uBm3lUR10xOr4Ot3yZkHq11 CsZd76Fy8wqz3oQ2LFr6adghpC+1w1xM6bhm+rgPgsylt9TqxtaPxSrSRjqzqnbDWy/4 MpMg== X-Gm-Message-State: AOJu0YzjTAz9ngTLqaAybq9u6/B+lbf3KkMHMxKt5Be3AwOHktgKCOee fDsX1rYwyaa3dnRgFcS/+IMDFOLYvSAr4pwM+BwyRZjC4RjcRaJN X-Received: by 2002:a17:906:bca:b0:a5a:743b:20d2 with SMTP id a640c23a62f3a-a62643e2436mr731345266b.38.1716899141017; Tue, 28 May 2024 05:25:41 -0700 (PDT) Received: from [192.168.0.50] ([79.119.240.1]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a63395fb1d0sm86524966b.89.2024.05.28.05.25.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 May 2024 05:25:40 -0700 (PDT) Message-ID: Date: Tue, 28 May 2024 15:25:39 +0300 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Bitterblue Smith Subject: Re: wifi: rtw88: 8821CU hangs after some number of power-off/on cycles To: =?UTF-8?Q?Marcin_=C5=9Alusarz?= Cc: linux-wireless@vger.kernel.org, =?UTF-8?Q?Marcin_=C5=9Alusarz?= References: <20240527173454.459264-1-marcin.slusarz@gmail.com> <0f1aef25-2b91-408d-aca9-9943dc9367b3@gmail.com> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 28/05/2024 13:42, Marcin Ślusarz wrote: > pon., 27 maj 2024 o 20:43 Bitterblue Smith napisał(a): >> >> On 27/05/2024 20:34, Marcin Ślusarz wrote: >>> From: Marcin Ślusarz >>> >>> If I don't connect to any Wifi network, after around 10 minutes, the device >>> hangs with endless spamming of: >>> rtw_8821cu 1-1:1.2: rtw_usb_reg_sec: reg 0x4e0, usb write 1 fail, status: -71 >>> killing both Wifi and Bluetooth part of the device. >>> >>> On arm, just leaving the wifi device unconnected kills it in up to 20 minutes. >>> If I keep restarting wpa_supplicant I can trigger it within a minute. >>> Looping "ifconfig wlan0 down; ifconfig wlan0 up" also triggers it within a minute. >>> >>> On x86_64 system the only way I could trigger this was via ifconfig loop, >>> but it took 3 hours and 20 minutes to do it. >>> >>> The only thing that can "fix" the device is replugging it. >>> >>> I found out that the reason for those hangs is a power-off+on sequence that's >>> triggered by the above steps. >>> >>> Disabling power-off for that chip "fixes" the issue. The patches below >>> implement that, but I'm not seriously proposing them for merging. >>> >>> Marcin Ślusarz (2): >>> wifi: rtw88: use RTW_FLAG_RUNNING for deciding whether to enter/leave >>> IPS >>> wifi: rtw88: disable power offs for 8821C >>> >>> drivers/net/wireless/realtek/rtw88/main.c | 14 ++++++++------ >>> drivers/net/wireless/realtek/rtw88/ps.c | 4 ++-- >>> 2 files changed, 10 insertions(+), 8 deletions(-) >>> >> >> The first patch alone doesn't fix it? > > The first patch exists only to make the second patch work. > Without the first one, rtw_enter_ips will perform all actions except actually > doing the power off, which clears the POWERON flag. > After that, rtw_leave_ips will happily return early success without actually > undoing the stuff that rtw_enter_ips did (like canceling all work_structs). I see. I wonder if it's really the chip that has a problem, or rtw88? Can you try your ifconfig loop with the other driver? https://github.com/morrownr/8821cu-20210916/