Subject: kern/9332: raylink driver is not big-endian aware
To: None <email@example.com>
From: Mark Brinicombe <firstname.lastname@example.org>
Date: 02/02/2000 00:03:45
>Synopsis: raylink driver is not big-endian aware
>Responsible: kern-bug-people (Kernel Bug People)
>Arrival-Date: Wed Feb 2 00:03:00 2000
>Originator: Mark Brinicombe
>Release: -current as of 02/01/2000<NetBSD-current source date>
System: NetBSD pain.devlab.liberate.com 1.4L NetBSD 1.4L (PAIN) #4: Fri Oct 29 20:10:46 PDT 1999 email@example.com:/usr/export/mark/ennovate/sys/arch/i386/compile/PAIN i386
The raylink driver dev/pcmcia/if_ray.c is not big-endian aware and
fails on big endian systems. The problem is the ray_read_region()
and ray_write_region() functions. The problem lies in the optmised
cases where the code tries to use 2 and 4 byte variations of
bus_space_read_region and bus_space_write_region.
Build PCMCIA support and the raylink driver on a big-endian system
and watch it fail the self test.
My simple fix was to add ifdef's round that code that does the
optimised transfers so that on big endian systems these functions
always use bus_space_read_region_1() and bus_space_write_region_1().