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.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* from: @(#)wd.c 7.2 (Berkeley) 5/9/91
|
* 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:
|
/* TODO:
|
||||||
@ -778,9 +778,7 @@ wdintr(int unit)
|
|||||||
if (wdtab[unit].b_active == 2)
|
if (wdtab[unit].b_active == 2)
|
||||||
return; /* intr in wdflushirq() */
|
return; /* intr in wdflushirq() */
|
||||||
if (!wdtab[unit].b_active) {
|
if (!wdtab[unit].b_active) {
|
||||||
#ifndef LAPTOP
|
|
||||||
printf("wdc%d: extra interrupt\n", unit);
|
printf("wdc%d: extra interrupt\n", unit);
|
||||||
#endif
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1823,11 +1821,16 @@ wdtimeout(void *cdu)
|
|||||||
{
|
{
|
||||||
struct disk *du;
|
struct disk *du;
|
||||||
int x;
|
int x;
|
||||||
|
static int timeouts;
|
||||||
|
|
||||||
du = (struct disk *)cdu;
|
du = (struct disk *)cdu;
|
||||||
x = splbio();
|
x = splbio();
|
||||||
if (du->dk_timeout != 0 && --du->dk_timeout == 0) {
|
if (du->dk_timeout != 0 && --du->dk_timeout == 0) {
|
||||||
wderror((struct buf *)NULL, du, "interrupt timeout");
|
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);
|
wdunwedge(du);
|
||||||
wdflushirq(du, x);
|
wdflushirq(du, x);
|
||||||
du->dk_skip = 0;
|
du->dk_skip = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user