diff options
author | Shaun Ruffell <sruffell@digium.com> | 2012-03-21 19:11:49 +0000 |
---|---|---|
committer | Shaun Ruffell <sruffell@digium.com> | 2012-03-21 19:11:49 +0000 |
commit | 0ba04ec4461afafc664cd89ec0407e51d87d8489 (patch) | |
tree | 7d6b4dcf3adf1686ac4d3765e1a43ea6f1ba2be4 | |
parent | afeb6f6ded7dcb5f52f7ddb976542c67bbc0c762 (diff) |
wct4xxp: __t4_frame_in and __t4_framer_out slowdowns.
This is a partial revert of r10234 "wct4xxp: __t4_framer_in and
__t4_framer_out speedups."
There were some platform + firmware version combinations that would fail to
properly configure the framer with the aforementioned speedups. The originally
reported sympton was that interrupts would fail to start and while
troubleshooting I also saw cases where one of the spans would stay in alarm
after starting. By adding in additional reads to the version register, the
overall process of writing / reading from the framer control registers is
slowed down which increases reliability.
This change does *not* affect the main path of TDM data which is DMAed
directly into buffers in host memory and are not read / written to / from
framer registers directly.
Reported-and-Tested-by: Vahan Yerkanian <vahan@arminco.com>
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10559
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.6@10565 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r-- | drivers/dahdi/wct4xxp/base.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/dahdi/wct4xxp/base.c b/drivers/dahdi/wct4xxp/base.c index 7127561..ad7ed97 100644 --- a/drivers/dahdi/wct4xxp/base.c +++ b/drivers/dahdi/wct4xxp/base.c @@ -670,11 +670,12 @@ static unsigned int __t4_framer_in(const struct t4 *wc, int unit, val = ((unit & 0x3) << 8) | (addr & 0xff) | haddr; writel(val, wc_laddr); - /* readl(wc_version); */ + readl(wc_version); writel(val | WC_LFRMR_CS | WC_LREAD, wc_laddr); readl(wc_version); ret = readb(wc_ldata); writel(val, wc_laddr); + readl(wc_version); return ret; } @@ -700,11 +701,13 @@ static void __t4_framer_out(const struct t4 *wc, int unit, const u8 addr, val = ((unit & 0x3) << 8) | (addr & 0xff) | haddr; writel(val, wc_laddr); + readl(wc_version); writel(value, wc_ldata); readl(wc_version); writel(val | WC_LFRMR_CS | WC_LWRITE, wc_laddr); - /* readl(wc_version); */ + readl(wc_version); writel(val, wc_laddr); + readl(wc_version); } static void t4_framer_out(struct t4 *wc, int unit, |