[svn-commits] kpfleming: linux/trunk r4385 - in /linux/trunk/drivers/dahdi: ./ firmware/ wc...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Jun 17 17:48:27 CDT 2008


Author: kpfleming
Date: Tue Jun 17 17:48:27 2008
New Revision: 4385

URL: http://svn.digium.com/view/dahdi?view=rev&rev=4385
Log:
another batch of fixes for non-hotplug firmware handling

Modified:
    linux/trunk/drivers/dahdi/Kbuild
    linux/trunk/drivers/dahdi/firmware/Makefile
    linux/trunk/drivers/dahdi/wctdm24xxp/base.c

Modified: linux/trunk/drivers/dahdi/Kbuild
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/Kbuild?view=diff&rev=4385&r1=4384&r2=4385
==============================================================================
--- linux/trunk/drivers/dahdi/Kbuild (original)
+++ linux/trunk/drivers/dahdi/Kbuild Tue Jun 17 17:48:27 2008
@@ -30,8 +30,10 @@
 ifndef HOTPLUG_FIRMWARE
 ifneq (,$(filter y m,$(CONFIG_FW_LOADER)))
 HOTPLUG_FIRMWARE := yes
+else
+HOTPLUG_FIRMWARE := no
+endif
 export HOTPLUG_FIRMWARE
-endif
 endif
 
 # fix typo present in CentOS and RHEL 2.6.9 kernels

Modified: linux/trunk/drivers/dahdi/firmware/Makefile
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/firmware/Makefile?view=diff&rev=4385&r1=4384&r2=4385
==============================================================================
--- linux/trunk/drivers/dahdi/firmware/Makefile (original)
+++ linux/trunk/drivers/dahdi/firmware/Makefile Tue Jun 17 17:48:27 2008
@@ -42,57 +42,16 @@
 OBJECT_FILES:=$(OBJECT_FILES:FIRMWARE-TC400M=dahdi-fw-tc400m.o)
 OBJECT_FILES:=$(OBJECT_FILES:FIRMWARE-VPMADT032=dahdi-fw-vpmadt032.o)
 
+# Force usage of wget, for now
+DOWNLOAD=wget
+WGET=wget
+
 # If "fetch" is used, --continue is not a valid option.
 ifeq ($(WGET),wget)
 WGET_ARGS:=--continue
 endif
 
 all: $(FIRMWARE)
-
-have_download:
-	@if test "$(DOWNLOAD)" = ":" ; then \
-		echo "**************************************************"; \
-		echo "***                                            ***"; \
-		echo "*** You must have either wget or fetch to be   ***"; \
-		echo "*** able to automatically download and install ***"; \
-		echo "*** the requested firmware packages.           ***"; \
-		echo "***                                            ***"; \
-		echo "**************************************************"; \
-		exit 1; \
-	fi
-
-# Download and extract firmware tarballs
-dahdi-fw-oct6114-064-%.tar.gz: have_download
-ifeq ($(shell if ( [ "$(HOTPLUG_FIRMWARE)" = "no" ] ) || ( [ -d $(DESTDIR)/usr/lib/hotplug/firmware ] && ! [ -f $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-oct6114-064-$(OCT6114_064_VERSION) ] ) || ( [ -d $(DESTDIR)/lib/firmware ] && ! [ -f $(DESTDIR)/lib/firmware/.dahdi-fw-oct6114-064-$(OCT6114_064_VERSION) ] ); then echo "yes"; else echo "no"; fi),yes)
-	@echo "Attempting to download $@"
-	@if test ! -f $@; then $(DOWNLOAD) $(WGET_ARGS) $(FIRMWARE_URL)/$@; fi;
-	@if test ! -f $@; then exit 1; fi; \
-	(cat $@ | gzip -d | tar -xf -)
-endif
-
-dahdi-fw-oct6114-128-%.tar.gz: have_download
-ifeq ($(shell if ( [ "$(HOTPLUG_FIRMWARE)" = "no" ] ) || ( [ -d $(DESTDIR)/usr/lib/hotplug/firmware ] && ! [ -f $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-oct6114-128-$(OCT6114_128_VERSION) ] ) || ( [ -d $(DESTDIR)/lib/firmware ] && ! [ -f $(DESTDIR)/lib/firmware/.dahdi-fw-oct6114-128-$(OCT6114_128_VERSION) ] ); then echo "yes"; else echo "no"; fi),yes)
-	@echo "Attempting to download $@"
-	@if test ! -f $@; then $(DOWNLOAD) $(WGET_ARGS) $(FIRMWARE_URL)/$@; fi;
-	@if test ! -f $@; then exit 1; fi; \
-	(cat $@ | gzip -d | tar -xf -)
-endif
-
-dahdi-fw-tc400m-%.tar.gz: have_download
-ifeq ($(shell if ( [ "$(HOTPLUG_FIRMWARE)" = "no" ] ) || ( [ -d $(DESTDIR)/usr/lib/hotplug/firmware ] && ! [ -f $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-tc400m-$(TC400M_VERSION) ] ) || ( [ -d $(DESTDIR)/lib/firmware ] && ! [ -f $(DESTDIR)/lib/firmware/.dahdi-fw-tc400m-$(TC400M_VERSION) ] ); then echo "yes"; else echo "no"; fi),yes)
-	@echo "Attempting to download $@"
-	@if test ! -f $@; then $(DOWNLOAD) $(WGET_ARGS) $(FIRMWARE_URL)/$@; fi;
-	@if test ! -f $@; then exit 1; fi; \
-	(cat $@ | gzip -d | tar -xf -)
-endif
-
-dahdi-fw-vpmadt032-%.tar.gz: have_download
-ifeq ($(shell if ( [ "$(HOTPLUG_FIRMWARE)" = "no" ] ) || ( [ -d $(DESTDIR)/usr/lib/hotplug/firmware ] && ! [ -f $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-vpmadt032-$(VPMADT032_VERSION) ] ) || ( [ -d $(DESTDIR)/lib/firmware ] && ! [ -f $(DESTDIR)/lib/firmware/.dahdi-fw-vpmadt032-$(VPMADT032_VERSION) ] ); then echo "yes"; else echo "no"; fi),yes)
-	@echo "Attempting to download $@"
-	@if test ! -f $@; then $(DOWNLOAD) $(WGET_ARGS) $(FIRMWARE_URL)/$@; fi;
-	@if test ! -f $@; then exit 1; fi; \
-	(cat $@ | gzip -d | tar -xf -)
-endif
 
 # Clean up any downloaded/extracted firmware packages
 dist-clean: clean
