[svn-commits] tzafrir: linux/trunk r10276 - in /linux/trunk: drivers/dahdi/ drivers/dahdi/w...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Wed Oct 26 14:00:32 CDT 2011
Author: tzafrir
Date: Wed Oct 26 14:00:28 2011
New Revision: 10276
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10276
Log:
dahdi: Remove dahdi_span.irq and move dahdi_span.irqmisses into dahdi_device.
'irqmisses' is more a function of the device and there are better ways
to get to IRQ for a device than storing it in any DAHDI structures.
Signed-off-by: Shaun Ruffell <sruffell at digium.com>
Modified:
linux/trunk/drivers/dahdi/dahdi-base.c
linux/trunk/drivers/dahdi/dahdi-sysfs.c
linux/trunk/drivers/dahdi/wcb4xxp/base.c
linux/trunk/drivers/dahdi/wcfxo.c
linux/trunk/drivers/dahdi/wct1xxp.c
linux/trunk/drivers/dahdi/wct4xxp/base.c
linux/trunk/drivers/dahdi/wctdm.c
linux/trunk/drivers/dahdi/wctdm24xxp/base.c
linux/trunk/drivers/dahdi/wcte11xp.c
linux/trunk/drivers/dahdi/wcte12xp/base.c
linux/trunk/include/dahdi/kernel.h
Modified: linux/trunk/drivers/dahdi/dahdi-base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi-base.c?view=diff&rev=10276&r1=10275&r2=10276
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-base.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-base.c Wed Oct 26 14:00:28 2011
@@ -845,8 +845,8 @@
seq_printf(sfile, "\tE-bit error count: %d\n", s->count.ebit);
if (s->count.fas)
seq_printf(sfile, "\tFAS error count: %d\n", s->count.fas);
- if (s->irqmisses)
- seq_printf(sfile, "\tIRQ misses: %d\n", s->irqmisses);
+ if (s->parent->irqmisses)
+ seq_printf(sfile, "\tIRQ misses: %d\n", s->parent->irqmisses);
if (s->timingslips)
seq_printf(sfile, "\tTiming slips: %d\n", s->timingslips);
seq_printf(sfile, "\n");
@@ -4246,7 +4246,7 @@
spaninfo.prbs = s->count.prbs;
spaninfo.errsec = s->count.errsec;
- spaninfo.irqmisses = s->irqmisses; /* get IRQ miss count */
+ spaninfo.irqmisses = s->parent->irqmisses; /* get IRQ miss count */
spaninfo.syncsrc = s->syncsrc; /* get active sync source */
spaninfo.totalchans = s->channels;
spaninfo.numchans = 0;
@@ -4256,7 +4256,7 @@
}
spaninfo.lbo = s->lbo;
spaninfo.lineconfig = s->lineconfig;
- spaninfo.irq = s->irq;
+ spaninfo.irq = 0;
spaninfo.linecompat = s->linecompat;
strlcpy(spaninfo.lboname, dahdi_lboname(s->lbo),
sizeof(spaninfo.lboname));
@@ -4333,7 +4333,7 @@
spaninfo_v1.crc4count = s->count.crc4;
spaninfo_v1.ebitcount = s->count.ebit;
spaninfo_v1.fascount = s->count.fas;
- spaninfo_v1.irqmisses = s->irqmisses;
+ spaninfo_v1.irqmisses = s->parent->irqmisses;
spaninfo_v1.syncsrc = s->syncsrc;
spaninfo_v1.totalchans = s->channels;
spaninfo_v1.numchans = 0;
@@ -4343,7 +4343,7 @@
}
spaninfo_v1.lbo = s->lbo;
spaninfo_v1.lineconfig = s->lineconfig;
- spaninfo_v1.irq = s->irq;
+ spaninfo_v1.irq = 0;
spaninfo_v1.linecompat = s->linecompat;
strlcpy(spaninfo_v1.lboname,
dahdi_lboname(s->lbo),
Modified: linux/trunk/drivers/dahdi/dahdi-sysfs.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi-sysfs.c?view=diff&rev=10276&r1=10275&r2=10276
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-sysfs.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-sysfs.c Wed Oct 26 14:00:28 2011
@@ -219,8 +219,6 @@
span_attr(desc, "%s\n");
span_attr(spantype, "%s\n");
span_attr(alarms, "0x%x\n");
-span_attr(irq, "%d\n");
-span_attr(irqmisses, "%d\n");
span_attr(lbo, "%d\n");
span_attr(syncsrc, "%d\n");
@@ -254,8 +252,6 @@
__ATTR_RO(spantype),
__ATTR_RO(local_spanno),
__ATTR_RO(alarms),
- __ATTR_RO(irq),
- __ATTR_RO(irqmisses),
__ATTR_RO(lbo),
__ATTR_RO(syncsrc),
__ATTR_RO(is_digital),
Modified: linux/trunk/drivers/dahdi/wcb4xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wcb4xxp/base.c?view=diff&rev=10276&r1=10275&r2=10276
==============================================================================
--- linux/trunk/drivers/dahdi/wcb4xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wcb4xxp/base.c Wed Oct 26 14:00:28 2011
@@ -2475,7 +2475,6 @@
bspan = &b4->spans[i];
bspan->parent = b4;
- bspan->span.irq = b4->pdev->irq;
bspan->span.spantype = (bspan->te_mode) ? "TE" : "NT";
bspan->span.offset = i;
bspan->span.channels = WCB4XXP_CHANNELS_PER_SPAN;
Modified: linux/trunk/drivers/dahdi/wcfxo.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wcfxo.c?view=diff&rev=10276&r1=10275&r2=10276
==============================================================================
--- linux/trunk/drivers/dahdi/wcfxo.c (original)
+++ linux/trunk/drivers/dahdi/wcfxo.c Wed Oct 26 14:00:28 2011
@@ -666,7 +666,6 @@
wc->chan->chanpos = 1;
wc->span.chans = &wc->chan;
wc->span.channels = 1;
- wc->span.irq = wc->dev->irq;
wc->span.flags = DAHDI_FLAG_RBS;
wc->span.deflaw = DAHDI_LAW_MULAW;
#ifdef ENABLE_TASKLETS
Modified: linux/trunk/drivers/dahdi/wct1xxp.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wct1xxp.c?view=diff&rev=10276&r1=10275&r2=10276
==============================================================================
--- linux/trunk/drivers/dahdi/wct1xxp.c (original)
+++ linux/trunk/drivers/dahdi/wct1xxp.c Wed Oct 26 14:00:28 2011
@@ -786,7 +786,6 @@
if (!wc->ddev->location)
return -ENOMEM;
- wc->span.irq = wc->dev->irq;
wc->span.chans = wc->chans;
wc->span.flags = DAHDI_FLAG_RBS;
if (wc->ise1) {
@@ -918,10 +917,10 @@
if (((oldcan & 0xffff0000) >> 16) != CANARY) {
/* Check top part */
if (debug) printk(KERN_DEBUG "Expecting top %04x, got %04x\n", CANARY, (oldcan & 0xffff0000) >> 16);
- wc->span.irqmisses++;
+ wc->ddev->irqmisses++;
} else if ((oldcan & 0xffff) != ((wc->canary - 1) & 0xffff)) {
if (debug) printk(KERN_DEBUG "Expecting bottom %d, got %d\n", wc->canary - 1, oldcan & 0xffff);
- wc->span.irqmisses++;
+ wc->ddev->irqmisses++;
}
for (y=0;y<DAHDI_CHUNKSIZE;y++) {
for (x=0;x<wc->span.channels;x++) {
Modified: linux/trunk/drivers/dahdi/wct4xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wct4xxp/base.c?view=diff&rev=10276&r1=10275&r2=10276
==============================================================================
--- linux/trunk/drivers/dahdi/wct4xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wct4xxp/base.c Wed Oct 26 14:00:28 2011
@@ -1813,7 +1813,6 @@
ts->span.spantype = "J1";
break;
}
- ts->span.irq = wc->dev->irq;
/* HDLC Specific init */
ts->sigchan = NULL;
@@ -3569,13 +3568,10 @@
}
if (needed_latency > wc->numbufs) {
- int x;
-
dev_info(&wc->dev->dev, "Need to increase "
"latency. Estimated latency should "
"be %d\n", needed_latency);
- for (x = 0; x < wc->numspans; x++)
- wc->tspans[x]->span.irqmisses++;
+ wc->ddev->irqmisses++;
wc->needed_latency = needed_latency;
__t4_pci_out(wc, WC_DMACTRL, 0x00000000);
set_bit(T4_CHANGE_LATENCY, &wc->checkflag);
Modified: linux/trunk/drivers/dahdi/wctdm.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wctdm.c?view=diff&rev=10276&r1=10275&r2=10276
==============================================================================
--- linux/trunk/drivers/dahdi/wctdm.c (original)
+++ linux/trunk/drivers/dahdi/wctdm.c Wed Oct 26 14:00:28 2011
@@ -2398,7 +2398,6 @@
}
wc->span.chans = wc->chans;
wc->span.channels = NUM_CARDS;
- wc->span.irq = wc->dev->irq;
wc->span.flags = DAHDI_FLAG_RBS;
wc->span.ops = &wctdm_span_ops;
Modified: linux/trunk/drivers/dahdi/wctdm24xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wctdm24xxp/base.c?view=diff&rev=10276&r1=10275&r2=10276
==============================================================================
--- linux/trunk/drivers/dahdi/wctdm24xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wctdm24xxp/base.c Wed Oct 26 14:00:28 2011
@@ -1509,7 +1509,7 @@
#endif
_dahdi_receive(s);
if (unlikely(irqmiss))
- ++s->irqmisses;
+ wc->ddev->irqmisses++;
}
}
}
@@ -4479,7 +4479,6 @@
int digital_span, unsigned int card_position)
{
int x;
- struct pci_dev *pdev = wc->vb.pdev;
struct wctdm_chan *c;
struct wctdm_span *s;
static int spancount;
@@ -4543,7 +4542,6 @@
}
s->span.channels = chancount;
- s->span.irq = pdev->irq;
if (digital_span) {
wc->chans[chanoffset + 0]->chan.sigcap = DAHDI_SIG_CLEAR;
Modified: linux/trunk/drivers/dahdi/wcte11xp.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wcte11xp.c?view=diff&rev=10276&r1=10275&r2=10276
==============================================================================
--- linux/trunk/drivers/dahdi/wcte11xp.c (original)
+++ linux/trunk/drivers/dahdi/wcte11xp.c Wed Oct 26 14:00:28 2011
@@ -994,7 +994,6 @@
if (!wc->ddev->location)
return -ENOMEM;
- wc->span.irq = wc->dev->irq;
if (wc->spantype == TYPE_E1) {
if (unchannelized)
wc->span.channels = 32;
@@ -1129,10 +1128,10 @@
if (((oldcan & 0xffff0000) >> 16) != CANARY) {
/* Check top part */
if (debug) printk(KERN_DEBUG "Expecting top %04x, got %04x\n", CANARY, (oldcan & 0xffff0000) >> 16);
- wc->span.irqmisses++;
+ wc->ddev->irqmisses++;
} else if ((oldcan & 0xffff) != ((wc->canary - 1) & 0xffff)) {
if (debug) printk(KERN_DEBUG "Expecting bottom %d, got %d\n", wc->canary - 1, oldcan & 0xffff);
- wc->span.irqmisses++;
+ wc->ddev->irqmisses++;
}
for (y=0;y<DAHDI_CHUNKSIZE;y++) {
for (x=0;x<wc->span.channels;x++) {
Modified: linux/trunk/drivers/dahdi/wcte12xp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wcte12xp/base.c?view=diff&rev=10276&r1=10275&r2=10276
==============================================================================
--- linux/trunk/drivers/dahdi/wcte12xp/base.c (original)
+++ linux/trunk/drivers/dahdi/wcte12xp/base.c Wed Oct 26 14:00:28 2011
@@ -1835,8 +1835,6 @@
if (!wc->ddev->location)
return -ENOMEM;
- wc->span.irq = pdev->irq;
-
if (type == E1) {
wc->span.channels = 31;
wc->span.spantype = "E1";
@@ -2293,7 +2291,7 @@
wc->rxident = eframe[EFRAME_SIZE + 1];
wc->statreg = eframe[EFRAME_SIZE + 2];
if (wc->rxident != expected) {
- wc->span.irqmisses++;
+ wc->ddev->irqmisses++;
_resend_cmds(wc);
if (unlikely(debug)) {
t1_info(wc, "oops: rxident=%d "
Modified: linux/trunk/include/dahdi/kernel.h
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/include/dahdi/kernel.h?view=diff&rev=10276&r1=10275&r2=10276
==============================================================================
--- linux/trunk/include/dahdi/kernel.h (original)
+++ linux/trunk/include/dahdi/kernel.h Wed Oct 26 14:00:28 2011
@@ -904,6 +904,7 @@
* a hardware_id). This should not change if the device is
* relocated to a different location (e.g: different PCI slot)
* @devicetype: What type of device this is.
+ * @irqmisses: Count of "interrupt misses" for this device.
*
*/
struct dahdi_device {
@@ -913,6 +914,7 @@
const char *hardware_id;
const char *devicetype;
struct device dev;
+ unsigned int irqmisses;
};
struct dahdi_span {
@@ -924,7 +926,6 @@
int alarms; /*!< Pending alarms on span */
unsigned long flags;
u8 cannot_provide_timing:1;
- int irq; /*!< IRQ for this span's hardware */
int lbo; /*!< Span Line-Buildout */
int lineconfig; /*!< Span line configuration */
int linecompat; /*!< Span line compatibility (0 for
@@ -938,7 +939,6 @@
int maintstat; /*!< Maintenance state */
int mainttimer; /*!< Maintenance timer */
- int irqmisses; /*!< Interrupt misses */
int timingslips; /*!< Clock slips */
struct dahdi_chan **chans; /*!< Member channel structures */
More information about the svn-commits
mailing list