From 6a0ba1704a3cf9d030e863e17b8530361ff4da5d Mon Sep 17 00:00:00 2001 From: wmeadows Date: Thu, 28 Aug 2003 19:53:19 +0000 Subject: 1. Add SubVendorID 2. Reverse Order of TDM Slots to Module Locations git-svn-id: http://svn.digium.com/svn/zaptel/trunk@236 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- wctdm.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) (limited to 'wctdm.c') diff --git a/wctdm.c b/wctdm.c index 8406cdd..28f5bfc 100755 --- a/wctdm.c +++ b/wctdm.c @@ -201,14 +201,14 @@ static inline void wcfxs_transmitprep(struct wcfxs *wc, unsigned char ints) for (x=0;xcardflag & (1 << 0)) - writechunk[x] |= (wc->chans[0].writechunk[x] << 24); - if (wc->cardflag & (1 << 1)) - writechunk[x] |= (wc->chans[1].writechunk[x] << 16); - if (wc->cardflag & (1 << 2)) - writechunk[x] |= (wc->chans[2].writechunk[x] << 8); if (wc->cardflag & (1 << 3)) - writechunk[x] |= (wc->chans[3].writechunk[x]); + writechunk[x] |= (wc->chans[3].writechunk[x] << 24); + if (wc->cardflag & (1 << 2)) + writechunk[x] |= (wc->chans[2].writechunk[x] << 16); + if (wc->cardflag & (1 << 1)) + writechunk[x] |= (wc->chans[1].writechunk[x] << 8); + if (wc->cardflag & (1 << 0)) + writechunk[x] |= (wc->chans[0].writechunk[x]); } @@ -225,14 +225,14 @@ static inline void wcfxs_receiveprep(struct wcfxs *wc, unsigned char ints) /* Read is at interrupt address. Valid data is available at normal offset */ readchunk = wc->readchunk; for (x=0;xcardflag & (1 << 0)) - wc->chans[0].readchunk[x] = (readchunk[x] >> 24) & 0xff; - if (wc->cardflag & (1 << 1)) - wc->chans[1].readchunk[x] = (readchunk[x] >> 16) & 0xff; - if (wc->cardflag & (1 << 2)) - wc->chans[2].readchunk[x] = (readchunk[x] >> 8) & 0xff; if (wc->cardflag & (1 << 3)) - wc->chans[3].readchunk[x] = (readchunk[x]) & 0xff; + wc->chans[3].readchunk[x] = (readchunk[x] >> 24) & 0xff; + if (wc->cardflag & (1 << 2)) + wc->chans[2].readchunk[x] = (readchunk[x] >> 16) & 0xff; + if (wc->cardflag & (1 << 1)) + wc->chans[1].readchunk[x] = (readchunk[x] >> 8) & 0xff; + if (wc->cardflag & (1 << 0)) + wc->chans[0].readchunk[x] = (readchunk[x]) & 0xff; } /* XXX We're wasting 8 taps. We should get closer :( */ for (x=0;xcards;x++) { @@ -764,9 +764,9 @@ static int wcfxs_init_proslic(struct wcfxs *wc, int card) wcfxs_setreg(wc, card, 1, 0x28); // U-Law 8-bit interface - wcfxs_setreg(wc, card, 2, card * 8); // Tx Start count low byte 0 + wcfxs_setreg(wc, card, 2, (3-card) * 8); // Tx Start count low byte 0 wcfxs_setreg(wc, card, 3, 0); // Tx Start count high byte 0 - wcfxs_setreg(wc, card, 4, card * 8); // Rx Start count low byte 0 + wcfxs_setreg(wc, card, 4, (3-card) * 8); // Rx Start count low byte 0 wcfxs_setreg(wc, card, 5, 0); // Rx Start count high byte 0 wcfxs_setreg(wc, card, 18, 0xff); // clear all interrupt wcfxs_setreg(wc, card, 19, 0xff); @@ -1283,6 +1283,7 @@ static void __devexit wcfxs_remove_one(struct pci_dev *pdev) static struct pci_device_id wcfxs_pci_tbl[] __devinitdata = { { 0xe159, 0x0001, 0xa159, PCI_ANY_ID, 0, 0, (unsigned long) &wcfxs }, { 0xe159, 0x0001, 0xe159, PCI_ANY_ID, 0, 0, (unsigned long) &wcfxs }, + { 0xe159, 0x0001, 0xb100, PCI_ANY_ID, 0, 0, (unsigned long) &wcfxs }, }; static struct pci_driver wcfxs_driver = { -- cgit v1.2.3