Due to a bug in the ed driver, which leads to hangs when using it with

dhclient and pccard_ether, introduce the concept of a "settle time" to
pccard_ether with the new pccard_ether_delay variable.  Defaults to 5
seconds, which is enough time for the ed driver to finish its
autoconfiguration for newer Linksys based cards.  This also can
eliminate the ed0: timeout messages that happen at startup as well.

MFC: after RE says OK.
This commit is contained in:
Warner Losh 2001-09-13 06:18:07 +00:00
parent a5cc8abe03
commit 8dac8c268d
3 changed files with 22 additions and 0 deletions

View File

@ -29,6 +29,7 @@ pccard_beep="2" # pccard beep type.
pccard_ifconfig="NO" # Specialized pccard ethernet configuration (or NO). pccard_ifconfig="NO" # Specialized pccard ethernet configuration (or NO).
pccardd_flags="" # Additional flags for pccardd. pccardd_flags="" # Additional flags for pccardd.
pccard_conf="/etc/defaults/pccard.conf" # pccardd(8) config file pccard_conf="/etc/defaults/pccard.conf" # pccardd(8) config file
pccard_ether_delay=5 # Delay before trying to start dhclient in pccard_ether
removable_interfaces="" # Removable network interfaces for /etc/pccard_ether. removable_interfaces="" # Removable network interfaces for /etc/pccard_ether.
local_startup="/usr/local/etc/rc.d /usr/X11R6/etc/rc.d" # startup script dirs. local_startup="/usr/local/etc/rc.d /usr/X11R6/etc/rc.d" # startup script dirs.
script_name_sep=" " # Change if your startup scripts' names contain spaces script_name_sep=" " # Change if your startup scripts' names contain spaces

View File

@ -46,6 +46,17 @@ shift
startstop=$1 startstop=$1
shift shift
case ${pccard_ether_delay} in
[Nn][Oo])
;;
[0-9])
sleep ${pccard_ether_delay}
;;
*) # Default until it has had a chance to make it to /etc/defaults/rc.conf
sleep 5
;;
esac
case ${pccard_ifconfig} in case ${pccard_ifconfig} in
[Nn][Oo] | '') [Nn][Oo] | '')
expr "${removable_interfaces}" : ".*${interface}" > /dev/null || exit 0 expr "${removable_interfaces}" : ".*${interface}" > /dev/null || exit 0

View File

@ -141,6 +141,16 @@ is set to
these are the flags to pass to the these are the flags to pass to the
.Xr pccardd 8 .Xr pccardd 8
daemon. daemon.
.It Va pccard_ether_delay
.Pq Vt str
Set the delay before starting dhclient in
.Xr pccard_ether 8
script.
This defaults to 5 seconds to work around a bug in the
.Xr ed 4
driver which can lead to system hangs when using some newer
.Xr ed 4
based cards.
.It Va removable_interfaces .It Va removable_interfaces
.Pq Vt str .Pq Vt str
List of removable network interfaces to be supported by List of removable network interfaces to be supported by