Re: [RFC][DOC] writing IDE driver guidelines

From: Marc Singer
Date: Sat May 15 2004 - 20:01:25 EST

On Sat, May 15, 2004 at 06:23:04PM -0400, Jeff Garzik wrote:
> Bartlomiej Zolnierkiewicz wrote:
> >On Saturday 15 of May 2004 19:34, Jeff Garzik wrote:
> >>On Sat, May 15, 2004 at 07:23:50PM +0200, Bartlomiej Zolnierkiewicz wrote:
> >>>- host drivers should request/release IO resource
> >>> themelves and set hwif->mmio to 2
> >>
> >>Don't you mean, hwif->mmio==2 for MMIO hardware?
> >
> >
> >It is was historically for MMIO, now it means that driver
> >handles IO resource itself (per comment in <linux/ide.h>).
> Maybe then create a constant HOST_IO_RESOURCES (value==2) to make that
> more obvious?

Please allow me to advocate for the naive.

While I do not in favor of lengthy commented discourses within the
code for all of the usual reasons, I do believe that interface
documentation is always welcome. It encourages everyone to learn and
follow the rules. It allows the subsystem maintainer to establish a
boundary so that accessing lower-level structures are left alone.

I'm not talking about a HOWTO as we know it. Let's look at this mmio
flag. How about writing this at a very minimum.

int mmio; /* 0: iommio; <insert appropriate direction */
/* 2: custom; driver must reserve & release system resources */

Certainly, I'd rather see something along the lines of a full

int mmio;
/* This field controls whether or not the driver blah,
blah. If the driver needs to reserve system resources,
e.g. ports of memory, set the value to 2 and blah, blah. */

It isn't much, but it goes a long way.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at