# Slow loading bge NIC card/driver, netif tweak



## FestusHagen (Oct 22, 2011)

Hi all,

8.2-Release

I have a bunch of systems with integrated Broadcom NetXtreme Gigabit NIC's (BCM5752), they all seem to "Link UP" slow and many times the link is not up before network services start loading, so I've tweaked the '/etc/rc.d/netif' and added a slight delay like so:
	
	



```
for ifn in ${_ok}; do
  				/sbin/ifconfig ${ifn}
+ 				# fh :)_~
+ 				# Sleep to allow lazy bge card/driver to wake up ...
+ 				if [ ${ifn%?} == "bge" ] \
+ 				  && [ ${_func} == "ifn_start" ]; then
+ 					sleep 2
+ 				fi
  			done
  		fi
```
Though this code works perfectly on some systems, others report an error: 
	
	



```
[: bge: unexpected operator
```
 and fail. The systems are basically exactly the same.

What be wrong with my tweak(hack) ???

In the end they do come up and work great, Unfortunately the net services have already failed.

Thanks All

-Enjoy
fh <font color="#FF0000">:</font> )_~


----------



## wblock@ (Oct 22, 2011)

Don't know why that doesn't always work, quoting maybe.

See /etc/rc.d/netwait for how 8-STABLE and later handles slow interfaces.


----------



## FestusHagen (Oct 23, 2011)

Hardware Forum for Shell Script questions, Ok!

Is this code syntactically proper and correct for 8.2-STABLE and 8.2-RELEASE?

```
#/bin/sh
 	if [ ${ifn%?} == "bge" ] && [ ${_func} == "ifn_start" ]; then
		sleep 2
	fi
```

If not, what makes it correct and proper?

-Enjoy
fh : )_~


----------

