16 juin 2009

Carte FXO X100P Zaptel Dahdi : Failed to initailize DAA, giving up

Tags :

posté dans Configuration |

Heureux propriétaire que je suis d'une carte FXO X100P pour mon Asterisk, j'ai eu la mauvaise idée de mettre à jour mon kernel en 26.29 sur ma chère Debian. Là impossible de recompiler le module avec m-a. Après recherche et environs 50 checkout SVN... je me suis rendu compte qu'il n'y a pas que zaptel-source dans la vie mais aussi dahdi-source.

Ainsi, aptitude install dadhi-source, m-a -t a-i dahdi-source et modprobe wcfxo... et :

[874853.416148] dahdi: Telephony Interface Registered on major 196
[874853.416151] dahdi: Version:
[874853.418471] wcfxo 0000:03:07.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[874853.460005] NOTICE-wcfxo: WCFXO/0: Unknown DAA chip revision: REVB=0
[874853.460008] Failed to initailize DAA, giving up...
[874853.460058] wcfxo: probe of 0000:03:07.0 failed with error -5

Quoi what ? WTF ?

Le problème d'est l'IRQ, la solution c'est un petit bout de code :

Index: wcfxo.c
===================================================================
--- wcfxo.c	(revision 4616)
+++ wcfxo.c	(working copy)
@@ -696,6 +696,16 @@
 	/* Hardware stuff */
 	/* Reset PCI Interface chip and registers */
 	outb(0x0e, wc->ioaddr + WC_CNTL);
+
+	/* Set all to outputs except AUX 4, which is an input */
+	outb(0xef, wc->ioaddr + WC_AUXC);
+
+	/* Reset the DAA (DAA uses AUX5 for reset) */
+	outb(0x00, wc->ioaddr + WC_AUXD);
+	set_current_state(TASK_INTERRUPTIBLE);
+	schedule_timeout(1 + HZ / 800);
+
+	/* Set hook state to on hook & un-reset the DAA */
 	if (wc->flags & FLAG_RESET_ON_AUX5) {
 		/* Set hook state to on hook for when we switch.
 		   Make sure reset is high */
@@ -704,9 +714,7 @@
 		/* Set hook state to on hook for when we switch */
 		outb(0x24, wc->ioaddr + WC_AUXD);
 	}
-	/* Set all to outputs except AUX 4, which is an input */
-	outb(0xef, wc->ioaddr + WC_AUXC);
-
+
 	/* Back to normal, with automatic DMA wrap around */
 	outb(0x01, wc->ioaddr + WC_CNTL);

Donc, on apt-get source dahdi-source, on édite le fichier drivers/dahdi/wcfxo.c, puis on dpkg-buildpackage -rfakeroot pour enfin dpkg -i ../dahdi-source_2.2.0~dfsg~rc5-1_all.deb et re m-a.

Zou :

[876677.300909] dahdi: Telephony Interface Registered on major 196
[876677.300913] dahdi: Version:
[876677.360006] wcfxo: DAA mode is 'FCC'
[876677.360009] Found a Wildcard FXO: Wildcard X100P

Bonheur !

Merci https://issues.asterisk.org/view.php?id=14232

Article posté on Mardi, 16 juin 2009 à 22:43 dans Configuration. Vous pouvez suivre les commentaires sur cet article via un feed RSS 2.0. Commentaires et pings fermés.

Il y a actuellement une résponse pour “Carte FXO X100P Zaptel Dahdi : Failed to initailize DAA, giving up”

  1. 1 Le 3 octobre 2009, STux à écrit :

    Franchement, un grand merci … la première fois que j’ai installé cette carte , ca n’avait posé aucun soucis, et la j’ai réinstallé asterisk …
    Ca faisait bien quelques dizaines de minutes que j’étais dessus entrain de m’énerver quand je suis tombé sur ton article.

    Tout marche nickel maintenant !!

    ;)

    Christophe.