Subject: port-alpha/3626: Alpha scc driver doesn't check the ioasic offset
To: None <gnats-bugs@gnats.netbsd.org>
From: None <kenh@cmf.nrl.navy.mil>
List: netbsd-bugs
Date: 05/14/1997 11:05:45
>Number:         3626
>Category:       port-alpha
>Synopsis:       Alpha scc driver doesn't check the ioasic offset
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed May 14 15:20:01 1997
>Last-Modified:
>Originator:     Ken Hornstein
>Organization:
Navel Research Lab
	
>Release:        Latest alpha snapshot
>Environment:
	
System: NetBSD lisa-marie 1.2D NetBSD 1.2D (LISA-MARIE) #12: Wed May 14 10:42:41 PDT 1997 root@lisa-marie:/usr/src/sys/arch/alpha/compile/LISA-MARIE alpha


>Description:
	
The Alpha TurboChannel scc driver doesn't check the ioasic offset given
in the config file against the one that it is being probed on (this is
in sccmatch).  This means you can't wire down the scc drivers to a
particular chip in the config file.

This normally isn't an issue, but if you're trying to port the MI
z8530 driver to the Alpha, and you don't want to hose up your serial
console, then you might want to only use the scc driver on one of the
chips :-)
>How-To-Repeat:
	
Try giving a offset argument in the kernel config file for a scc device,
and watch it pick the first one available.
>Fix:
	
*** scc.c.orig	Wed May 14 10:16:45 1997
--- scc.c	Wed May 14 10:42:11 1997
***************
*** 348,353 ****
--- 348,358 ----
  	if (cf->cf_unit >= NSCC)
  		return (0);
  
+ 	/* Match the cflocator information against our ioasic offset */
+ 
+ 	if (*cf->cf_loc != d->iada_offset)
+ 		return (0);
+ 
  	/* Get the address, and check it for validity. */
  	sccaddr = (void *)d->iada_addr;
  #ifdef SPARSE
>Audit-Trail:
>Unformatted: