[dahdi-commits] dahdi/linux.git branch "master" updated.

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Fri Dec 21 17:09:53 CST 2012


branch "master" has been updated
       via  a46f906a0da5ee05e50ab3fc38f65dd06d552a9e (commit)
       via  9de213b1044c5e005d714b9cf00a367120d42392 (commit)
       via  19cef998bdf832be7c335f91571799369808ee9d (commit)
       via  82cf3c7b1326bf8cac83264f33898c60a46a18ad (commit)
       via  f916f1e91f38e5939e285bde9a5678fad8acb87f (commit)
      from  a8dfd61e534b7ba703cb39e84621dc1ed33ba833 (commit)

Summary of changes:
 drivers/dahdi/dahdi-base.c       |    4 ++--
 drivers/dahdi/dahdi-sysfs-chan.c |    7 +++----
 drivers/dahdi/wct4xxp/base.c     |    6 +++---
 include/dahdi/kernel.h           |   21 ++++++++++-----------
 4 files changed, 18 insertions(+), 20 deletions(-)


- Log -----------------------------------------------------------------
commit a46f906a0da5ee05e50ab3fc38f65dd06d552a9e
Author: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
Date:   Fri Dec 21 01:05:22 2012 +0200

    Only use bus and no class for channel devices
    
    It's wrong (and explicit oops with kernel >= 2.6.19) to set both
    bus and class for the same device. But setting the class is not needed
    in order to create a device. So just remove our dynamic devices from the
    dahdi_class. It will only contain the fixed-named devices.
    
    This fixes regression from cb4e4d006857d7fbc2ba51c63a96f2c97f2738d1.
    
    Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>

diff --git a/drivers/dahdi/dahdi-sysfs-chan.c b/drivers/dahdi/dahdi-sysfs-chan.c
index d6184e8..84bfef9 100644
--- a/drivers/dahdi/dahdi-sysfs-chan.c
+++ b/drivers/dahdi/dahdi-sysfs-chan.c
@@ -241,7 +241,6 @@ int chan_sysfs_create(struct dahdi_chan *chan)
 	devt = MKDEV(MAJOR(dahdi_channels_devt), chan->channo);
 	dev = &chan->chan_device;
 	dev->devt = devt;
-	dev->class = dahdi_class;
 	dev->bus = &chan_bus_type;
 	dev->parent = span->span_device;
 	/*

commit 9de213b1044c5e005d714b9cf00a367120d42392
Author: Shaun Ruffell <sruffell at digium.com>
Date:   Mon Dec 17 13:00:18 2012 -0600

    wct4xxp: t4_serial_setup() was called more often than necessary.
    
    The driver iterates through all the spans on a given device during assignment,
    checking for unassigned spans, but it was erroneously testing the span on which
    assigned was called.
    
    This just removes some unexpected behavior and provides a slight performance
    increase on load and does not impact the functionality of the driver as far as
    I'm aware.
    
    Reported-by: Doug Bailey <dbailey at digium.com>
    Signed-off-by: Shaun Ruffell <sruffell at digium.com>

diff --git a/drivers/dahdi/wct4xxp/base.c b/drivers/dahdi/wct4xxp/base.c
index 89bb5ce..2b7c4a1 100644
--- a/drivers/dahdi/wct4xxp/base.c
+++ b/drivers/dahdi/wct4xxp/base.c
@@ -2059,7 +2059,7 @@ static void t4_span_assigned(struct dahdi_span *span)
 	/* We use this to make sure all the spans are assigned before
 	 * running the serial setup. */
 	list_for_each_entry(pos, &wc->ddev->spans, device_node) {
-		if (!test_bit(DAHDI_FLAGBIT_REGISTERED, &span->flags))
+		if (!test_bit(DAHDI_FLAGBIT_REGISTERED, &pos->flags))
 			++unassigned_spans;
 	}
 

commit 19cef998bdf832be7c335f91571799369808ee9d
Author: Shaun Ruffell <sruffell at digium.com>
Date:   Thu Dec 13 11:07:43 2012 -0600

    sysfs: Remove signed one-bit fields.
    
    Eliminates the following warning from sparse:
      drivers/dahdi/dahdi-sysfs-chan.c:50:29: error: dubious one-bit signed bitfield
    
    Signed-off-by: Shaun Ruffell <sruffell at digium.com>

diff --git a/drivers/dahdi/dahdi-sysfs-chan.c b/drivers/dahdi/dahdi-sysfs-chan.c
index f63a795..d6184e8 100644
--- a/drivers/dahdi/dahdi-sysfs-chan.c
+++ b/drivers/dahdi/dahdi-sysfs-chan.c
@@ -47,9 +47,9 @@ static struct cdev dahdi_channels_cdev;	/*!< Channels chardev's */
  * succeeded.
  */
 static struct {
-	int channel_driver:1;
-	int channels_bus:1;
-	int cdev:1;
+	u32 channel_driver:1;
+	u32 channels_bus:1;
+	u32 cdev:1;
 } should_cleanup;
 
 #define chan_attr(field, format_string)		\

