9fans archive / 2008 / 09 / 218 / prev next
From: cinap_lenrek@gmx.de
Subject: [9fans] sdiahci.c on sources broken?
Date: Thu, 25 Sep 2008 21:58:22 +0200
this is from eriks contrib:
static void
westerndigitalhung(Drive *d)
{
if((d->portm.feat&Datapi) == 0 && d->active &&
TK2MS(Ticks-d->intick) > 5000){
dprint("%s: drive hung; resetting [%lux] ci=%lux\n",
d->unit->name, d->port->task, d->port->ci);
d->state = Dreset;
}
}
and this is the version on sources:
static void
westerndigitalhung(Drive *d)
{
if((d->portm.feat&Datapi) == 0 && d->active && TK2MS(d->intick) > 5000){
dprint("%s: drive hung; resetting [%lux] ci %lx\n",
d->unit->name, d->port->task, d->port->ci);
d->state = Dreset;
}
}
if i understand it right, d->intick is just the point in time it started some
io request. it does:
p->intick = MACHP(0)->ticks;
p->active++;
so it seems the version on sources is wrong, and eriks version does the right thing.
(calculating the time the operation takes (current time - time of request start))
can somebody confirm this?
--
cinap