dh/dm hangup problem

Jim Ziobro z at rocksvax.UUCP
Thu Dec 5 14:00:19 AEST 1985


Revisions: 4.2BSD and 4.3BSD (Beta)

Index: /sys/vaxuba/dh.c

Problem: dm handler fails to lock out interrupts.

Repeat by: Toggle the carrier on one of the multiplexors lines.  Then
	watch random login processes get hangup signals.  This problem
	was discovered on an Emulex CS-11 with 32 lines.

Fix: Add an spl5/splx to the dm interrupt handler.

This is a fix for 4.2:

*** dh.c.ucb	Fri Jul 29 10:33:35 1983
--- dh.c	Wed Dec  4 22:40:35 1985
***************
*** 699,704
  	register struct uba_device *ui;
  	register struct tty *tp;
  	register struct dmdevice *addr;
  
  	ui = dminfo[dm];
  	if (ui == 0)

--- 699,705 -----
  	register struct uba_device *ui;
  	register struct tty *tp;
  	register struct dmdevice *addr;
+ 	int s;
  
  	ui = dminfo[dm];
  	if (ui == 0)
***************
*** 703,708
  	ui = dminfo[dm];
  	if (ui == 0)
  		return;
  	addr = (struct dmdevice *)ui->ui_addr;
  	if (addr->dmcsr&DM_DONE) {
  		if (addr->dmcsr&DM_CF) {

--- 704,713 -----
  	ui = dminfo[dm];
  	if (ui == 0)
  		return;
+ 	/*
+ 	If you have two dm's the second may interrupt so block it.
+ 	*/
+ 	s = spl5();
  	addr = (struct dmdevice *)ui->ui_addr;
  	if (addr->dmcsr&DM_DONE) {
  		if (addr->dmcsr&DM_CF) {
***************
*** 731,735
  		}
  		addr->dmcsr = DM_IE|DM_SE;
  	}
  }
  #endif

--- 736,741 -----
  		}
  		addr->dmcsr = DM_IE|DM_SE;
  	}
+ splx(s);
  }
  #endif
-- 
//Z\\
James M. Ziobro
Ziobro.Henr at Xerox.ARPA
{rochester,amd,sunybcs,ihnp4}!rocksvax!z



More information about the Comp.bugs.4bsd.ucb-fixes mailing list