Re: [PATCH] IDE Power Management, try 3

From: Benjamin Herrenschmidt (
Date: Tue Jun 10 2003 - 10:56:05 EST

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.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sun Jun 15 2003 - 22:00:24 EST