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

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Mon Nov 25 08:01:41 CST 2019


branch "next" has been updated
       via  c98f59eead28cf66b271b031288542e34e603c43 (commit)
       via  ac300cd895160c8d292e1079d6bf95af5ab23874 (commit)
       via  6e5197fed4f3e56a45f7cf5085d2bac814269807 (commit)
       via  45ac6a30f922f4eef54c0120c2a537794b20cf5c (commit)
      from  d07c4545ec48fac51ecd5309568504a59f4ada39 (commit)

Summary of changes:
 Makefile                          |    2 +-
 drivers/dahdi/dahdi-base.c        |    6 +++---
 drivers/dahdi/datamods/Makefile   |    2 +-
 drivers/dahdi/voicebus/voicebus.h |    6 +++++-
 drivers/dahdi/wcaxx-base.c        |   14 ++++++++++++--
 drivers/dahdi/wct4xxp/base.c      |    6 ++++++
 drivers/dahdi/wctdm24xxp/base.c   |    7 +++++--
 drivers/dahdi/wcte13xp-base.c     |    3 ++-
 include/dahdi/kernel.h            |    4 ----
 9 files changed, 35 insertions(+), 15 deletions(-)


- Log -----------------------------------------------------------------
commit c98f59eead28cf66b271b031288542e34e603c43
Author: Shaun Ruffell <sruffell at sruffell.net>
Date:   Wed Nov 20 22:53:18 2019 -0600

    Makefile: 'M=' is preferred to 'KBUILD_EXTMOD=' for external modules.
    
    I should have used 'M=' in (e93c53ce05c4824a5e "Makefile: SUBDIRS ->
    KBUILD_EXTMOD") originally.
    
    See:
    https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/kbuild/modules.rst?h=v5.3#n77
    Signed-off-by: Shaun Ruffell <sruffell at sruffell.net>

diff --git a/Makefile b/Makefile
index 75f6779..066408c 100644
--- a/Makefile
+++ b/Makefile
@@ -53,7 +53,7 @@ INST_HEADERS:=kernel.h user.h fasthdlc.h wctdm_user.h dahdi_config.h
 
 DAHDI_BUILD_ALL:=m
 
-KMAKE=+$(MAKE) -C $(KSRC) KBUILD_EXTMOD=$(PWD)/drivers/dahdi DAHDI_INCLUDE=$(PWD)/include DAHDI_MODULES_EXTRA="$(DAHDI_MODULES_EXTRA)" HOTPLUG_FIRMWARE=$(HOTPLUG_FIRMWARE)
+KMAKE=+$(MAKE) -C $(KSRC) M=$(PWD)/drivers/dahdi DAHDI_INCLUDE=$(PWD)/include DAHDI_MODULES_EXTRA="$(DAHDI_MODULES_EXTRA)" HOTPLUG_FIRMWARE=$(HOTPLUG_FIRMWARE)
 
 ROOT_PREFIX:=
 
diff --git a/drivers/dahdi/datamods/Makefile b/drivers/dahdi/datamods/Makefile
index 5d63668..c4679bd 100644
--- a/drivers/dahdi/datamods/Makefile
+++ b/drivers/dahdi/datamods/Makefile
@@ -8,7 +8,7 @@ PWD=$(shell pwd)
 
 MODULESO:=$(MODULES:%=%.o)
 MODULESKO:=$(MODULES:%=%.ko)
-KMAKE = $(MAKE) -C $(KSRC) KBUILD_EXTMOD=$(PWD)
+KMAKE = $(MAKE) -C $(KSRC) M=$(PWD)
 KMAKE_INST = $(KMAKE) \
   INSTALL_MOD_PATH=$(INSTALL_PREFIX) INSTALL_MOD_DIR=misc modules_install
 

commit ac300cd895160c8d292e1079d6bf95af5ab23874
Author: Shaun Ruffell <sruffell at sruffell.net>
Date:   Tue Sep 24 20:18:31 2019 -0500

    wcte13xp: Fix unintended fall through in t13x_set_linemode for J1
    
    Found by GCC with -Wimplicit-fallthrough.
    
    Also fix the log message to report that the mode was switched to J1 mode.
    
    Signed-off-by: Shaun Ruffell <sruffell at sruffell.net>

diff --git a/drivers/dahdi/wcte13xp-base.c b/drivers/dahdi/wcte13xp-base.c
index b5f8043..9adc4d4 100644
--- a/drivers/dahdi/wcte13xp-base.c
+++ b/drivers/dahdi/wcte13xp-base.c
@@ -1872,9 +1872,10 @@ static int t13x_set_linemode(struct dahdi_span *span, enum spantypes linemode)
 		break;
 	case SPANTYPE_DIGITAL_J1:
 		dev_info(&wc->xb.pdev->dev,
-			 "Changing from %s to E1 line mode.\n",
+			 "Changing from %s to J1 line mode.\n",
 			 dahdi_spantype2str(wc->span.spantype));
 		res = t13x_software_init(wc, J1);
+		break;
 	default:
 		dev_err(&wc->xb.pdev->dev,
 			"Got invalid linemode '%s' from dahdi\n",

commit 6e5197fed4f3e56a45f7cf5085d2bac814269807
Author: Shaun Ruffell <sruffell at sruffell.net>
Date:   Tue Sep 24 20:12:36 2019 -0500

    Annotate switch-case fall through
    
    Quiets warnings like:
      drivers/dahdi/dahdi-base.c:8494:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
         if (chan->txstate != DAHDI_TXSTATE_OFFHOOK) break;
            ^
    
    Needed since Linux 5.4 commit (a035d552a93bb9ef60487, "Makefile: Globally enable
    fall-33bb9f2a0dc857ff869through warning") [1]
    
    [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a035d552a93bb9ef6048733bb9f2a0dc857
    
    Signed-off-by: Shaun Ruffell <sruffell at sruffell.net>

diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c
index bcd6147..d05eff9 100644
--- a/drivers/dahdi/dahdi-base.c
+++ b/drivers/dahdi/dahdi-base.c
@@ -7943,7 +7943,7 @@ static inline void __dahdi_process_getaudio_chunk(struct dahdi_chan *ss, unsigne
 			memset(getlin, 0, DAHDI_CHUNKSIZE * sizeof(short));
 			txb[0] = DAHDI_LIN2X(0, ms);
 			memset(txb + 1, txb[0], DAHDI_CHUNKSIZE - 1);
-			/* fall through to normal conf mode */
+			/* fallthrough */
 		case DAHDI_CONF_CONF:	/* Normal conference mode */
 			if (is_pseudo_chan(ms)) /* if pseudo-channel */
 			   {
@@ -8506,7 +8506,7 @@ static void __dahdi_hooksig_pvt(struct dahdi_chan *chan, enum dahdi_rxsig rxsig)
 			break;
 		}
 #endif
-		/* fall through intentionally */
+		/* fallthrough */
 	   case DAHDI_SIG_FXSGS:  /* FXS Groundstart */
 		if (rxsig == DAHDI_RXSIG_ONHOOK) {
 			chan->ringdebtimer = RING_DEBOUNCE_TIME;
@@ -8525,7 +8525,7 @@ static void __dahdi_hooksig_pvt(struct dahdi_chan *chan, enum dahdi_rxsig rxsig)
 				chan->gotgs = 1;
 			}
 		}
-		/* fall through intentionally */
+		/* fallthrough */
 	   case DAHDI_SIG_FXOLS: /* FXO Loopstart */
 	   case DAHDI_SIG_FXOKS: /* FXO Kewlstart */
 		switch(rxsig) {
diff --git a/drivers/dahdi/wcaxx-base.c b/drivers/dahdi/wcaxx-base.c
index 8903e5d..04b23a9 100644
--- a/drivers/dahdi/wcaxx-base.c
+++ b/drivers/dahdi/wcaxx-base.c
@@ -1452,11 +1452,13 @@ wcaxx_check_battery_lost(struct wcaxx *wc, struct wcaxx_module *const mod)
 		break;
 	case BATTERY_UNKNOWN:
 		mod_hooksig(wc, mod, DAHDI_RXSIG_ONHOOK);
+		/* fallthrough */
 	case BATTERY_PRESENT:
 		fxo->battery_state = BATTERY_DEBOUNCING_LOST;
 		fxo->battdebounce_timer = wc->framecount + battdebounce;
 		break;
 	case BATTERY_DEBOUNCING_LOST_FROM_PRESENT_ALARM:
+		/* fallthrough */
 	case BATTERY_DEBOUNCING_LOST: /* Intentional drop through */
 		if (time_after(wc->framecount, fxo->battdebounce_timer)) {
 			if (debug) {
@@ -1507,7 +1509,8 @@ wcaxx_check_battery_present(struct wcaxx *wc, struct wcaxx_module *const mod)
 
 	switch (fxo->battery_state) {
 	case BATTERY_DEBOUNCING_PRESENT_FROM_LOST_ALARM:
-	case BATTERY_DEBOUNCING_PRESENT: /* intentional drop through */
+		/* fallthrough */
+	case BATTERY_DEBOUNCING_PRESENT: 
 		if (time_after(wc->framecount, fxo->battdebounce_timer)) {
 			if (debug) {
 				dev_info(&wc->xb.pdev->dev,
@@ -1560,7 +1563,8 @@ wcaxx_check_battery_present(struct wcaxx *wc, struct wcaxx_module *const mod)
 		break;
 	case BATTERY_UNKNOWN:
 		mod_hooksig(wc, mod, DAHDI_RXSIG_OFFHOOK);
-	case BATTERY_LOST: /* intentional drop through */
+		/* fallthrough */
+	case BATTERY_LOST:
 		fxo->battery_state = BATTERY_DEBOUNCING_PRESENT;
 		fxo->battdebounce_timer = wc->framecount + battdebounce;
 		break;
diff --git a/drivers/dahdi/wctdm24xxp/base.c b/drivers/dahdi/wctdm24xxp/base.c
index 16bf384..f106a19 100644
--- a/drivers/dahdi/wctdm24xxp/base.c
+++ b/drivers/dahdi/wctdm24xxp/base.c
@@ -1955,12 +1955,14 @@ wctdm_check_battery_lost(struct wctdm *wc, struct wctdm_module *const mod)
 		break;
 	case BATTERY_UNKNOWN:
 		mod_hooksig(wc, mod, DAHDI_RXSIG_ONHOOK);
+		/* fallthrough */
 	case BATTERY_PRESENT:
 		fxo->battery_state = BATTERY_DEBOUNCING_LOST;
 		fxo->battdebounce_timer = wc->framecount + battdebounce;
 		break;
 	case BATTERY_DEBOUNCING_LOST_FROM_PRESENT_ALARM:
-	case BATTERY_DEBOUNCING_LOST: /* Intentional drop through */
+		/* fallthrough */
+	case BATTERY_DEBOUNCING_LOST:
 		if (time_after(wc->framecount, fxo->battdebounce_timer)) {
 			if (debug) {
 				dev_info(&wc->vb.pdev->dev,
@@ -2063,7 +2065,8 @@ wctdm_check_battery_present(struct wctdm *wc, struct wctdm_module *const mod)
 		break;
 	case BATTERY_UNKNOWN:
 		mod_hooksig(wc, mod, DAHDI_RXSIG_OFFHOOK);
-	case BATTERY_LOST: /* intentional drop through */
+		/* fallthrough */
+	case BATTERY_LOST:
 		fxo->battery_state = BATTERY_DEBOUNCING_PRESENT;
 		fxo->battdebounce_timer = wc->framecount + battdebounce;
 		break;

commit 45ac6a30f922f4eef54c0120c2a537794b20cf5c
Author: Shaun Ruffell <sruffell at sruffell.net>
Date:   Tue Sep 24 19:51:22 2019 -0500

    voicebus, wcaxx, wct4xxp: Remove include of pci-aspm.h
    
    Linux 5.4, in commit  (7ce2e76a0420801fb4b53b9e685094 "PCI: Move ASPM
    declarations to linux/pci.h") [1], removed pci-aspm.h.
    
    This commit removes the global include of pci-aspm.h in include/dahdi/kernel.h
    (because it only pertains to certain drivers), and moves the conditional include
    into only the drivers that need it.
    
    [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7ce2e76a0420801fb4b53b9e685094
    
    Signed-off-by: Shaun Ruffell <sruffell at sruffell.net>

diff --git a/drivers/dahdi/voicebus/voicebus.h b/drivers/dahdi/voicebus/voicebus.h
index faece9a..2eb1146 100644
--- a/drivers/dahdi/voicebus/voicebus.h
+++ b/drivers/dahdi/voicebus/voicebus.h
@@ -64,7 +64,11 @@
  * platform does not support it.
  *
  */
-#undef CONFIG_VOICEBUS_DISABLE_ASPM
+#ifdef CONFIG_VOICEBUS_DISABLE_ASPM
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0)
+#include <linux/pci-aspm.h>
+#endif
+#endif
 
 /* Define this to use a FIFO for the software echocan reference.
  * (experimental) */
diff --git a/drivers/dahdi/wcaxx-base.c b/drivers/dahdi/wcaxx-base.c
index b934960..8903e5d 100644
--- a/drivers/dahdi/wcaxx-base.c
+++ b/drivers/dahdi/wcaxx-base.c
@@ -67,6 +67,12 @@
 #include "wcxb_spi.h"
 #include "wcxb_flash.h"
 
+#ifdef CONFIG_VOICEBUS_DISABLE_ASPM
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0)
+#include <linux/pci-aspm.h>
+#endif
+#endif
+
 /*!
  * \brief Default ringer debounce (in ms)
  */
diff --git a/drivers/dahdi/wct4xxp/base.c b/drivers/dahdi/wct4xxp/base.c
index 7089ec1..ad35569 100644
--- a/drivers/dahdi/wct4xxp/base.c
+++ b/drivers/dahdi/wct4xxp/base.c
@@ -87,6 +87,12 @@
  */
 /* #define CONFIG_WCT4XXP_DISABLE_ASPM */
 
+#ifdef CONFIG_WCT4XXP_DISABLE_ASPM
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0)
+#include <linux/pci-aspm.h>
+#endif
+#endif
+
 #if defined(CONFIG_FORCE_EXTENDED_RESET) && defined(CONFIG_NOEXTENDED_RESET)
 #error "You cannot define both CONFIG_FORCE_EXTENDED_RESET and " \
 		"CONFIG_NOEXTENDED_RESET."
diff --git a/include/dahdi/kernel.h b/include/dahdi/kernel.h
index 22b9b66..cf629eb 100644
--- a/include/dahdi/kernel.h
+++ b/include/dahdi/kernel.h
@@ -58,10 +58,6 @@
 
 #include <linux/poll.h>
 
-#ifdef CONFIG_PCI
-#include <linux/pci-aspm.h>
-#endif
-
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
 #define HAVE_NET_DEVICE_OPS
 #endif

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


-- 
dahdi/linux.git



More information about the dahdi-commits mailing list