Re: [PATCH] M68k IDE updates

From: Paul Mackerras (paulus@samba.org)
Date: Mon Apr 14 2003 - 17:31:59 EST


Geert Uytterhoeven writes:

> I think the least-intrusive solution is something like this:
>
> --- linux-2.5/drivers/ide/ide-iops.c.orig Mon Apr 14 21:43:30 2003
> +++ linux-2.5/drivers/ide/ide-iops.c Mon Apr 14 21:44:53 2003
> @@ -423,8 +423,7 @@
> */
> void ide_fix_driveid (struct hd_driveid *id)
> {
> -#ifndef __LITTLE_ENDIAN
> -# ifdef __BIG_ENDIAN
> + if (ide_driveid_needs_swapping(id)) {

I really think that whether the driveid needs swapping should be
regarded as a property of the interface, not of the system as a whole.

I like the idea of adding a "read in driveid" function pointer to the
ide_hwif_t structure. Most systems would set that to the same as the
INSW function pointer. For those systems where the hardware designer
suffered a momentary dizzy spell we can set it to point to a function
that does the necessary byte-swapping.

Paul.
-
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/



This archive was generated by hypermail 2b29 : Tue Apr 15 2003 - 22:00:34 EST