From: Pkshih <pkshih@realtek.com>
To: "Larry.Finger@lwfinger.net" <Larry.Finger@lwfinger.net>,
"drake@endlessm.com" <drake@endlessm.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"dan.carpenter@oracle.com" <dan.carpenter@oracle.com>,
"colin.king@canonical.com" <colin.king@canonical.com>,
"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
Birming Chiu <birming@realtek.com>,
"kvalo@codeaurora.org" <kvalo@codeaurora.org>,
"frank@generalsoftwareinc.com" <frank@generalsoftwareinc.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"linux@endlessm.com" <linux@endlessm.com>,
Steven Ting <steventing@realtek.com>,
Tony Chuang <yhchuang@realtek.com>,
"arnd@arndb.de" <arnd@arndb.de>,
"sgruszka@redhat.com" <sgruszka@redhat.com>,
Shaofu <shaofu@realtek.com>,
"jian-hong@endlessm.com" <jian-hong@endlessm.com>
Subject: Re: [BUG] staging: r8822be: RTL8822be can't find any wireless AP
Date: Fri, 6 Jul 2018 03:34:30 +0000 [thread overview]
Message-ID: <1530848057.2482.5.camel@realtek.com> (raw)
In-Reply-To: <a54fe914-9402-a959-9ae5-540bfec64a14@lwfinger.net>
On Thu, 2018-07-05 at 12:06 -0500, Larry Finger wrote:
> 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 <Larry.Finger@lwfinger.net> 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.
>
Yes, I remove BIT(7) intentionally, because this is defined as reserved bit in rtl8822be.
For the older chips, I need to check with my colleagues.
Regards,
PK
prev parent reply other threads:[~2018-07-06 4:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-04 8:03 Jian-Hong Pan
2018-07-04 13:04 ` Dan Carpenter
2018-07-04 13:37 ` Daniel Drake
2018-07-04 13:55 ` Larry Finger
2018-07-04 14:09 ` Dan Carpenter
2018-07-04 15:13 ` Larry Finger
2018-07-04 15:33 ` Daniel Drake
2018-07-05 7:36 ` Pkshih
2018-07-05 9:26 ` Jian-Hong Pan
2018-07-05 9:32 ` Dan Carpenter
2018-07-05 9:57 ` Jian-Hong Pan
2018-07-05 17:06 ` Larry Finger
2018-07-06 3:34 ` Pkshih [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1530848057.2482.5.camel@realtek.com \
--to=pkshih@realtek.com \
--cc=Larry.Finger@lwfinger.net \
--cc=arnd@arndb.de \
--cc=birming@realtek.com \
--cc=colin.king@canonical.com \
--cc=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=drake@endlessm.com \
--cc=frank@generalsoftwareinc.com \
--cc=gregkh@linuxfoundation.org \
--cc=jian-hong@endlessm.com \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linux@endlessm.com \
--cc=sgruszka@redhat.com \
--cc=shaofu@realtek.com \
--cc=steventing@realtek.com \
--cc=yhchuang@realtek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®