Subject: kern/9332: raylink driver is not big-endian aware
To: None <>
From: Mark Brinicombe <>
List: netbsd-bugs
Date: 02/02/2000 00:03:45
>Number:         9332
>Category:       kern
>Synopsis:       raylink driver is not big-endian aware
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Feb  2 00:03:00 2000
>Originator:     Mark Brinicombe
Liberate Technologies	
>Release:        -current as of 02/01/2000<NetBSD-current source date>
System: NetBSD 1.4L NetBSD 1.4L (PAIN) #4: Fri Oct 29 20:10:46 PDT 1999 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().