commit 82cf3c7b1326bf8cac83264f33898c60a46a18ad
Author: Shaun Ruffell <sruffell at digium.com>
Date:   Thu Dec 13 10:51:38 2012 -0600

    dahdi: Trivial change of '__u32' -> 'u32' in struct dahdi_count.
    
    struct dahdi_count is not directly exposed to user space, so we can use the
    native u32 type instead of __u32 to clarify that.
    
    Signed-off-by: Shaun Ruffell <sruffell at digium.com>

diff --git a/include/dahdi/kernel.h b/include/dahdi/kernel.h
index c0fe08e..2220557 100644
--- a/include/dahdi/kernel.h
+++ b/include/dahdi/kernel.h
@@ -741,16 +741,16 @@ static inline int dahdi_have_netdev(const struct dahdi_chan *chan) { return 0; }
 #endif
 
 struct dahdi_count {
-	__u32 fe;		/*!< Framing error counter */
-	__u32 cv;		/*!< Coding violations counter */
-	__u32 bpv;		/*!< Bipolar Violation counter */
-	__u32 crc4;		/*!< CRC4 error counter */
-	__u32 ebit;		/*!< current E-bit error count */
-	__u32 fas;		/*!< current FAS error count */
-	__u32 be;		/*!< current bit error count */
-	__u32 prbs;		/*!< current PRBS detected pattern */
-	__u32 errsec;		/*!< errored seconds */
-	__u32 timingslips;	/*!< Clock slips */
+	u32 fe;			/*!< Framing error counter */
+	u32 cv;			/*!< Coding violations counter */
+	u32 bpv;		/*!< Bipolar Violation counter */
+	u32 crc4;		/*!< CRC4 error counter */
+	u32 ebit;		/*!< current E-bit error count */
+	u32 fas;		/*!< current FAS error count */
+	u32 be;			/*!< current bit error count */
+	u32 prbs;		/*!< current PRBS detected pattern */
+	u32 errsec;		/*!< errored seconds */
+	u32 timingslips;	/*!< Clock slips */
 };
 
 /* map flagbits to flag masks */

commit f916f1e91f38e5939e285bde9a5678fad8acb87f
Author: Shaun Ruffell <sruffell at digium.com>
Date:   Thu Dec 13 10:41:46 2012 -0600

    dahdi: Move 'timingslips' in with the other maintenance counters.
    
    This allows timingslips to be reset along with the other counters and clarifies
    the intended use.
    
    This came up when Doug Bailey asked why he couldn't use dahdi_maint to clear
    timing slips in addition to the other counters.
    
    Signed-off-by: Shaun Ruffell <sruffell at digium.com>

diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c
index f4ce805..8121e44 100644
--- a/drivers/dahdi/dahdi-base.c
+++ b/drivers/dahdi/dahdi-base.c
@@ -932,8 +932,8 @@ static int dahdi_seq_show(struct seq_file *sfile, void *v)
 		seq_printf(sfile, "\tFAS error count: %d\n", s->count.fas);
 	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);
+	if (s->count.timingslips)
+		seq_printf(sfile, "\tTiming slips: %d\n", s->count.timingslips);
 	seq_printf(sfile, "\n");
 
 	for (x = 0; x < s->channels; x++) {
diff --git a/drivers/dahdi/wct4xxp/base.c b/drivers/dahdi/wct4xxp/base.c
index be172d2..89bb5ce 100644
--- a/drivers/dahdi/wct4xxp/base.c
+++ b/drivers/dahdi/wct4xxp/base.c
@@ -3682,7 +3682,7 @@ static inline void t4_framer_interrupt(struct t4 *wc, int span)
 	}
 	if (!ts->span.alarms) {
 		if ((isr3 & 0x3) || (isr4 & 0xc0))
-			ts->span.timingslips++;
+			ts->span.count.timingslips++;
 
 		if (debug & DEBUG_MAIN) {
 			if (isr3 & 0x02)
@@ -3703,7 +3703,7 @@ static inline void t4_framer_interrupt(struct t4 *wc, int span)
 					wc->numspans, span + 1);
 		}
 	} else
-		ts->span.timingslips = 0;
+		ts->span.count.timingslips = 0;
 
 	spin_lock_irqsave(&wc->reglock, flags);
 	/* HDLC controller checks - receive side */
diff --git a/include/dahdi/kernel.h b/include/dahdi/kernel.h
index 06f9e4a..c0fe08e 100644
--- a/include/dahdi/kernel.h
+++ b/include/dahdi/kernel.h
@@ -750,6 +750,7 @@ struct dahdi_count {
 	__u32 be;		/*!< current bit error count */
 	__u32 prbs;		/*!< current PRBS detected pattern */
 	__u32 errsec;		/*!< errored seconds */
+	__u32 timingslips;	/*!< Clock slips */
 };
 
 /* map flagbits to flag masks */
@@ -955,8 +956,6 @@ struct dahdi_span {
 	int maintstat;			/*!< Maintenance state */
 	int mainttimer;			/*!< Maintenance timer */
 
-	int timingslips;		/*!< Clock slips */
-
 	struct dahdi_chan **chans;	/*!< Member channel structures */
 
 	const struct dahdi_span_ops *ops;	/*!< span callbacks. */

-----------------------------------------------------------------------


-- 
dahdi/linux.git



More information about the dahdi-commits mailing list