Re: [PATCH] fix ide-iops for big endian archs

Linus Torvalds (torvalds@transmeta.com)
Wed, 25 Sep 2002 11:22:11 -0700 (PDT)


On Wed, 25 Sep 2002, Benjamin Herrenschmidt wrote:
> --- 1.1/drivers/ide/ide-iops.c Wed Sep 11 08:54:11 2002
> +++ edited/drivers/ide/ide-iops.c Wed Sep 25 14:19:58 2002
> @@ -54,12 +54,20 @@
>
> static inline void ide_insw (u32 port, void *addr, u32 count)
> {
> +#ifdef __BIG_ENDIAN
> + insw(port, addr, count);
> +#else
> while (count--) { *(u16 *)addr = IN_WORD(port); addr += 2; }
> +#endif

If insw is correct on big-endian, then it sure as hell should be correct
on little-endian. I don't understand why we wouldn't use insw on PC's,
since it's smaller and much more traditional.

Linus

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