Subject: kern/9332: raylink driver is not big-endian aware
To: None <gnats-bugs@gnats.netbsd.org>
From: Mark Brinicombe <mark@pain.devlab.liberate.com>
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
>Last-Modified:
>Originator:     Mark Brinicombe
>Organization:
Liberate Technologies	
>Release:        -current as of 02/01/2000<NetBSD-current source date>
>Environment:
	
System: NetBSD pain.devlab.liberate.com 1.4L NetBSD 1.4L (PAIN) #4: Fri Oct 29 20:10:46 PDT 1999 mark@pain.devlab.liberate.com:/usr/export/mark/ennovate/sys/arch/i386/compile/PAIN i386


>Description:
	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.

>How-To-Repeat:
	Build PCMCIA support and the raylink driver on a big-endian system
	and watch it fail the self test.
>Fix:
	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().

>Audit-Trail:
>Unformatted: