All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: RTL8192EE PCIe Wireless Network Adapter crashed with linux-4.13
       [not found] <2WhCEttl4IJtrTB2AkJYmhbsu-kiR_5fU0A_Z7eWW05rbVE5tB86A_ZS8ek_FQFdgaZw1bfx0wFbxOa0Ydjv1T6BzBkIHtaWTbSptcpB_kg=@protonmail.com>
@ 2017-09-14 18:05 ` Larry Finger
       [not found]   ` <jB0WJNG17mSfKo9m7T26r-b2Gr7mDL4lJ-1cWxeCJ6UCsA4TsxXz4znCLhYY5EASPQciwp1rf_xtwvDR-xzwD-OTApTUFoaVmIvahleDcJk=@protonmail.com>
  0 siblings, 1 reply; 6+ messages in thread
From: Larry Finger @ 2017-09-14 18:05 UTC (permalink / raw)
  To: Zwindl, linux-wireless
  Cc: chaoming_li, kvalo, pkshih, johannes.berg, gregkh, netdev, linux-kernel

On 09/14/2017 08:30 AM, Zwindl wrote:
> Dear developers:
> I'm using Arch Linux with testing enabled, the current kernel version and 
> details are
> `Linux zwindl 4.13.2-1-ARCH #1 SMP PREEMPT Thu Sep 14 02:57:34 UTC 2017 x86_64 
> GNU/Linux`.
> The wireless card can't work properly from the kernel 4.13. Here's the log(in 
> attachment) when NetworkManager trying to connect my wifi which is named as 
> 'TP', my mac addr hided as xx:xx:xx:xx:xx.
> What should I provide to help to debug?
> ZWindL.

The BUG-ON arises in __intel_map_single() due to dir (for direction of DMA) 
equal to DMA_NONE (3). When rtl8192ee calls pci_map_single(), it uses 
PCI_DMA_TODEVICE (1). I followed the calling sequence through the entire chain, 
and none of the routines made any changes to 'dir', other that changing the type 
from int to enum dma_data_direction. That would not have changed a 1 to a 3.

I built a 4.13.2 system. The problem does not happen here. At this point, the 
system has been up for about two hours. I did discover a small memory leak 
associated with firmware loading, but that should not have caused the problem. 
Nonetheless, I will be sending a patch to fix that problem.

I will continue testing, although I doubt that the problem will happen here.

How long had your system been up when the problem occurred? Your dmesg fragment 
did not show any times. What kernels have you tried besides 4.13.2?

