patch-2.1.91 linux/drivers/char/stallion.c

Next file: linux/drivers/char/tty_io.c
Previous file: linux/drivers/char/mem.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.90/linux/drivers/char/stallion.c linux/drivers/char/stallion.c
@@ -143,7 +143,7 @@
  */
 static char	*stl_drvtitle = "Stallion Multiport Serial Driver";
 static char	*stl_drvname = "stallion";
-static char	*stl_drvversion = "5.4.3";
+static char	*stl_drvversion = "5.4.5";
 static char	*stl_serialname = "ttyE";
 static char	*stl_calloutname = "cue";
 
@@ -278,6 +278,7 @@
 #define	EIO_INTRPEND	0x08
 #define	EIO_INTEDGE	0x00
 #define	EIO_INTLEVEL	0x08
+#define	EIO_0WS		0x10
 
 #define	ECH_ID		0xa0
 #define	ECH_IDBITMASK	0xe0
@@ -2153,6 +2154,10 @@
 	brdp->ioctrl = brdp->ioaddr1 + 1;
 	brdp->iostatus = brdp->ioaddr1 + 2;
 
+	status = inb(brdp->iostatus);
+	if ((status & EIO_IDBITMASK) == EIO_MK3)
+		brdp->ioctrl++;
+
 /*
  *	Handle board specific stuff now. The real difference is PCI
  *	or not PCI.
@@ -2171,7 +2176,7 @@
 				brdp->irq, brdp->brdnr);
 			return(-EINVAL);
 		}
-		outb((stl_vecmap[brdp->irq] |
+		outb((stl_vecmap[brdp->irq] | EIO_0WS |
 			((brdp->irqtype) ? EIO_INTLEVEL : EIO_INTEDGE)),
 			brdp->ioctrl);
 	}
@@ -2194,7 +2199,6 @@
 	brdp->clk = CD1400_CLK;
 	brdp->isr = stl_eiointr;
 
-	status = inb(brdp->iostatus);
 	switch (status & EIO_IDBITMASK) {
 	case EIO_8PORTM:
 		brdp->clk = CD1400_CLK8M;
@@ -2220,7 +2224,6 @@
 		default:
 			return(-ENODEV);
 		}
-		brdp->ioctrl++;
 		break;
 	default:
 		return(-ENODEV);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov