Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp286655ybt; Wed, 17 Jun 2020 00:31:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyhRZnZadykQEGWFsr/Jlu39TOBYPV0zsuUcPDQwXe+WhZz1TmJMyBmjEoh+aYV5WIwTj5b X-Received: by 2002:a05:6402:1d96:: with SMTP id dk22mr6245970edb.258.1592379067141; Wed, 17 Jun 2020 00:31:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592379067; cv=none; d=google.com; s=arc-20160816; b=knUA99/PxLElue+NjsIPXr7Pwt0nynoEeLcTV8W1gAyfVyqehgOcKOSe+1QZUNEUD5 btNsZkRXSKDCdG4fI3dO+4sx5/h0ivEwWnBOXEnncLisWXzMZmtw1csYPW89Q5WeRhVB YEoerW3XCQoO8AAkjvYR9T0KeJ8LqaQDg5bcV4/Gu+nO60VB6rr89jp5r8vYvaVO19Jm z9iCaERuCC4muEnLNpzpprurKPUVhz7ZxQ0KgrNCr4xn7MvfzPrcF3NwNbY9jlJZwYRi YyuGh0afviXVhk6Zu74LY8NQ362/ZwmkK4q5rpaVKBvFB5AKy38zzx+cnOyV9xT2HrDp guOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=JXly29tGybunskX2HJr5T9TmI4ZNbyMN3cj1gFLanx0=; b=W0HXQhHGrbCnRVsrZMOJUNKLMY9fe9n8Dap9QHLi4qiv+mJrsSinVBC2v1pNjAzAcy DY2MtLuXoaq3/gHApsVppw4Om1kHnQOEyRxPj5X5bDbtyRt9FUOJtnIbCgm42eWiG8uZ KSvAuMxI0dBzasDE85sVsmCUrNc9o9cxMlD/cjICDe+UJzbbwJOdvbbXaMPCsGmkbxIm VqXTDTpTNITvukUjjoUUkDJSYYbnmv3sI5ltytSkNmnEJ6yO8uHHMH4ikNXHolvT+kW1 CQlBlYh2rQVr2IYQLoxoVdl94npk/mD4AEGQH+6PjJ0E7u4pNgx3u0dxGdm7nmsaMexL tfTQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id pw15si12127999ejb.583.2020.06.17.00.30.35; Wed, 17 Jun 2020 00:31:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726341AbgFQH3q (ORCPT + 99 others); Wed, 17 Jun 2020 03:29:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725901AbgFQH3p (ORCPT ); Wed, 17 Jun 2020 03:29:45 -0400 Received: from Galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42879C061573 for ; Wed, 17 Jun 2020 00:29:45 -0700 (PDT) Received: from bigeasy by Galois.linutronix.de with local (Exim 4.80) (envelope-from ) id 1jlSVu-0003WR-Hl; Wed, 17 Jun 2020 09:29:38 +0200 Date: Wed, 17 Jun 2020 09:29:38 +0200 From: Sebastian Andrzej Siewior To: Tony Chuang Cc: "kvalo@codeaurora.org" , "kernel@iuliancostan.com" , "linux-wireless@vger.kernel.org" , "i@outv.im" , "trevor@shartrec.com" Subject: Re: [PATCH v1] rtw88: pci: disable aspm for platform inter-op with module parameter Message-ID: <20200617072938.dx56qsvcrpmtrrgu@linutronix.de> References: <20200605074703.32726-1-yhchuang@realtek.com> <20200610213720.3sopcuimas375xl2@linutronix.de> <20200616133531.7eyfu6jniywhak7h@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 2020-06-17 05:30:22 [+0000], Tony Chuang wrote: > 0000], Tony Chuang wrote: > > > > On 2020-06-05 15:47:03 [+0800], yhchuang@realtek.com wrote: > > > > > From: Yan-Hsuan Chuang > > > > > > > > > > Some platforms cannot read the DBI register successfully for the > > > > > ASPM settings. After the read failed, the bus could be unstable, > > > > > and the device just became unavailable [1]. For those platforms, > > > > > the ASPM should be disabled. But as the ASPM can help the driver > > > > > to save the power consumption in power save mode, the ASPM is still > > > > > needed. So, add a module parameter for them to disable it, then > > > > > the device can still work, while others can benefit from the less > > > > > power consumption that brings by ASPM enabled. > > > > > > > > Can you set disable_aspm if rtw_dbi_read8() fails? Or make a test if it > > > > is save to use? > > > > > > > > If someone notices the warning they still have to search for the warning > > > > in order to make the link towards loading the module with the > > > > disable_aspm=1 paramter. > > > > Is it known what causes the failure? > > > > > > > > > > I think as long as the rtw_dbi_read() fails, the consequent register > > > operation will also fail, and still get an error read/write the register. > > > And this is some sort of PCI issue, and I am not really familiar with it. > > > Such as the root cause or how it fails. > > > > Then it does not sound safe to enable it by default. > > We have had a discussion about this, but I cannot find the thread now. > People suggested that the module parameter should not be used. > And they think that if the ASPM can help for power consumption, then > it should be default enabled. But I think it should be based on that the > other platforms will not just fail to bring up the device. However, the > platforms are less than the others, not sure if default enable or disable > is better. What I fail to understand is if this error affects other PCI devices as well or just this one. And if it is possible to reset the wifi device and everything gets back no normal. Or is it just the register reading, that spams the log and would affect the system otherwise if you would just avoided after the first fail. > > > If we can default disable it, then we can help those platforms, but > > > then other platform will suffer from higher power consumption. > > > > So for those platform, where the error occurs, you expect that the user > > manages to read the error message (a backtrace from rtw_dbi_read8()) and > > connects this the need to set a certain module option. > > Yes, we can discuss if it should be default enabled or not. Otherwise the > people with those platforms can only do that to prevent this. Really bad. It would be good to know the root cause of this. So then default enable would depend on it. You could have a allow/forbid list based on DMI once you identified good/bad systems but this includes additional maintenance. I think that at the very least, if the read fails you should give the user additional information how to stop this from happening again. And either stop issuing the commands again or skip driver loading (depending what it means for device stability). > Yen-Hsuan Sebastian