Re: How to reset one ethernet port?
On Fri, 21 Oct 2022 10:44:11 -0500
Ram Ramesh <rramesh2400@gmail.com> wrote:
> I only have firmware-linux-free and both NIC use the same kernel
> driver
> > yoda [rramesh] 313 > sudo lspci -v -s 02:00.0 | fgrep -i kernel
> > Kernel driver in use: r8169
> > Kernel modules: r8169
> > yoda [rramesh] 314 > sudo lspci -v -s 03:00.0 | fgrep -i kernel
> > Kernel driver in use: r8169
> > Kernel modules: r8169
>
> I like to only work on the broken NIC and not touch the other, if
> possible. However, if the other solution (from Dan) does not work, I
> will try this one. If not, there is always warm or cold reboot since
> this issue happens only after a week or two.
firmware-linux-free does not have any firmware for any Realtek devices.
But you may have it installed for other hardware. But it doesn't help
this problem.
You and I appear to have the same NIC and use the same driver. I have
(warning, long lines, may get mangled in transit or by your mail
program):
root@hawk:~# lspci -vs 03:00
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 11)
Subsystem: ASUSTeK Computer Inc. AM1I-A Motherboard
Flags: bus master, fast devsel, latency 0, IRQ 18
I/O ports at e000 [size=256]
Memory at f7d00000 (64-bit, non-prefetchable) [size=4K]
Memory at f0000000 (64-bit, prefetchable) [size=16K]
Capabilities: [40] Power Management version 3
Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
Capabilities: [70] Express Endpoint, MSI 01
Capabilities: [b0] MSI-X: Enable+ Count=4 Masked-
Capabilities: [d0] Vital Product Data
Capabilities: [100] Advanced Error Reporting
Capabilities: [140] Virtual Channel
Capabilities: [160] Device Serial Number 01-00-00-00-68-4c-e0-00
Capabilities: [170] Latency Tolerance Reporting
Kernel driver in use: r8169
Kernel modules: r8169
root@hawk:~#
However, that says nothing about the firmware (if any) in use. As I
just rebooted yesterday, I have that handy and grep on the driver name:
root@hawk:~# grep r8169 /var/log/syslog
Oct 20 15:51:10 hawk kernel: [ 1.340965] r8169 0000:03:00.0: can't disable ASPM; OS doesn't have ASPM control
Oct 20 15:51:10 hawk kernel: [ 1.363036] r8169 0000:03:00.0 eth0: RTL8168g/8111g, 30:5a:3a:81:83:79, XID 4c0, IRQ 29
Oct 20 15:51:10 hawk kernel: [ 1.365504] r8169 0000:03:00.0 eth0: jumbo features [frames: 9194 bytes, tx checksumming: ko]
Oct 20 15:51:10 hawk kernel: [ 1.368558] r8169 0000:03:00.0 enp3s0: renamed from eth0
Oct 20 15:51:10 hawk kernel: [ 136.335744] r8169 0000:03:00.0: firmware: direct-loading firmware rtl_nic/rtl8168g-2.fw
Oct 20 15:51:10 hawk kernel: [ 136.361553] Generic FE-GE Realtek PHY r8169-0-300:00: attached PHY driver [Generic FE-GE Realtek PHY] (mii_bus:phy_addr=r8169-0-300:00, irq=IGNORE)
Oct 20 15:51:11 hawk kernel: [ 136.561754] r8169 0000:03:00.0 enp3s0: Link is Down
Oct 20 15:51:13 hawk kernel: [ 139.412031] r8169 0000:03:00.0 enp3s0: Link is Up - 1Gbps/Full - flow control rx/tx
root@hawk:
Note the line at 136.335744: it loads firmware rtl_nic/rtl8168g-2.fw.
So, where did that firmware blob come from?
charles@hawk:~$ apt-file search rtl_nic/rtl8168g-2.fw
firmware-realtek: /lib/firmware/rtl_nic/rtl8168g-2.fw
charles@hawk:~$
You should do similarly. If the log shows that the driver wants
firmware but can't find it, you may need to install the appropriate
firmware package.
I understand that some hardware will work without the firmware blob,
but work much better with it. This may be one of those situations.
--
Does anybody read signatures any more?
https://charlescurley.com
https://charlescurley.com/blog/
Reply to: