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

Linus Torvalds
2002-09-25T18:14:17Z

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