patch-2.4.7 linux/drivers/isdn/hisax/sedlbauer.c

Next file: linux/drivers/isdn/hysdn/boardergo.c
Previous file: linux/drivers/isdn/hisax/nj_u.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.6/linux/drivers/isdn/hisax/sedlbauer.c linux/drivers/isdn/hisax/sedlbauer.c
@@ -1,4 +1,4 @@
-/* $Id: sedlbauer.c,v 1.25.6.4 2001/02/16 16:43:29 kai Exp $
+/* $Id: sedlbauer.c,v 1.25.6.5 2001/07/13 09:20:12 kai Exp $
  *
  * sedlbauer.c  low level stuff for Sedlbauer cards
  *              includes support for the Sedlbauer speed star (speed star II),
@@ -30,11 +30,11 @@
  * Speed Win2	IPAC		ISAPNP
  * ISDN PC/104	IPAC		DIP-SWITCH
  * Speed Star2	IPAC		CARDMGR
- * Speed PCI	IPAC		PCI PNP		
+ * Speed PCI	IPAC		PCI PNP
  * Speed Fax+ 	ISAC_ISAR	PCI PNP		Full analog support
  *
  * Important:
- * For the sedlbauer speed fax+ to work properly you have to download 
+ * For the sedlbauer speed fax+ to work properly you have to download
  * the firmware onto the card.
  * For example: hisaxctrl <DriverID> 9 ISAR.BIN
 */
@@ -52,10 +52,10 @@
 
 extern const char *CardType[];
 
-const char *Sedlbauer_revision = "$Revision: 1.25.6.4 $";
+const char *Sedlbauer_revision = "$Revision: 1.25.6.5 $";
 
 const char *Sedlbauer_Types[] =
-	{"None", "speed card/win", "speed star", "speed fax+", 
+	{"None", "speed card/win", "speed star", "speed fax+",
 	"speed win II / ISDN PC/104", "speed star II", "speed pci",
 	"speed fax+ pyramid", "speed fax+ pci"};
 
@@ -63,7 +63,7 @@
 #define PCI_SUBVENDOR_SEDLBAUER_PCI	0x53
 #define PCI_SUBVENDOR_SPEEDFAX_PCI	0x54
 #define PCI_SUB_ID_SEDLBAUER		0x01
- 
+
 #define SEDL_SPEED_CARD_WIN	1
 #define SEDL_SPEED_STAR 	2
 #define SEDL_SPEED_FAX		3
@@ -231,7 +231,7 @@
  * mode = 1 access with IRQ off
  * mode = 2 access with IRQ off and using last offset
  */
-  
+
 static u_char
 ReadISAR(struct IsdnCardState *cs, int mode, u_char offset)
 {	
@@ -287,7 +287,7 @@
 		   causing us to just crash the kernel. bad. */
 		printk(KERN_WARNING "Sedlbauer: card not available!\n");
 		return;
-        }
+	}
 
 	val = readreg(cs->hw.sedl.adr, cs->hw.sedl.hscx, HSCX_ISTA + 0x40);
       Start_HSCX:
@@ -632,9 +632,10 @@
 #endif /* CONFIG_PCI */
 	}	
 	
