From 90e504dc2503e5501c9a12d546ba1ccdf1830419 Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Sat, 11 Jun 2011 01:58:43 +0000 Subject: [PATCH] wctdm24xxp: Do not read extra register when test for FXO module fails. In commit r9968 "wctdm24xxp: Allow more than one outstanding read at a time" I introduced a regression where the transmit FIFO on the data channel of a B400M could get locked up. The result would be constant HDLC overflows when writing to the data channel. This regression did not make it into any releases and did not exhibit itself when crossing spans on a single B400M module. This is a partial revert of commit r9968. Signed-off-by: Shaun Ruffell git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9977 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/wctdm24xxp/base.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/dahdi/wctdm24xxp/base.c b/drivers/dahdi/wctdm24xxp/base.c index caee746..5ff0253 100644 --- a/drivers/dahdi/wctdm24xxp/base.c +++ b/drivers/dahdi/wctdm24xxp/base.c @@ -2233,13 +2233,14 @@ static void handle_hx8_transmit(struct voicebus *vb, struct list_head *buffers) static int wctdm_voicedaa_insane(struct wctdm *wc, struct wctdm_module *mod) { - int blah[] = {2, 11}; - wctdm_getregs(wc, mod, blah, ARRAY_SIZE(blah)); - if (blah[0] != 0x3) + int blah; + blah = wctdm_getreg(wc, mod, 2); + if (blah != 0x3) return -2; + blah = wctdm_getreg(wc, mod, 11); if (debug & DEBUG_CARD) { dev_info(&wc->vb.pdev->dev, - "VoiceDAA System: %02x\n", blah[1] & 0xf); + "VoiceDAA System: %02x\n", blah & 0xf); } return 0; }