Larry

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: RTL8192EE PCIe Wireless Network Adapter crashed with linux-4.13
       [not found]   ` <jB0WJNG17mSfKo9m7T26r-b2Gr7mDL4lJ-1cWxeCJ6UCsA4TsxXz4znCLhYY5EASPQciwp1rf_xtwvDR-xzwD-OTApTUFoaVmIvahleDcJk=@protonmail.com>
@ 2017-09-15 15:19     ` Larry Finger
       [not found]       ` <x1duse6v9TTP8Ta7rsTLlZ8DK0Ej7qq9iapef18K0eYSodmCBmfI_mX3c-3ocbPiGzEgV9weOh25dKWSbU5nIetYkfmmUxaxRpUdYFffRZA=@protonmail.com>
  0 siblings, 1 reply; 6+ messages in thread
From: Larry Finger @ 2017-09-15 15:19 UTC (permalink / raw)
  To: Zwindl
  Cc: linux-wireless, chaoming_li, kvalo, pkshih, johannes.berg,
	gregkh, netdev, linux-kernel

On 09/15/2017 05:10 AM, Zwindl wrote:
> 
>> -------- Original Message --------
>> Subject: Re: RTL8192EE PCIe Wireless Network Adapter crashed with linux-4.13
>> Local Time: 14 September 2017 6:05 PM
>> UTC Time: 14 September 2017 18:05
>> From: Larry.Finger@lwfinger.net
>> To: Zwindl <zwindl@protonmail.com>, linux-wireless@vger.kernel.org 
>> <linux-wireless@vger.kernel.org>
>> chaoming_li@realsil.com.cn <chaoming_li@realsil.com.cn>, kvalo@codeaurora.org 
>> <kvalo@codeaurora.org>, pkshih@realtek.com <pkshih@realtek.com>, 
>> johannes.berg@intel.com <johannes.berg@intel.com>, gregkh@linuxfoundation.org 
>> <gregkh@linuxfoundation.org>, netdev@vger.kernel.org <netdev@vger.kernel.org>, 
>> linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>
>>
>> On 09/14/2017 08:30 AM, Zwindl wrote:
>> > Dear developers:
>> > I"m using Arch Linux with testing enabled, the current kernel version and
>> > details are
>> > `Linux zwindl 4.13.2-1-ARCH #1 SMP PREEMPT Thu Sep 14 02:57:34 UTC 2017 x86_64
>> > GNU/Linux`.
>> > The wireless card can"t work properly from the kernel 4.13. Here"s the log(in
>> > attachment) when NetworkManager trying to connect my wifi which is named as
>> > "TP", my mac addr hided as xx:xx:xx:xx:xx.
>> > What should I provide to help to debug?
>> > ZWindL.
>>
>> The BUG-ON arises in __intel_map_single() due to dir (for direction of DMA)
>> equal to DMA_NONE (3). When rtl8192ee calls pci_map_single(), it uses
>> PCI_DMA_TODEVICE (1). I followed the calling sequence through the entire chain,
>> and none of the routines made any changes to "dir", other that changing the type
>> from int to enum dma_data_direction. That would not have changed a 1 to a 3.
>>
>> I built a 4.13.2 system. The problem does not happen here. At this point, the
>> system has been up for about two hours. I did discover a small memory leak
>> associated with firmware loading, but that should not have caused the problem.
>> Nonetheless, I will be sending a patch to fix that problem.
>>
>> I will continue testing, although I doubt that the problem will happen here.
>>
>> How long had your system been up when the problem occurred? Your dmesg fragment
>> did not show any times. What kernels have you tried besides 4.13.2?
>>
>> Larry
> Oh, sorry, the original log is from `journalctl`.
> Here's the `dmesg` prints(error.txt). I can't determine which part is related, 
> so I paste all of it. I've tried 4.12.X(no issue), 4.13.1(issue), 4.13.2(issue).
> ZWindL

The output of dmesg is a lot more instructive than that of journalctl. I now 
know exactly the location that triggered the WARNING. I still do not understand 
it. In fact, it is likely a regression in kernel 4.13 that does not affect my 
Toshiba laptop, nor a Lenovo machine I have, but does affect your Lenovo laptop.

Is it possible for you to install the mainline source from vger.kernel.org using 
git and bisect the issue? It will take quite a bit of time, but it is likely the 
only way to find the offending change. If you are willing to try this, I will 
send you reasonably complete instructions.

By the way, it is usually better to load the dmesg output into a pastebin site 
and post the link. Sending the entire file to a list makes a lot of people 
receive a lot of data for which they have no interest.

Larry

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: RTL8192EE PCIe Wireless Network Adapter crashed with linux-4.13
       [not found]       ` <x1duse6v9TTP8Ta7rsTLlZ8DK0Ej7qq9iapef18K0eYSodmCBmfI_mX3c-3ocbPiGzEgV9weOh25dKWSbU5nIetYkfmmUxaxRpUdYFffRZA=@protonmail.com>
@ 2017-09-15 19:21         ` Larry Finger
       [not found]           ` <2_UKRQjXR9_CXy_99R7fqRbs4VDG0hfFCMvvf4ll2BQV5C_zNiPTnHHNtoYstAGy_UF9X85pl4siU7fnXefmqbhlErxR6FqZQfIf0tADKNg=@protonmail.com>
  0 siblings, 1 reply; 6+ messages in thread
From: Larry Finger @ 2017-09-15 19:21 UTC (permalink / raw)
  To: Zwindl
  Cc: linux-wireless, chaoming_li, kvalo, pkshih, johannes.berg,
	gregkh, netdev, linux-kernel

On 09/15/2017 12:12 PM, Zwindl wrote:
> Thanks for your patient and advice, I'll keep that in mind.
> I do want help, and I got 1 day to build the system, but I can't recall how to 
> compile it, The last time I compile kernel is 2013, so, maybe I'll ask you so 
> many stupid questions during the build time.
> ZWindL

Building a new kernel is not difficult. In an average week, I make at least 10 
new kernels. Many of them are done on slow machines that take many hours. At 
least, your i5 CPU should do it in less that one hour.

