Re: [PATCH] IDE Power Management, try 3

Benjamin Herrenschmidt (benh@kernel.crashing.org)
10 Jun 2003 17:56:05 +0200


On Tue, 2003-06-10 at 16:23, Bartlomiej Zolnierkiewicz wrote:
> On 10 Jun 2003, Benjamin Herrenschmidt wrote:
>
> > On Fri, 2003-06-06 at 23:25, Bartlomiej Zolnierkiewicz wrote:
> > > I have corrected it a bit and I am going to submit it, any comments?
> > >
> > > Ben, can you verify my changes and check that it still works after 'fixing'?
> > > :-)
> >
> > Heh, thanks for the "corrections" ;)
> >
> > Regarding ide_wait_not_busy(), I'd rather have it return -ENODEV
> > when it reads 0xff, what do you think ?
>
> Nope, if you change it to return -ENODEV callers will fail.

Yup, that's the point, -ENODEV clearly mean don't bother probing here,
I'm reading 0xff, so there really mustn't be anything connected out
there. No ? At least that is why I added this 0xff test at first,
because some controllers with a non-wired bus don't even pull low
the BSY line as spec say they should do.

The -EBUSY case is tricky, it means the BSY bit stayed up for more than
the max timeout allowed by spec. Currently, I just continue probing with
a warning printed, ideally, we should probably try to reset or send an
EDD to the drive and then wait again, but then, I'm not sure this case
ever happens so...

> > I'll test the patch later today (just back from a long week-end),
> > Ben.
>
> Good!

And it still works it seems ;) I haven't stressed it much yet though,
I have other problems with 2.5 right now, but I think it can go to
Linus, we can improve the actual state machines for individual
subdrivers later on.

Ben.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/