Date: Thu, 5 Apr 2001 02:41:15 -0700 From: Alfred Perlstein <alfred@FreeBSD.org> To: Luigi Rizzo <luigi@info.iet.unipi.it> Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/wi if_wi.c Message-ID: <20010405024115.F17723@fw.wintelcom.net> In-Reply-To: <200104050929.LAA88010@info.iet.unipi.it>; from luigi@info.iet.unipi.it on Thu, Apr 05, 2001 at 11:29:43AM %2B0200 References: <200104050925.f359Pfh75393@freefall.freebsd.org> <200104050929.LAA88010@info.iet.unipi.it>
next in thread | previous in thread | raw e-mail | index | archive | help
* Luigi Rizzo <luigi@info.iet.unipi.it> [010405 02:30] wrote: > > alfred 2001/04/05 02:25:41 PDT > > > > Modified files: > > sys/dev/wi if_wi.c > > Log: > > 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) > > it would be better to make it 2*HZ then, because someone > uses different values if HZ than the default (100) /* wait for the busy bit to clear */ 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 < 0) { return(ETIMEDOUT); } It's using DELAY, not tsleep. -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] Daemon News Magazine in your snail-mail! http://magazine.daemonnews.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010405024115.F17723>