Subject: Broken zs now fixed (false ENXIO)
To: None <port-sun3@NetBSD.ORG>
From: Gordon W. Ross <gwr@mc.com>
List: port-sun3
Date: 01/30/1997 19:09:36
Spurious (?) ENXIO problem?
BCC: gwr

Thanks to some help from Peter Seebach <seebs@solon.com>,
the following fix has been shown to fix the zs driver bug.
This was just checked into -current. -gwr

*** sys/arch/sun3/dev/zs.c~	Sat Jan 18 14:45:33 1997
--- sys/arch/sun3/dev/zs.c	Thu Jan 30 18:25:27 1997
***************
*** 1,4 ****
! /*	$NetBSD: zs.c,v 1.45 1997/01/18 19:49:01 gwr Exp $	*/
  
  /*-
   * Copyright (c) 1996 The NetBSD Foundation, Inc.
--- 1,4 ----
! /*	$NetBSD: zs.c,v 1.46 1997/01/31 00:07:06 gwr Exp $	*/
  
  /*-
   * Copyright (c) 1996 The NetBSD Foundation, Inc.
***************
*** 301,306 ****
--- 301,311 ----
  			cs->cs_defspeed = zs_defspeed[zsc_unit][channel];
  		cs->cs_defcflag = zs_def_cflag;
  
+ 		cs->cs_rr0_dcd = ZSRR0_DCD;
+ 		cs->cs_rr0_cts = ZSRR0_CTS;
+ 		cs->cs_wr5_dtr = ZSWR5_DTR;
+ 		cs->cs_wr5_rts = ZSWR5_RTS;
+ 
  		/*
  		 * Clear the master interrupt enable.
  		 * The INTENA is common to both channels,
***************
*** 509,521 ****
--- 514,529 ----
  	 * status interrupt to detect CTS changes.
  	 */
  	s = splzs();
+ #if 0	/* XXX - See below. */
  	if (cflag & CLOCAL) {
  		cs->cs_rr0_dcd = 0;
  		cs->cs_preg[15] &= ~ZSWR15_DCD_IE;
  	} else {
+ 		/* XXX - Need to notice DCD change here... */
  		cs->cs_rr0_dcd = ZSRR0_DCD;
  		cs->cs_preg[15] |= ZSWR15_DCD_IE;
  	}
+ #endif	/* XXX */
  	if (cflag & CRTSCTS) {
  		cs->cs_wr5_dtr = ZSWR5_DTR;
  		cs->cs_wr5_rts = ZSWR5_RTS;