Solution to the R8169 driver in centos 6.3

Source: Internet
Author: User
Tags centos centos server

Recently, a centos server has been installed on the PC motherboard, but it always crashes from time to time. The various loads before the crash are very low. No specific problems can be found in multiple tests. Later, google searched the article again.

Ethtool-I eth0
Driver: r8169
Oh, the integrated r8169 chip, but I heard that this NIC may have some problems in Linux. I searched the internet and many people said that the built-in driver of this Nic CentOS is not good, then simply switch to the official one!
So on Realtek to search for R8169 driver, found, dozens of K quickly down, http://www.realtek.com.tw/downloads/downloadsView.aspx? Langid = 3 & PNid = 4 & PFid = 4 & Level = 5 & Conn = 4 & DownTypeID = 3 & GetDown = false & Downloads = true # RTL8110S-32/RTL8110SB % 28L % 29/ RTL8169SB % 28L % 29/RTL8169SC % 28L % 29% 3Cbr % 3ERTL8169
Decompress, lsmod | grep r8169, then rmmod r8169, and then make clean modules
The result is incorrect at this time.
Make clean modules
Make-C src/clean
Make [1]: Entering directory '/soft/r8169-6.012.00/src'
Rm-rf *. o *. ko *~ Core *. dep *. *. d. *. cmd *. mod. c *. a *. s. *. flags. tmp_versions Module. symvers Modules. symvers rset modules. order Module. markers
Make [1]: Leaving directory '/soft/r8169-6.012.00/src'
Make-C src/modules
Make [1]: Entering directory '/soft/r8169-6.012.00/src'
Make-C/lib/modules/2.6.18-128. el5/build SUBDIRS =/soft/r8169-6.012.00/src modules
Make [2]: Entering directory '/usr/src/kernels/2.6.18-128. El5-x86_64 & prime;
CC [M]/software/r8169-6.012.00/src/r8169_n.o
/Soft/r8169-6.012.00/src/r8169_n.c: In function 'rtl8169 _ alloc_rx_skb ':
/Soft/r8169-6.012.00/src/r8169_n.c: 3012: error: 'uintptr _ t' undeclared (first use in this function)
/Soft/r8169-6.012.00/src/r8169_n.c: 3012: error: (Each undeclared identifier is reported only once
............
Omitted later. What's going on? There are many undefined and many errors. Some netizens told me to install kernel-head and kernel-devel, but I have installed both of them.

The code is as follows: Copy code
Rpm-qa | grep kernel
Kernel-devel-2.6.18-164.15.1.el5
Kernel-devel-2.6.18-128.el5
Kernel-headers-2.6.18-164.15.1.el5
Kernel-2.6.18-128.el5

This is strange. A few developers told me to let me modify the driver source code to specify the missing and unfound variables one by one. I also need to change the source code ..... I used lspci to check if the driver is incorrect.
Lspci | grep Ethernet
. 0 Ethernet controller: Realtek semiconduco., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 03)
Isn't this R8168B! Why don't I install a driver... But why does the system recognize R8169? So I deleted all the modules and drivers about R8169 and restarted it. I found that the system still recognized it as R8169. I couldn't reinstall the R8168 driver. I found it on the official website.

Http://www.realtek.com.tw/downloads/downloadsView.aspx? Langid = 3 & PNid = 13 & PFid = 5 & Level = 5 & Conn = 4 & DownTypeID = 3 &
GetDown = false #2

Download the latest driver version is r8168-8.018.00, unzip a look, this simple directly to an execution permission and then./autorun. sh fully automated execution, huh, huh
Let's see which driver is used now.

The code is as follows: Copy code
Ethtool-I eth0
Driver: r8168
Version: 8.018.00-NAPI
Firmware-version:
Bus-info:. 0

I restarted the network and asked my colleagues to continue running the test program. I ran OK for an hour without any problems. I found many similar problems during online search, it is caused by the R8169 NIC driver that comes with the system. We suggest you reinstall the driver if you get this Nic!

To install the file, go to make: ***/lib/modules/2.6.18-164. el5/build: No such file or

Check whether the current kernel version is used. If yes, install the software package of the same version as kernel-devel and kernel-headers.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.