Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp861551imm; Thu, 5 Jul 2018 10:09:04 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcfiMhBB7RI/u59w5zHrQxtkeThN46vxPYZlmrLQZds8ln2AdROB8qEKDMytCUo/QyKegcU X-Received: by 2002:a17:902:8c95:: with SMTP id t21-v6mr7095270plo.306.1530810544732; Thu, 05 Jul 2018 10:09:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530810544; cv=none; d=google.com; s=arc-20160816; b=XP0u7jSfCVj9BRTYJqN8TCuCO293RRyBBceXdXOsV6iW369junuMPakJZAjL7VT7kH sfeG3ojg96uGx1qUZzlEG5nLR3KK0CqtTejg5k2LF8mbsV2FG6NlxZ3SkFEPQ6vIRZuk plkGvJx0lKVE7vhXS78nxqJv5z5wuyWpjVirssp95XIy6J6J6Sjcun3p5KX/SmBpD8yl uwIgs+Z1As7nJvKgUKBAmlcKTgnfaAGqvV6EKMyWXpLh+OmPSrCqppKVWzhfnLLwlAkL RJB5YNSkoY/9UNYL7z6ycZAV7S9fIZTlquTveGqu0iRiIAr6Uh2m14UQZstS46OqcsH+ 06Zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=WqvAADWRRJrHEL/IahGc3K15twMFcMGPoc4pQzpmu2c=; b=Crx/pzUM4Nzdy5F/IY7EPJTcug/Ic560dwBqcOLsBPokrczeoluDGw4O0bN17+rMGI 9PFTvWc7rHloo9HKCqYf3+t/YWHiGZ0cMOhVc6r8kMGynDoieZidFAC6hwhSjzVBbw8b FRSTs8oHgvjvd6L4kMIJu+ylVDavR2IypIEsEbAaoMOh2ZHFbshQTRO/wSzrfWSMEoi9 R1BVaeuRuE731yCrlMH4nq8P9BOvStCCGVtIuWKmHramjCCUtBSki2oe9yv0ETmfvAMB /9ztUKZid0vj7GhoIuZiCAbGr3WRXnDhluqhEbd4GLZ/KQL1nn4JccVvgV1MTQe8KDKw 1o6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=AFVJ1sSK; 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 r7-v6si6242197pgl.1.2018.07.05.10.08.27; Thu, 05 Jul 2018 10:09:04 -0700 (PDT) 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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=AFVJ1sSK; 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 S1754135AbeGERGt (ORCPT + 99 others); Thu, 5 Jul 2018 13:06:49 -0400 Received: from mail-oi0-f66.google.com ([209.85.218.66]:34233 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753621AbeGERGr (ORCPT ); Thu, 5 Jul 2018 13:06:47 -0400 Received: by mail-oi0-f66.google.com with SMTP id 13-v6so18269551ois.1; Thu, 05 Jul 2018 10:06:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=WqvAADWRRJrHEL/IahGc3K15twMFcMGPoc4pQzpmu2c=; b=AFVJ1sSKdAeZrcp2mKGFCcUyZ1iv+HRYouHUGsBw1Wb+4gY2dF+EyrUNiiFl5qCLbZ bAyJR1RcLBp35i2nLDAnKPwAZuqrcMk6b3QHryTYIdYniAA8XNcQKdu7b4IJYReOiSVM Dv0uOBKOZ6GQUm3HlKrlNcbCQahyMTwK4G5/1U3HRXrA8GjMlzTZzE637/jPwL+VcuJw NiyMXnLYe/KyXzn1Dg8AoCNOOBo5OGmPHNzHMfefwy2+AXVLfno8YaxCuh5EKUFt+e8j DSC2TMA3iTn+BDxEmlaC1w6blxCooirijV4z/07EgKcnFmUAG2lm/PRoMtWcAGt+39Dk k7bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=WqvAADWRRJrHEL/IahGc3K15twMFcMGPoc4pQzpmu2c=; b=oLlioWL5VPDYBrm/alBB/TtHxUAxR8iAuf3T+UIb6jIuEX6Zg1yXGiQDKLxDh1Fhvk BRv05GKT1yDd8f1erbZAAGz2c4PV5xcm5PLTfeaOXCUa+SfbWaj0C3x0jYyoONRgOlZ3 udSOQqUR9JeK5WPXVSWjqMIKj2poL6qXHRNK+HLEI4tlnKrIbjBrkuonBD0NJc2O1jmS f6nsg3X+jo4yG2jfbPuJ4Qml6SuUAJfXwKNEYQYaoeAHyS0fU9R9M7P5wQ+trCUKVGXK uR6OsTC1RFm8PDXOUmJPTya8JdFDqpwOlT9yVFlzSq7f4vaQII+YhlU2exF9ucmQogY+ paJw== X-Gm-Message-State: APt69E1DVlMzjQtiQzj/DEdmhZrpgKj4j1aQOsM3PcAv4G7G+b9Da6bu iN/U3JAfpCmjY6xYmNix3Adl8g== X-Received: by 2002:aca:c585:: with SMTP id v127-v6mr8388800oif.348.1530810406574; Thu, 05 Jul 2018 10:06:46 -0700 (PDT) Received: from [192.168.1.107] (cpe-24-31-253-228.kc.res.rr.com. [24.31.253.228]) by smtp.gmail.com with ESMTPSA id t204-v6sm3695333oig.24.2018.07.05.10.06.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Jul 2018 10:06:45 -0700 (PDT) Subject: Re: [BUG] staging: r8822be: RTL8822be can't find any wireless AP To: Pkshih , "drake@endlessm.com" Cc: Shaofu , "linux-kernel@vger.kernel.org" , "dan.carpenter@oracle.com" , "colin.king@canonical.com" , "devel@driverdev.osuosl.org" , Birming Chiu , "kvalo@codeaurora.org" , "frank@generalsoftwareinc.com" , "gregkh@linuxfoundation.org" , "linux@endlessm.com" , Steven Ting , Tony Chuang , "arnd@arndb.de" , "sgruszka@redhat.com" , "jian-hong@endlessm.com" , "linux-wireless@vger.kernel.org" References: <20180704140933.3dk2ylbntltz6jqd@mwanda> <7e95bd6a-97bc-b030-26ce-83da66e5f279@lwfinger.net> <1530776154.4156.12.camel@realtek.com> From: Larry Finger Message-ID: Date: Thu, 5 Jul 2018 12:06:43 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <1530776154.4156.12.camel@realtek.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/05/2018 02:36 AM, Pkshih wrote: > On Wed, 2018-07-04 at 10:33 -0500, Daniel Drake wrote: >> On Wed, Jul 4, 2018 at 10:13 AM, Larry Finger wrote: >>> We will have to agree to disagree. >>> >>> I have no idea what the vendors are doing that cause some motherboards to >>> need a different aspm value. What I do know is that we have had to live with >>> the idiocy of some vendors saving a few pennies by only including a single >>> antenna, rather than two, and then making a problem by miscoding the EFUSE >>> bit that indicates which connector is actually in use. As we have no means >>> that I know about to detect which boxes have the problem, a module parameter >>> was created, just as in this case. >>> >>> I agree that drivers should work "out of the box", but finite resources and >>> lack of vendor cooperation make this a goal that may not be attainable. >> >> As you touched on, the ideal situation is that Realtek solve the >> issue. Ping-Ke Shih is on CC and I am adding a few more contacts from >> the commit log. The context is that the r8822 driver fails on several >> platforms unless setting aspm=0 (the default is 1). > > It's hard to have all laptop or motherboards and all rtl8822be modules in my side, > so what I can do is to analyze the issue when user encountered. > >> >> https://gist.github.com/dsd/20c05f0c6d66ee2ef9bfbb17f93f18ba >> https://bugzilla.kernel.org/show_bug.cgi?id=199651 >> >> >> If we don't get a timely fix from Realtek though, I think there is a >> key difference between the antenna selection headache and this one. In >> the antenna case, there isn't a good value that you can set that will >> work on all systems. If you change the default behaviour you will >> solve the issue for some users while simultanously introducing the >> problem on other systems that were previously fine. >> >> However in this case, it's highly likely that setting aspm=0 (off) by >> default would work for everyone. It has the disadvantage of using a >> bit more power, but especially with the indications that this issue >> affects a significant number of systems, I think that having the >> driver working out of the box everywhere is more important. The module >> parameter can be left in place so that unaffected users that want to >> save power can set aspm=1. >> > > I think this issue may be due to L1 latency, so below patch would be > helpful but not sure because I don't have the same laptop. > Is there anyone can help to test? > > > diff --git a/drivers/staging/rtlwifi/rtl8822be/hw.c b/drivers/staging/rtlwifi/rtl8822be/hw.c > index 7947edb239a1..88ba5b2fea6a 100644 > --- a/drivers/staging/rtlwifi/rtl8822be/hw.c > +++ b/drivers/staging/rtlwifi/rtl8822be/hw.c > @@ -803,7 +803,7 @@ static void _rtl8822be_enable_aspm_back_door(struct ieee80211_hw *hw) >   return; > >   pci_read_config_byte(rtlpci->pdev, 0x70f, &tmp); > - pci_write_config_byte(rtlpci->pdev, 0x70f, tmp | BIT(7)); > + pci_write_config_byte(rtlpci->pdev, 0x70f, tmp | ASPM_L1_LATENCY << 3); This patch loses the BIT(7). Did you really mean to do that? I now agree that this is a bug. A similar problem had been found in a few boxes with RTL8723BE or RTL8821AE cards, but that it might apply here completely slipped through the ever larger cracks in my mind. Larry