@@ -104,10 +63,19 @@
 clean:
 	rm -f dahdi-fw-*.o
 
+# Download and extract firmware tarballs
+dahdi-fw-oct6114-064-%.tar.gz dahdi-fw-oct6114-128-%.tar.gz dahdi-fw-tc400m-%.tar.gz dahdi-fw-vpmadt032-%.tar.gz:
+ifeq ($(shell if ( [ "$(HOTPLUG_FIRMWARE)" = "no" ] ) || ( [ -d $(DESTDIR)/usr/lib/hotplug/firmware ] && ! [ -f $(DESTDIR)/usr/lib/hotplug/firmware/.$(subst .tar.gz,,$*) ] ) || ( [ -d $(DESTDIR)/lib/firmware ] && ! [ -f $(DESTDIR)/lib/firmware/.$(subst .tar.gz,,$*) ] ); then echo "yes"; else echo "no"; fi),yes)
+	@echo "Attempting to download $@"
+	@if test ! -f $@; then $(DOWNLOAD) $(WGET_ARGS) $(FIRMWARE_URL)/$@; fi;
+	@if test ! -f $@; then exit 1; fi; \
+	(cat $@ | gzip -d | tar -xf -)
+endif
+
 # Create object files suitable for linking against
 object-build: $(FIRMWARE) $(OBJECT_FILES)
 
-# Install all downloaded firmware images for hotplug usage and build headers for inclusion
+# Install all downloaded firmware images for hotplug usage
 hotplug-install: $(FIRMWARE)
 ifeq ($(HOTPLUG_FIRMWARE),yes)
 ifeq ($(shell if ( [ -d $(DESTDIR)/usr/lib/hotplug/firmware ] && ! [ -f $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-oct6114-064-$(OCT6114_064_VERSION) ] ) || ( [ -d $(DESTDIR)/lib/firmware ] && ! [ -f $(DESTDIR)/lib/firmware/.dahdi-fw-oct6114-064-$(OCT6114_064_VERSION) ] ); then echo "yes"; else echo "no"; fi),yes)

Modified: linux/trunk/drivers/dahdi/wctdm24xxp/base.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/wctdm24xxp/base.c?view=diff&rev=4385&r1=4384&r2=4385
==============================================================================
--- linux/trunk/drivers/dahdi/wctdm24xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wctdm24xxp/base.c Tue Jun 17 17:48:27 2008
@@ -3287,7 +3287,6 @@
 	struct vpm150m *vpm150m;
 	unsigned short reg;
 	unsigned long flags;
-	struct pci_dev* pdev = voicebus_get_pci_dev(wc->vb);
 	enum vpmadt032_init_result res = VPMADT032_FAILED;
 
 #ifdef VPM150M_SUPPORT
@@ -3299,6 +3298,7 @@
 	extern u8 _binary_dahdi_fw_vpmadt032_bin_start[];
 #else
 	static const char vpmadt032_firmware[] = "dahdi-fw-vpmadt032.bin";
+	struct pci_dev *pdev = voicebus_get_pci_dev(wc->vb);
 #endif
 	gpakDownloadStatus_t downloadstatus;
 	gpakPingDspStat_t pingstatus;




More information about the svn-commits mailing list