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

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Tue Feb 7 03:02:22 CST 2017


branch "master" has been updated
       via  18de17084dff912d6ccd2476779cb8935e7a59b0 (commit)
       via  ffdfdfb66b8b6b8ea7f2272144f8d7e04621db36 (commit)
      from  4b242c3f841613b19b698b2e3e575af186ff55e1 (commit)

Summary of changes:
 drivers/dahdi/wcfxo.c       |    1 +
 drivers/dahdi/wctdm.c       |    1 +
 drivers/dahdi/xpp/xpp_usb.c |    2 ++
 3 files changed, 4 insertions(+)


- Log -----------------------------------------------------------------
commit 18de17084dff912d6ccd2476779cb8935e7a59b0
Author: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
Date:   Wed Sep 21 11:51:45 2016 +0300

    wcfxo, wctdm: set spantype
    
    * wctdm: set to SPANTYPE_ANALOG_MIXED. Maybe it could be improved if all
      slots have modules of the same type.
    * wcfxo: type FXO.
    
    Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>

diff --git a/drivers/dahdi/wcfxo.c b/drivers/dahdi/wcfxo.c
index b79d2fe..bf1d467 100644
--- a/drivers/dahdi/wcfxo.c
+++ b/drivers/dahdi/wcfxo.c
@@ -685,6 +685,7 @@ static int wcfxo_initialize(struct wcfxo *wc)
 
 	wc->chan->pvt = wc;
 	wc->span.ops = &wcfxo_span_ops;
+	wc->span.spantype = SPANTYPE_ANALOG_FXO;
 	list_add_tail(&wc->span.device_node, &wc->ddev->spans);
 	if (dahdi_register_device(wc->ddev, &wc->dev->dev)) {
 		printk(KERN_NOTICE "Unable to register span with DAHDI\n");
diff --git a/drivers/dahdi/wctdm.c b/drivers/dahdi/wctdm.c
index 9f43e52..cf5a537 100644
--- a/drivers/dahdi/wctdm.c
+++ b/drivers/dahdi/wctdm.c
@@ -2411,6 +2411,7 @@ static int wctdm_initialize(struct wctdm *wc)
 	wc->span.channels = NUM_CARDS;
 	wc->span.flags = DAHDI_FLAG_RBS;
 	wc->span.ops = &wctdm_span_ops;
+	wc->span.spantype = SPANTYPE_ANALOG_MIXED;
 
 	list_add_tail(&wc->span.device_node, &wc->ddev->spans);
 	if (dahdi_register_device(wc->ddev, &wc->dev->dev)) {

commit ffdfdfb66b8b6b8ea7f2272144f8d7e04621db36
Author: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
Date:   Wed Jan 13 12:19:04 2016 +0200

    xpp_usb: Fix potential corruption on clock rewind
    
    The xpp modules use time differences for various statistics. In one case
    xpp_usb creates a histogram of the time it took the system to send USB
    packets (URBs). The time difference is used (after adjustments) as an
    index to that array.
    
    However if the clock happens to go back at that exact point in time, we
    get to write to an arbitrary negative index in this array.
    
    Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>

diff --git a/drivers/dahdi/xpp/xpp_usb.c b/drivers/dahdi/xpp/xpp_usb.c
index a106211..b0a9903 100644
--- a/drivers/dahdi/xpp/xpp_usb.c
+++ b/drivers/dahdi/xpp/xpp_usb.c
@@ -890,6 +890,8 @@ static void xpp_send_callback(USB_PASS_CB(urb))
 	do_gettimeofday(&now);
 	xusb->last_tx = xframe->tv_submitted;
 	usec = usec_diff(&now, &xframe->tv_submitted);
+	if (usec < 0)
+		usec = 0; /* System clock jumped */
 	if (usec > xusb->max_tx_delay)
 		xusb->max_tx_delay = usec;
 	i = usec / USEC_BUCKET;

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


-- 
dahdi/linux.git



More information about the dahdi-commits mailing list