|
@@ -691,6 +691,22 @@ static int sundance_probe ( struct nic *nic, struct pci_device *pci ) {
|
691
|
691
|
/* Reset the chip to erase previous misconfiguration */
|
692
|
692
|
DBG ( "ASIC Control is %#x\n", inl(BASE + ASICCtrl) );
|
693
|
693
|
outw(0x007f, BASE + ASICCtrl + 2);
|
|
694
|
+
|
|
695
|
+ /*
|
|
696
|
+ * wait for reset to complete
|
|
697
|
+ * this is heavily inspired by the linux sundance driver
|
|
698
|
+ * according to the linux driver it can take up to 1ms for the reset
|
|
699
|
+ * to complete
|
|
700
|
+ */
|
|
701
|
+ i = 0;
|
|
702
|
+ while(inl(BASE + ASICCtrl) & (ResetBusy << 16)) {
|
|
703
|
+ if(i++ >= 10) {
|
|
704
|
+ DBG("sundance: NIC reset did not complete.\n");
|
|
705
|
+ break;
|
|
706
|
+ }
|
|
707
|
+ udelay(100);
|
|
708
|
+ }
|
|
709
|
+
|
694
|
710
|
DBG ( "ASIC Control is now %#x.\n", inl(BASE + ASICCtrl) );
|
695
|
711
|
|
696
|
712
|
sundance_reset(nic);
|