patch-2.2.16 linux/drivers/isdn/hisax/w6692.c

Next file: linux/drivers/isdn/isdn_common.c
Previous file: linux/drivers/isdn/avmb1/kcapi.c
Back to the patch index
Back to the overall index

diff -urN v2.2.15/linux/drivers/isdn/hisax/w6692.c linux/drivers/isdn/hisax/w6692.c
@@ -1,4 +1,4 @@
-/* $Id: w6692.c,v 1.1 1999/09/04 06:28:58 keil Exp $
+/* $Id: w6692.c,v 1.4 2000/03/16 23:24:11 werner Exp $
 
  * w6692.c   Winbond W6692 specific routines
  *
@@ -8,6 +8,17 @@
  *              This file is (c) under GNU PUBLIC LICENSE
  *
  * $Log: w6692.c,v $
+ * Revision 1.4  2000/03/16 23:24:11  werner
+ *
+ * Fixed an additional location
+ *
+ * Revision 1.3  2000/03/16 22:41:36  werner
+ *
+ * Tried to fix second B-channel problem (still not tested)
+ *
+ * Revision 1.2  2000/02/26 00:35:13  keil
+ * Fix skb freeing in interrupt context
+ *
  * Revision 1.1  1999/09/04 06:28:58  keil
  * first revision
  *
@@ -47,7 +58,7 @@
 
 extern const char *CardType[];
 
-const char *w6692_revision = "$Revision: 1.1 $";
+const char *w6692_revision = "$Revision: 1.4 $";
 
 #define DBUSY_TIMER_VALUE 80
 
@@ -314,10 +325,13 @@
 {
 	u_char val;
 	u_char r;
-	struct BCState *bcs = cs->bcs + bchan;
+	struct BCState *bcs = cs->bcs;
 	struct sk_buff *skb;
 	int count;
 
+	if (bcs->channel != bchan)
+	  bcs++; /* hardware bchan must match ! */
+
 	val = cs->BC_Read_Reg(cs, bchan, W_B_EXIR);
 	debugl1(cs, "W6692B chan %d B_EXIR 0x%02X", bchan, val);
 
@@ -721,7 +735,9 @@
 W6692Bmode(struct BCState *bcs, int mode, int bc)
 {
 	struct IsdnCardState *cs = bcs->cs;
-	int bchan = bcs->hw.w6692.bchan;
+	int bchan = bc;
+
+	bcs->hw.w6692.bchan = bc;
 
 	if (cs->debug & L1_DEB_HSCX)
 		debugl1(cs, "w6692 %c mode %d ichan %d",

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)