Step 1: Download the kernel sources using

git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

If your system complains that the git command is unknown, then you will need to 
install it with your package manager (pacman?).

Step 2: "cd  linux" and copy the latest /boot/config-..... to the linux source 
directory as ".config". Edit .config, find the line that says
"# CONFIG_LOCALVERSION_AUTO is not set", and change the line to read 
"CONFIG_LOCALVERSION_AUTO=y".

Step 3: Build and install the latest version using

make -j9
sudo make modules_install install

You will need to answer some configuration questions at the start of the first 
make line. Answer with the default value, i.e. just use an ENTER. When the build 
is complete, reboot. Grub should show an entry for something like 
v4.13-12084-ged43e4d190d0. The numbers after the 4.13 will likely be different, 
but the form will match. Check that the new kernel still has the fault. If not, 
it has been fixed and we do not need to find it.

It the problem is still in the latest version of the kernel, then we start the 
bisection with the following:

git bisect start
git bisect bad v4.13
git bisect good v4.12

At this point, git will report the number of revisions to test, the likely 
number of tries, and the SHA hash for the new kernel. Record the first 7 digits 
of the hash, and repeat the make commands above. After the build is complete, 
reboot into the kernel with the hash in the version name and test. Then enter 
the command "git bisect xxx", where xxx is good or bad depending on the test. A 
new trial will be generated by bisecting the appropriate half of the commits. 
Record its hash and redo the build. Repeat until git tells you the bad commit.

This process will generate a number of kernels that will take quite a bit of 
disk space. If you run short, you can delete kernels that have already been 
tested from /boot. You should also delete the corresponding modules from 
/lib/modules.

Good luck,

Larry

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: RTL8192EE PCIe Wireless Network Adapter crashed with linux-4.13
       [not found]           ` <2_UKRQjXR9_CXy_99R7fqRbs4VDG0hfFCMvvf4ll2BQV5C_zNiPTnHHNtoYstAGy_UF9X85pl4siU7fnXefmqbhlErxR6FqZQfIf0tADKNg=@protonmail.com>
@ 2017-09-16 17:26             ` Larry Finger
       [not found]               ` <ZeTD57H3euqWFB5wrD_vYAkdu91l_6Yalbz_mRWtrrb2t17d0cdWOpCaXw33jcPYNKhgqnHbuqHTI9xkVnrkliRTGxraEqWnk5GZ63xKifI=@protonmail.com>
  0 siblings, 1 reply; 6+ messages in thread
From: Larry Finger @ 2017-09-16 17:26 UTC (permalink / raw)
  To: Zwindl
  Cc: linux-wireless, chaoming_li, kvalo, pkshih, johannes.berg,
	gregkh, netdev, linux-kernel

On 09/16/2017 06:27 AM, Zwindl wrote:
> Hi, I've done the test, and the weird thing happened. The kernel buit with this 
> config file https://ptpb.pw/HF1g which is from 
> https://aur.archlinux.org/packages/linux-git/  can run properly, the wifi can 
> connect, despite which version it is, but, with this config file 
> https://ptpb.pw/7GuV which comes from the archlinux's official package build 
> repo(linux-package 
> <https://git.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/linux>), 
> all the version begin with 4.13 was failed to connect wifi.
> So, I think the issue is not caused by the kernel code, is caused by some 
> options in the config file, but I can't fully understand the meaning of these 
> options so that I can't determine which option caused that issue, what should I 
> do now, maybe report this bug to archlinux's maintainer?
> By the way, maybe I'll lost internet connection tomorrow, it's time to back to 
> university, but I'm happy to help to push the debug progress.

Yes, you need to report this to archlinux's bugzilla or maintainer, whichever is 
appropriate. I have seen a configuration error cause some feature to be silently 
missing, but leading to a WARN is rare.

I looked at your two configurations, but did not see a definitive difference.

Larry

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: RTL8192EE PCIe Wireless Network Adapter crashed with linux-4.13
       [not found]               ` <ZeTD57H3euqWFB5wrD_vYAkdu91l_6Yalbz_mRWtrrb2t17d0cdWOpCaXw33jcPYNKhgqnHbuqHTI9xkVnrkliRTGxraEqWnk5GZ63xKifI=@protonmail.com>
