robbat2: (Default)
[personal profile] robbat2

On one of my machines with a PCI-express Intel e1000 network controller, I get some weird behavior during startup. The driver loads, but the link lights are not lit until such time as I cycle the administrative link status. I did complain to the e1000 upstream folk about it months ago, but I still haven't seen a solution, as they seemed to bicker about it with Linus, in the name of power-saving.

The following is a snipped for /etc/conf.d/net that combines the solution with this problem with the more common check for link status check before trying to get a DHCP address.

check_link() {
  ethtool "${1}" | grep -q 'Link detected: yes'
}

preup() {
  # Try to force link up first, for e1000 special case
  i=0 
  while [ "${IFACE}" != "lo" ] && [ $i -lt 3 ] && ! check_link "${IFACE}"; do
    [ $i -gt 0 ] && sleep 1
    ip link set "${IFACE}" up  
    i=$(($i+1))
  done
  # Then check for actual link
  if ! check_link "${IFACE}"; then
    ewarn "No link on ${IFACE}, aborting configuration"
    ip link set "${IFACE}" down
    return 1
  fi  
}

ifplugd ?

Date: 2007-06-18 01:43 pm (UTC)
From: (Anonymous)
Or simply make "emerge ifplugd" ;)

(no subject)

Date: 2007-07-22 02:53 am (UTC)
From: [identity profile] vap0rtranz.livejournal.com
Hi robbat! I randomly bumped into you via Google -> Livejournal:Gentoo (about some weird/buggy hardware I'm forcing to its knees). Cheers for small worlds! so I befriended :)

May 2017

S M T W T F S
 123456
78910111213
141516171819 20
21222324252627
28293031   

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags