patch-2.1.118 linux/drivers/char/cyclades.c

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

diff -u --recursive --new-file v2.1.117/linux/drivers/char/cyclades.c linux/drivers/char/cyclades.c
@@ -1,7 +1,7 @@
 #define BLOCKMOVE
 #define	Z_WAKE
 static char rcsid[] =
-"$Revision: 2.2.1.5 $$Date: 1998/08/10 18:10:28 $";
+"$Revision: 2.2.1.6 $$Date: 1998/08/20 17:15:39 $";
 
 /*
  *  linux/drivers/char/cyclades.c
@@ -31,6 +31,11 @@
  *   void cleanup_module(void);
  *
  * $Log: cyclades.c,v $
+ * Revision 2.2.1.6  1998/08/20 17:15:39 ivan
+ * Fixed bug in cy_close function, which causes malfunction
+ * of one of the first 4 ports when a higher port is closed
+ * (Cyclom-Y only).
+ *
  * Revision 2.2.1.5  1998/08/10 18:10:28 ivan
  * Fixed Cyclom-4Yo hardware detection bug.
  *
@@ -2679,9 +2684,11 @@
     }
 
     if (!IS_CYC_Z(cy_card[info->card])) {
-	unsigned char *base_addr = (unsigned char *) 
-					cy_card[info->card].base_addr;
+	int channel = info->line - cy_card[info->card].first_line;
 	int index = cy_card[info->card].bus_index;
+	unsigned char *base_addr = (unsigned char *)
+			(cy_card[info->card].base_addr +
+			 (cy_chip_offset[channel>>2] <<index));
 	/* Stop accepting input */
 	cy_writeb((u_long)base_addr+(CySRER<<index),
 			cy_readb(base_addr+(CySRER<<index)) & ~CyRxData);

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