From 677a6e3bd267e7f370adcfb52624dc46ed500060 Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Thu, 10 Nov 2011 16:56:54 +0000 Subject: xpp: silence some bad ioctl() reporting Ignore some FXS-specific ioctl-s in xpd_pri. Signed-off-by: Oron Peled Acked-by Tzafrir Cohen git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10335 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/xpp/card_pri.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/dahdi/xpp/card_pri.c b/drivers/dahdi/xpp/card_pri.c index bdd0f40..84fa7a2 100644 --- a/drivers/dahdi/xpp/card_pri.c +++ b/drivers/dahdi/xpp/card_pri.c @@ -1467,14 +1467,17 @@ static int PRI_card_ioctl(xpd_t *xpd, int pos, unsigned int cmd, unsigned long a return -ENODEV; chan = XPD_CHAN(xpd, pos); switch (cmd) { + /* + * Asterisk may send FXS type ioctl()'s to us: + * - Some are sent to everybody (DAHDI_TONEDETECT) + * - Some are sent because we may be in CAS mode + * (FXS signalling) + * Ignore them. + */ case DAHDI_TONEDETECT: - /* - * Asterisk call all span types with this (FXS specific) - * call. Silently ignore it. - */ LINE_DBG(SIGNAL, xpd, pos, "PRI: TONEDETECT (%s)\n", (chan->flags & DAHDI_FLAG_AUDIO) ? - "AUDIO" : "SILENCE"); + "AUDIO" : "SILENCE"); return -ENOTTY; case DAHDI_ONHOOKTRANSFER: LINE_DBG(SIGNAL, xpd, pos, "PRI: ONHOOKTRANSFER\n"); @@ -1485,6 +1488,10 @@ static int PRI_card_ioctl(xpd_t *xpd, int pos, unsigned int cmd, unsigned long a case DAHDI_VMWI_CONFIG: LINE_DBG(SIGNAL, xpd, pos, "PRI: VMWI_CONFIG\n"); return -ENOTTY; + case DAHDI_SETPOLARITY: + LINE_DBG(SIGNAL, xpd, pos, "PRI: SETPOLARITY\n"); + return -ENOTTY; + /* report on really bad ioctl()'s */ default: report_bad_ioctl(THIS_MODULE->name, xpd, pos, cmd); return -ENOTTY; -- cgit v1.2.3