-       	/* In case of the sedlbauer pcmcia card, this region is in use,
-           reserved for us by the card manager. So we do not check it
-           here, it would fail. */
+	/* In case of the sedlbauer pcmcia card, this region is in use,
+	 * reserved for us by the card manager. So we do not check it
+	 * here, it would fail.
+	 */
 	if (cs->hw.sedl.bus != SEDL_BUS_PCMCIA &&
 		check_region((cs->hw.sedl.cfg_reg), bytecnt)) {
 		printk(KERN_WARNING
@@ -659,22 +660,23 @@
 	cs->cardmsg = &Sedl_card_msg;
 
 /*
- * testing ISA and PCMCIA Cards for IPAC, default is ISAC 
+ * testing ISA and PCMCIA Cards for IPAC, default is ISAC
  * do not test for PCI card, because ports are different
  * and PCI card uses only IPAC (for the moment)
  */	
 	if (cs->hw.sedl.bus != SEDL_BUS_PCI) {
 		val = readreg(cs->hw.sedl.cfg_reg + SEDL_IPAC_ANY_ADR,
-        	        cs->hw.sedl.cfg_reg + SEDL_IPAC_ANY_IPAC, IPAC_ID);
-	        if (val == 1) {
-		/* IPAC */
-                	cs->subtyp = SEDL_SPEED_WIN2_PC104;
+			cs->hw.sedl.cfg_reg + SEDL_IPAC_ANY_IPAC, IPAC_ID);
+		printk(KERN_DEBUG "Sedlbauer: testing IPAC version %x\n", val);
+	        if ((val == 1) || (val == 2)) {
+			/* IPAC */
+			cs->subtyp = SEDL_SPEED_WIN2_PC104;
 			if (cs->hw.sedl.bus == SEDL_BUS_PCMCIA) {
 				cs->subtyp = SEDL_SPEED_STAR2;
 			}
 			cs->hw.sedl.chip = SEDL_CHIP_IPAC;
 		} else {
-		/* ISAC_HSCX oder ISAC_ISAR */
+			/* ISAC_HSCX oder ISAC_ISAR */
 			if (cs->hw.sedl.chip == SEDL_CHIP_TEST) {
 				cs->hw.sedl.chip = SEDL_CHIP_ISAC_HSCX;
 			}
@@ -691,25 +693,25 @@
 	if (cs->hw.sedl.chip == SEDL_CHIP_IPAC) {
 		if (cs->hw.sedl.bus == SEDL_BUS_PCI) {
 	                cs->hw.sedl.adr  = cs->hw.sedl.cfg_reg + SEDL_IPAC_PCI_ADR;
-        	        cs->hw.sedl.isac = cs->hw.sedl.cfg_reg + SEDL_IPAC_PCI_IPAC;
-                	cs->hw.sedl.hscx = cs->hw.sedl.cfg_reg + SEDL_IPAC_PCI_IPAC;
+			cs->hw.sedl.isac = cs->hw.sedl.cfg_reg + SEDL_IPAC_PCI_IPAC;
+			cs->hw.sedl.hscx = cs->hw.sedl.cfg_reg + SEDL_IPAC_PCI_IPAC;
 		} else {
 	                cs->hw.sedl.adr  = cs->hw.sedl.cfg_reg + SEDL_IPAC_ANY_ADR;
-        	        cs->hw.sedl.isac = cs->hw.sedl.cfg_reg + SEDL_IPAC_ANY_IPAC;
-                	cs->hw.sedl.hscx = cs->hw.sedl.cfg_reg + SEDL_IPAC_ANY_IPAC;
+			cs->hw.sedl.isac = cs->hw.sedl.cfg_reg + SEDL_IPAC_ANY_IPAC;
+			cs->hw.sedl.hscx = cs->hw.sedl.cfg_reg + SEDL_IPAC_ANY_IPAC;
 		}
-                test_and_set_bit(HW_IPAC, &cs->HW_Flags);
-                cs->readisac = &ReadISAC_IPAC;
-                cs->writeisac = &WriteISAC_IPAC;
-                cs->readisacfifo = &ReadISACfifo_IPAC;
-                cs->writeisacfifo = &WriteISACfifo_IPAC;
-                cs->irq_func = &sedlbauer_interrupt_ipac;
+		test_and_set_bit(HW_IPAC, &cs->HW_Flags);
+		cs->readisac = &ReadISAC_IPAC;
+		cs->writeisac = &WriteISAC_IPAC;
+		cs->readisacfifo = &ReadISACfifo_IPAC;
+		cs->writeisacfifo = &WriteISACfifo_IPAC;
+		cs->irq_func = &sedlbauer_interrupt_ipac;
 
 		val = readreg(cs->hw.sedl.adr, cs->hw.sedl.isac, IPAC_ID);
-                printk(KERN_INFO "Sedlbauer: IPAC version %x\n", val);
+		printk(KERN_INFO "Sedlbauer: IPAC version %x\n", val);
 		reset_sedlbauer(cs);
 	} else {
-	/* ISAC_HSCX oder ISAC_ISAR */
+		/* ISAC_HSCX oder ISAC_ISAR */
 		cs->readisac = &ReadISAC;
 		cs->writeisac = &WriteISAC;
 		cs->readisacfifo = &ReadISACfifo;

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