From a02be1be5b645bc0533db20f9772d61cc726d4f9 Mon Sep 17 00:00:00 2001 From: Bill Paul Date: Thu, 22 Jul 1999 18:10:20 +0000 Subject: [PATCH] Well, it seems that loading a PCI driver module after the system has been booted works too -- very neat. However I don't want the system to stop for 5 seconds when the MII autoprobe is triggered in the xl and tl drivers since that's lame. Instead, only use the hard delay when we've been cold booted. If not, use the timeout mechanism instead. (The SysKonnect driver doesn't use the same autonegotiation scheme, so no change is required there.) --- sys/pci/if_tl.c | 5 ++++- sys/pci/if_xl.c | 10 ++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/sys/pci/if_tl.c b/sys/pci/if_tl.c index eaceb6e9da87..117d587afdae 100644 --- a/sys/pci/if_tl.c +++ b/sys/pci/if_tl.c @@ -1517,7 +1517,10 @@ static int tl_attach_phy(sc) #ifdef TL_BACKGROUND_AUTONEG tl_autoneg(sc, TL_FLAG_SCHEDDELAY, 1); #else - tl_autoneg(sc, TL_FLAG_FORCEDELAY, 1); + if (cold) + tl_autoneg(sc, TL_FLAG_FORCEDELAY, 1); + else + tl_autoneg(sc, TL_FLAG_SCHEDDELAY, 1); #endif } diff --git a/sys/pci/if_xl.c b/sys/pci/if_xl.c index fad41437edc3..d9ea65477bc1 100644 --- a/sys/pci/if_xl.c +++ b/sys/pci/if_xl.c @@ -1771,7 +1771,10 @@ xl_attach(dev) #ifdef XL_BACKGROUND_AUTONEG xl_autoneg_mii(sc, XL_FLAG_SCHEDDELAY, 1); #else - xl_autoneg_mii(sc, XL_FLAG_FORCEDELAY, 1); + if (cold) + xl_autoneg_mii(sc, XL_FLAG_FORCEDELAY, 1); + else + xl_autoneg_mii(sc, XL_FLAG_SCHEDDELAY, 1); #endif media = sc->ifmedia.ifm_media; break; @@ -1780,7 +1783,10 @@ xl_attach(dev) #ifdef XL_BACKGROUND_AUTONEG xl_autoneg_mii(sc, XL_FLAG_SCHEDDELAY, 1); #else - xl_autoneg_mii(sc, XL_FLAG_FORCEDELAY, 1); + if (cold) + xl_autoneg_mii(sc, XL_FLAG_FORCEDELAY, 1); + else + xl_autoneg_mii(sc, XL_FLAG_SCHEDDELAY, 1); #endif media = sc->ifmedia.ifm_media; break;