[Linux-PowerEdge] Determining NIC h/w model on RHEL6.x?

Spike_White at Dell.com Spike_White at Dell.com
Tue Oct 30 14:21:57 CDT 2012


On our RHEL5 servers, the X520 NICs when auto-negotiating at 1 GBe speed took a little long.  Here's the details:

In OEL 5.8, when an Intel X520 (10 GBe-capable NIC) comes up on 10 GBe switch port, it takes too long to show link.  Presumably, auto-negotiate taking too long.  So 'service network start' & other things (like acquiring a DHCP lease) give up on this NIC.

If we add this line to the associated /etc/sysconfig/ifcfg-ethX file:


That results in a sufficient delay and all is well.  Network support routines see link on the NIC.

This occurs *only* on Intel X520 NICs and *only* when they auto-negotiate to 10 GBe.  Apparently, they settle in time when auto-negotiating to 1 GBe.  Go figure!  (But LINKDELAY for an X520 that's going to run at 1 GBe doesn't hurt it.)

It's dirt-simple to set this up at kick-start time. On RHEL5.

# 1. First parse lspci -v -v output for any X520 Intel NICs.  Read the
#    chipset associated with each NIC.  Develop a list of unique chipset(s)
#    associated w/ all Intel X520 NICs.

CHIPS=$(lspci -v -v | grep -B1  X520 | grep 'Ethernet controller:' | \
       awk '{print $6}' | sort -u)

# 2. if no Intel X520 NICs we're done.
[[ -z "$CHIPS" ]] && exit 0

# 3. Now run kudzu to generate the /etc/sysconfig/hwconf file.
kudzu -q

# 4. Look for the specified chipsets in hwconf file, associated with an
#    ethernet interface.  Read off the associated ethX name.
ETHS=$(for i in $CHIPS; do grep -B2 $i /etc/sysconfig/hwconf; done | \
      grep '^device: eth' | awk '{print $2}' | sort)

# 5. Now with a list of ethX names that are X520 NICs, life is easy!!
#    Merely append a LINKDELAY line to each associated ifcfg-ethX file. (if
#    there's no such line already, of course).
for e in $ETHS
   if [[ -f $file ]]
      # do this grep iff ifcfg-ethX file exists.
      ! grep -q "^LINKDELAY=10" $file && echo "LINKDELAY=10" >> $file


However, kudzu isn't in RHEL6.  How do I determine the specific hardware model for a specific NIC?  I've looked at dmesg, lspci, /proc/interrupts, /proc/devices, /proc/ioports.

I can find the X520 Intel NICs, but can't determine if they're em1, em2, p1p1, p1p2, p3p1 or p3p2.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.us.dell.com/pipermail/linux-poweredge/attachments/20121030/eecb4eed/attachment.html 

More information about the Linux-PowerEdge mailing list