Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Turn on /var/log/rc.log file to troubleshoot Ethernet
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
mojosam
n00b
n00b


Joined: 21 Jul 2019
Posts: 70
Location: USA

PostPosted: Sat Aug 31, 2019 12:53 am    Post subject: Turn on /var/log/rc.log file to troubleshoot Ethernet Reply with quote

My Ethernet card is not recognized by my system. I suspect I need to download a driver or something. The Handbook says:

Quote:
When troubleshooting networking, take a look at /var/log/rc.log. Unless the rc_logger variable is set to NO in /etc/rc.conf, information on the boot activity will be stored in that log file.


So I edited my /etc/rc.conf file to say rc_logger='YES'. Then I rebooted. My /var/log/rc.log does not exist. :(

There is a note in the /etc/rc.conf file about devfs needing to be on. I looked into that and saw that devfs has been replaced by udev. Is there something I need to do to udev to get the logging to happen?
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20584

PostPosted: Sat Aug 31, 2019 4:34 am    Post subject: Reply with quote

Is rc_log_path set in rc.conf?

If you need a driver, then I doubt changing rc logging will help. Booting to an install should allow you to use lspci to see what hardware you have. With that information, it should be possible to determine if the kernel has support for your hardware. Do you know vendor and model of the NIC?
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
mojosam
n00b
n00b


Joined: 21 Jul 2019
Posts: 70
Location: USA

PostPosted: Sat Aug 31, 2019 5:52 am    Post subject: Reply with quote

Quote:
Is rc_log_path set in rc.conf?

Aha! Those sneaks! But you are correct. Now that I have the log working, there are no networking errors in it. I was also interested in several other errors that fly by on bootup, but those are not in the log either.

Quote:
Do you know vendor and model of the NIC?

lspci tells me that my two network cards are:

Code:
09:00.0 Ethernet controller: Broadcom Inc. and subsidiaries NetXtreme BCM57760 Gigabit Ethernet PCIe (rev 01)
0c:00.0 Network controller: Broadcom Inc. and subsidiaries BCM4313 802.11bgn Wireless Network Adapter (rev 01)

The wireless card is already working.

This variant of lspci tells me:

Code:
lspci -nnkv | sed -n '/Network/,/^$/p'

0c:00.0 Network controller [0280]: Broadcom Inc. and subsidiaries BCM4313 802.11bgn Wireless Network Adapter [14e4:4727] (rev 01)
   Subsystem: Dell Inspiron M5010 / XPS 8300 [1028:0010]
   Flags: bus master, fast devsel, latency 0, IRQ 17
   Memory at f6cfc000 (64-bit, non-prefetchable) [size=16K]
   Capabilities: [40] Power Management version 3
   Capabilities: [58] Vendor Specific Information: Len=78 <?>
   Capabilities: [48] MSI: Enable- Count=1/1 Maskable- 64bit+
   Capabilities: [d0] Express Endpoint, MSI 00
   Capabilities: [100] Advanced Error Reporting
   Capabilities: [13c] Virtual Channel
   Capabilities: [160] Device Serial Number 00-00-9d-ff-ff-0c-1c-65
   Capabilities: [16c] Power Budgeting <?>
   Kernel driver in use: bcma-pci-bridge
   Kernel modules: bcma

AFAIK, all of that is related to my wifi card. (BTW, this wired Ethernet card was not recognized by the Minimal Install CD, so it has never worked under Gentoo. It did work under Windows, so the hardware isn't the problem.)

I tried a dmesg on everything related to the card:

Code:
dmesg | grep -i -E '09:00.0|Broadcom|bcm|57760'

[    0.717346] pci 0000:09:00.0: [14e4:1690] type 00 class 0x020000
[    0.717416] pci 0000:09:00.0: reg 0x10: [mem 0xf6af0000-0xf6afffff 64bit]
[    0.717528] pci 0000:09:00.0: enabling Extended Tags
[    0.717829] pci 0000:09:00.0: PME# supported from D3hot D3cold
[    1.134069] tg3 0000:09:00.0: No PHY devices
[    1.134137] tg3 0000:09:00.0: Problem fetching invariants of chip, aborting
[    8.552096] bcma: bus0: Found chip with id 0x4313, rev 0x01 and package 0x08
[    8.552135] bcma: bus0: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x24, class 0x0)
[    8.552164] bcma: bus0: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x18, class 0x0)
[    8.552220] bcma: bus0: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev 0x11, class 0x0)
[    8.564579] bcma: bus0: Bus registered
[    8.878137] b43: probe of bcma0:1 failed with error -524
[    8.878637] Broadcom 43xx driver loaded [ Features: PNLS ]
[    9.510858] brcmsmac bcma0:1: mfg 4bf core 812 rev 24 class 0 irq 17
[    9.587123] brcmsmac bcma0:1 wlp12s0b1: renamed from wlan0
[   12.092341] brcmsmac bcma0:1: brcms_ops_bss_info_changed: qos enabled: false (implement)
[   12.092352] brcmsmac bcma0:1: brcms_ops_config: change power-save mode: false (implement)
[   19.140854] brcmsmac bcma0:1: brcmsmac: brcms_ops_bss_info_changed: associated
[   19.140858] brcmsmac bcma0:1: brcms_ops_bss_info_changed: qos enabled: true (implement)
[   19.144615] brcmsmac bcma0:1: wl0: brcms_c_d11hdrs_mac80211:  txop exceeded phylen 159/256 dur 1778/1504
[   19.153974] brcmsmac bcma0:1: wl0: brcms_c_d11hdrs_mac80211:  txop exceeded phylen 137/256 dur 1602/1504
[   25.603816] brcmsmac bcma0:1: brcms_ops_bss_info_changed: arp filtering: 1 addresses (implement)

Just for fun, here's what lsmod says:

Code:
Module                  Size  Used by
ipv6                  421888  14
crc_ccitt              16384  1 ipv6
brcmsmac              552960  0
brcmutil               16384  1 brcmsmac
b43                   434176  0
dell_smm_hwmon         16384  0
bcma                   49152  2 b43,brcmsmac

Does any of this stuff suggest what my next action should be to enable the Ethernet card?
Back to top
View user's profile Send private message
freke
Veteran
Veteran


Joined: 23 Jan 2003
Posts: 1050
Location: Somewhere in Denmark

PostPosted: Sat Aug 31, 2019 9:51 am    Post subject: Reply with quote

If you haven't already, you might need/want
Code:
CONFIG_TIGON3
in kernel.

https://cateee.net/lkddb/web-lkddb/TIGON3.html

It seems to be for that Broadcom chip?
Back to top
View user's profile Send private message
mojosam
n00b
n00b


Joined: 21 Jul 2019
Posts: 70
Location: USA

PostPosted: Sat Aug 31, 2019 7:58 pm    Post subject: Reply with quote

That does seem to be a missing component. How do I get it? It looks like it's maintained outside of the regular Gentoo repository. I couldn't find anything on the forum or wiki for how to do this.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54808
Location: 56N 3W

PostPosted: Sat Aug 31, 2019 8:50 pm    Post subject: Reply with quote

mojosam,

CONFIG_TIGON3 is a kernel configuration symbol.

Use the search in
Code:
make menuconfig
to find it.
Turm it on, then rebuild and reinstall your kernel.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Sat Aug 31, 2019 9:50 pm    Post subject: Reply with quote

I do not want to confuse you, do as NeddySeagoon told you. Just letting you know you could build it as a module and load it without even rebooting your box.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
mojosam
n00b
n00b


Joined: 21 Jul 2019
Posts: 70
Location: USA

PostPosted: Mon Sep 02, 2019 11:55 pm    Post subject: Reply with quote

I fired up menuconfig and did a search for "TIGON3". It told me there were two places where that is set. I went there, and it's already turned on in the kernel!

I'm guessing something else is missing. I thought I'd follow the directions in KC11 - kernel compiling for the beginner. Jump down to 2. Preparing to compile a kernel -> c. Configuring the kernel -> Configuring the kernel to support a new item of hardware.

lspci told me that my card is named:

Code:
09:00.0 Ethernet controller: Broadcom Inc. and subsidiaries NetXtreme BCM57760 Gigabit Ethernet PCIe (rev 01)


Next, the article says I need to get the Vendor ID and Device ID:

Code:
# lspci -n | grep '^09:00.0'
09:00.0 0200: 14e4:1690 (rev 01)


So the Vendor ID = 14e4 and Device ID = 1690.

It then wants me to search the list of vendor IDs in the kernel to find what "14e4" is coded as:

Code:
# grep -i 0x14e4 /usr/src/linux-4.19.66-gentoo/include/linux/pci_ids.h
grep /usr/src/linux-4.19.66-gentoo/include/linux/pci_ids.h: No such file or directory


It says the file doesn't exist. Well I already know that the vendor name is Broadcom. I'll just skip ahead to the next step.

Code:
find /usr/src/linux-4.19.66-gentoo -name \*.c | xargs grep -i -l broadcom


It returned a list 513 lines long. So I'm guessing that this is the file I want:

Code:
/usr/src/linux-4.19.66-gentoo/drivers/net/ethernet/broadcom/tg3.c


I dug through that file and found this line:

Code:
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57760)},


I don't know where to go from here. The document is confusing. Am I even going down the correct path? It feels like I've wandered off into the woods.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Tue Sep 03, 2019 12:04 am    Post subject: Reply with quote

You say it is already enabled, is it enabled as module <M> or built in <*> ?
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
mojosam
n00b
n00b


Joined: 21 Jul 2019
Posts: 70
Location: USA

PostPosted: Tue Sep 03, 2019 12:20 am    Post subject: Reply with quote

Quote:
is it enabled as module <M> or built in <*> ?


Built in!
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Tue Sep 03, 2019 3:39 am    Post subject: Reply with quote

Then it should leave a trace into dmesg. Why do you think the driver does not load? Does 'ifconfig -a' or 'ip a' show it?
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
mojosam
n00b
n00b


Joined: 21 Jul 2019
Posts: 70
Location: USA

PostPosted: Tue Sep 03, 2019 4:01 am    Post subject: Reply with quote

Quote:
Why do you think the driver does not load? Does 'ifconfig -a' or 'ip a' show it?


No. It only shows when I boot from the Minimal Install CD (although oddly, it wasn't there when I did the original install a few weeks ago).
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54808
Location: 56N 3W

PostPosted: Tue Sep 03, 2019 8:42 am    Post subject: Reply with quote

mojosam,

Please share your kernel .config file. wgetpaste is your friend.

Tell how you build and install your kernel too.

When you boot your own Gentoo, what does
Code:
uname -a
show.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
mojosam
n00b
n00b


Joined: 21 Jul 2019
Posts: 70
Location: USA

PostPosted: Tue Sep 03, 2019 9:50 pm    Post subject: Reply with quote

It looks like I got confused on one tiny point. lspci does show the wired Ethernet card. Everything else I said is accurate. ip a only shows the wireless card.

Quote:
When you boot your own Gentoo, what does uname -a show.


Code:
Linux therocket 4.19.66-gentoo #1 Sat Aug 31 14:31:49 PDT 2019 x86_64 Intel(R) Atom(TM) CPU N470 @ 1.83GHz GenuineIntel GNU/Linux


Quote:
Tell how you build and install your kernel too.


I followed the Handbook. I'm pretty sure I went with defaults on everything. I did the manual configuration (instead of genkernel).

Code:
Please share your kernel .config file.


Here it is:
http://dpaste.com/02GABY1
Back to top
View user's profile Send private message
mojosam
n00b
n00b


Joined: 21 Jul 2019
Posts: 70
Location: USA

PostPosted: Sat Sep 07, 2019 2:36 pm    Post subject: Reply with quote

I finally got the Ethernet card working. I'm not marking this thread as solved, because I'm not really sure how I did it. Also, the relevant section of KC 11 is confusing and did not apply in my case. I'd rewrite that section if I understood what is really going on here, but I don't.

I went back into menuconfig and just turned on everything Broadcom. So that part of my kernel is messy and doesn't follow the Gentoo philosophy, but it works.

There is one clue in my situation that might have been the critical piece of the puzzle. In my .config file is the line:

Code:
# CONFIG_BROADCOM_PHY is not set


In menuconfig, there is a setting called Broadcom PHYs. I turned that on. Looking in .config for that is not covered in KC 11.
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6214
Location: Dallas area

PostPosted: Sat Sep 07, 2019 2:46 pm    Post subject: Reply with quote

You usually have to set the PHY of whatever network device.

Edit to add: from Documentation/networking/phy.txt

Quote:
PHY Abstraction Layer
( Updated 2008-04-08 )

Purpose

Most network devices consist of set of registers which provide an interface
to a MAC layer, which communicates with the physical connection through a
PHY. The PHY concerns itself with negotiating link parameters with the link
partner on the other side of the network connection (typically, an ethernet
cable), and provides a register interface to allow drivers to determine what
settings were chosen, and to configure what settings are allowed.

_________________
UM780, 6.12 zen kernel, gcc 13, openrc, wayland
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20584

PostPosted: Sat Sep 07, 2019 4:25 pm    Post subject: Reply with quote

mojosam wrote:
I went back into menuconfig and just turned on everything Broadcom. So that part of my kernel is messy
Keep your current working kernel, then configure anything network device related as a module. After booting (and verifying functional network), see what network device modules didn't get loaded and remove them from the kernel configuration. Do you have FDDI hardware? Probably not, so that could be disabled. Any Intel NICs? etc. Just be sure to keep a known working kernel available.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
mojosam
n00b
n00b


Joined: 21 Jul 2019
Posts: 70
Location: USA

PostPosted: Sun Sep 08, 2019 1:57 am    Post subject: Reply with quote

Quote:
Keep your current working kernel, then configure anything network device related as a module. After booting (and verifying functional network), see what network device modules didn't get loaded and remove them from the kernel configuration.


I agree that I should do this. I hope I'll come back to it in a few weeks. Right now I just want to move on to other stuff.

Thank you to all who contributed advice.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum