Extra intr's have nothing to do with LAPTOP.
Made five-strikes-we-shut-up for timeouts. Inspired by: bde in 1.1.5.1-patch011
This commit is contained in:
parent
ca7cc5c89e
commit
c5bd56befa
@ -37,7 +37,7 @@ static int wdtest = 0;
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)wd.c 7.2 (Berkeley) 5/9/91
|
||||
* $Id: wd.c,v 1.55 1994/10/22 01:57:12 phk Exp $
|
||||
* $Id: wd.c,v 1.56 1994/10/23 21:27:40 wollman Exp $
|
||||
*/
|
||||
|
||||
/* TODO:
|
||||
@ -778,9 +778,7 @@ wdintr(int unit)
|
||||
if (wdtab[unit].b_active == 2)
|
||||
return; /* intr in wdflushirq() */
|
||||
if (!wdtab[unit].b_active) {
|
||||
#ifndef LAPTOP
|
||||
printf("wdc%d: extra interrupt\n", unit);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1823,10 +1821,15 @@ wdtimeout(void *cdu)
|
||||
{
|
||||
struct disk *du;
|
||||
int x;
|
||||
static int timeouts;
|
||||
|
||||
du = (struct disk *)cdu;
|
||||
x = splbio();
|
||||
if (du->dk_timeout != 0 && --du->dk_timeout == 0) {
|
||||
if(timeouts++ == 5)
|
||||
wderror((struct buf *)NULL, du,
|
||||
"Last time I say: interrupt timeout. Probably a portable PC.");
|
||||
else if(timeouts++ < 5)
|
||||
wderror((struct buf *)NULL, du, "interrupt timeout");
|
||||
wdunwedge(du);
|
||||
wdflushirq(du, x);
|
||||
|
Loading…
x
Reference in New Issue
Block a user