[9fans] sdiahci.c on sources broken? - Plan9

This is a discussion on [9fans] sdiahci.c on sources broken? - Plan9 ; 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: ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: [9fans] sdiahci.c on sources broken?

  1. [9fans] sdiahci.c on sources broken?

    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



  2. Re: [9fans] sdiahci.c on sources broken?

    On Thu, 2008-09-25 at 21:58 +0200, cinap_lenrek@gmx.de wrote:
    > 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?
    >

    I can vouch for the fact that Erik knows what he's doing, specially as
    regards disk operations: he's demonstrated that to me on more than one
    occasion. I can also raise the issue that he has trouble getting
    changes approved through the patch system, probably because his fixes
    are hard to validate and/or bring in line with the P9 philosophy.

    Bottom line, trust him! And when it all works, let the community know.
    --
    Lucio De Re (Off site)
    Ph: +27 83 251 5824
    Fx: +27 58 653 1435




  3. Re: [9fans] sdiahci.c on sources broken?

    > I can vouch for the fact that Erik knows what he's doing, specially as
    > regards disk operations: he's demonstrated that to me on more than one
    > occasion. I can also raise the issue that he has trouble getting
    > changes approved through the patch system, probably because his fixes
    > are hard to validate and/or bring in line with the P9 philosophy.


    There is a huge queue of at least three and four months old patches,
    including some by federico and rsc. So I very much doubt it has
    anything to do with Erik's patches in particular, he just happens to
    have contributed more than others.

    Peace

    uriel


+ Reply to Thread