WI_TIMEOUT is 65536

65536 * 10msec == 10 minutes 55 seconds == hung machine

Instead wait for the busy bits for a max of ~2 seconds (200 * 10msec)
This commit is contained in:
Alfred Perlstein 2001-04-05 09:25:37 +00:00
parent 6405e53deb
commit 34702f7e67

View File

@ -770,14 +770,13 @@ static int wi_cmd(sc, cmd, val)
int i, s = 0;
/* wait for the busy bit to clear */
for (i = 0; i < WI_TIMEOUT; i++) {
for (i = 200; i > 0; i--) {
if (!(CSR_READ_2(sc, WI_COMMAND) & WI_CMD_BUSY)) {
break;
}
DELAY(10*1000); /* 10 m sec */
}
if (i == WI_TIMEOUT) {
if (i < 0) {
return(ETIMEDOUT);
}