@ 2017-09-21 14:21                 ` Larry Finger
  2017-09-21 14:49                   ` Kalle Valo
  0 siblings, 1 reply; 6+ messages in thread
From: Larry Finger @ 2017-09-21 14:21 UTC (permalink / raw)
  To: Zwindl
  Cc: linux-wireless, chaoming_li, kvalo, pkshih, johannes.berg,
	gregkh, netdev, linux-kernel

On 09/21/2017 06:37 AM, Zwindl wrote:
> Hi, I've reported to archlinux's bugzilla, and finally found out the flag which 
> caused that issue, it's the `CONFIG_INTEL_IOMMU_DEFAULT_ON=y` flag, I think may 
> this is a kernel bug, more details at https://bugs.archlinux.org/task/55665

My standard kernel has the following:

CONFIG_INTEL_IOMMU=y
# CONFIG_INTEL_IOMMU_SVM is not set
# CONFIG_INTEL_IOMMU_DEFAULT_ON is not set

I will do some further testing to see if turning CONFIG_INTEL_IOMMU_DEFAULT_ON 
also breaks my system.

Larry

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: RTL8192EE PCIe Wireless Network Adapter crashed with linux-4.13
  2017-09-21 14:21                 ` Larry Finger
@ 2017-09-21 14:49                   ` Kalle Valo
  0 siblings, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2017-09-21 14:49 UTC (permalink / raw)
  To: Larry Finger
  Cc: Zwindl, linux-wireless, chaoming_li, pkshih, johannes.berg,
	gregkh, netdev, linux-kernel

Larry Finger <Larry.Finger@lwfinger.net> writes:

> On 09/21/2017 06:37 AM, Zwindl wrote:
>> Hi, I've reported to archlinux's bugzilla, and finally found out the
>> flag which caused that issue, it's the
>> `CONFIG_INTEL_IOMMU_DEFAULT_ON=y` flag, I think may this is a kernel
>> bug, more details at https://bugs.archlinux.org/task/55665
>
> My standard kernel has the following:
>
> CONFIG_INTEL_IOMMU=y
> # CONFIG_INTEL_IOMMU_SVM is not set
> # CONFIG_INTEL_IOMMU_DEFAULT_ON is not set
>
> I will do some further testing to see if turning
> CONFIG_INTEL_IOMMU_DEFAULT_ON also breaks my system.

But not all systems have iommu so check from dmesg that iommu is really
enabled.

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-09-21 14:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <2WhCEttl4IJtrTB2AkJYmhbsu-kiR_5fU0A_Z7eWW05rbVE5tB86A_ZS8ek_FQFdgaZw1bfx0wFbxOa0Ydjv1T6BzBkIHtaWTbSptcpB_kg=@protonmail.com>
2017-09-14 18:05 ` RTL8192EE PCIe Wireless Network Adapter crashed with linux-4.13 Larry Finger
     [not found]   ` <jB0WJNG17mSfKo9m7T26r-b2Gr7mDL4lJ-1cWxeCJ6UCsA4TsxXz4znCLhYY5EASPQciwp1rf_xtwvDR-xzwD-OTApTUFoaVmIvahleDcJk=@protonmail.com>
2017-09-15 15:19     ` Larry Finger
     [not found]       ` <x1duse6v9TTP8Ta7rsTLlZ8DK0Ej7qq9iapef18K0eYSodmCBmfI_mX3c-3ocbPiGzEgV9weOh25dKWSbU5nIetYkfmmUxaxRpUdYFffRZA=@protonmail.com>
2017-09-15 19:21         ` Larry Finger
     [not found]           ` <2_UKRQjXR9_CXy_99R7fqRbs4VDG0hfFCMvvf4ll2BQV5C_zNiPTnHHNtoYstAGy_UF9X85pl4siU7fnXefmqbhlErxR6FqZQfIf0tADKNg=@protonmail.com>
2017-09-16 17:26             ` Larry Finger
     [not found]               ` <ZeTD57H3euqWFB5wrD_vYAkdu91l_6Yalbz_mRWtrrb2t17d0cdWOpCaXw33jcPYNKhgqnHbuqHTI9xkVnrkliRTGxraEqWnk5GZ63xKifI=@protonmail.com>
2017-09-21 14:21                 ` Larry Finger
2017-09-21 14:49                   ` Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.