aboutsummaryrefslogtreecommitdiffstats
path: root/gpxe/src/drivers/net/sundance.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2009-03-11 19:46:35 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2009-03-11 19:46:35 -0700
commitd16e5e8e8ea526326ed6f8880464399624bfe171 (patch)
tree9d1eb354f74532c219d31607e28840c4ebde3103 /gpxe/src/drivers/net/sundance.c
parent43224f02c231ed97a15d8300eaaf69ad8118d222 (diff)
downloadsyslinux-elf-syslinux-3.74-pre3.tar.gz
syslinux-elf-syslinux-3.74-pre3.tar.xz
syslinux-elf-syslinux-3.74-pre3.zip
Update gPXE to version 0.9.7syslinux-3.74-pre3
Diffstat (limited to 'gpxe/src/drivers/net/sundance.c')
-rw-r--r--gpxe/src/drivers/net/sundance.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gpxe/src/drivers/net/sundance.c b/gpxe/src/drivers/net/sundance.c
index eb750fb1..119c9778 100644
--- a/gpxe/src/drivers/net/sundance.c
+++ b/gpxe/src/drivers/net/sundance.c
@@ -691,6 +691,22 @@ static int sundance_probe ( struct nic *nic, struct pci_device *pci ) {
/* Reset the chip to erase previous misconfiguration */
DBG ( "ASIC Control is %#x\n", inl(BASE + ASICCtrl) );
outw(0x007f, BASE + ASICCtrl + 2);
+
+ /*
+ * wait for reset to complete
+ * this is heavily inspired by the linux sundance driver
+ * according to the linux driver it can take up to 1ms for the reset
+ * to complete
+ */
+ i = 0;
+ while(inl(BASE + ASICCtrl) & (ResetBusy << 16)) {
+ if(i++ >= 10) {
+ DBG("sundance: NIC reset did not complete.\n");
+ break;
+ }
+ udelay(100);
+ }
+
DBG ( "ASIC Control is now %#x.\n", inl(BASE + ASICCtrl) );
sundance_reset(nic);