[Home]

Summary:DAHLIN-00211: [patch] Add debug flag for logging received RBS bit changes.
Reporter:Shaun Ruffell (sruffell)Labels:
Date Opened:2010-09-21 12:03:55Date Closed:2010-11-18 11:30:18.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:wct4xxp
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 0001-wct4xxp-Add-debug-option-to-log-detected-RBS-bit-cha.patch
( 1) 0002-wct4xxp-Drop-usage-of-volatile-qualifier.patch
Description:Creating an issue to hold a patch.  Normally you can see the current RBS state in dahdi_tool, but a user might want the changes logged into the kernel log for debugging.

I have not tested this...just throwing this out there.
Comments:By: Shaun Ruffell (sruffell) 2010-09-21 12:11:08

Just a note...the patch is a git patch (so it has the commit message in it). Use

Use patch -p1 instead of patch -p0 if you're trying to apply it.

By: Jeff LaCoursiere (lacoursj) 2010-09-22 08:44:14

Hi, I patched base.c and recompiled.  Got these warnings... should I be concerned?  I'm a bit hesitant to just throw it in - production system.  Let me know if you think it is ok and I will try it:

root@vigw3:/usr/src/dahdi-linux-complete-2.3.0.1+2.3.0/linux# make
make -C drivers/dahdi/firmware firmware-loaders
make[1]: Entering directory `/usr/src/dahdi-linux-complete-2.3.0.1+2.3.0/linux/drivers/dahdi/firmware'
make[1]: Leaving directory `/usr/src/dahdi-linux-complete-2.3.0.1+2.3.0/linux/drivers/dahdi/firmware'
make -C /lib/modules/2.6.24-26-openvz/build SUBDIRS=/usr/src/dahdi-linux-complete-2.3.0.1+2.3.0/linux/drivers/dahdi DAHDI_INCLUDE=/usr/src/dahdi-linux-complete-2.3.0.1+2.3.0/linux/include DAHDI_MODULES_EXTRA=" " HOTPLUG_FIRMWARE=yes modules DAHDI_BUILD_ALL=m
make[1]: Entering directory `/usr/src/linux-headers-2.6.24-26-openvz'
 CC [M]  /usr/src/dahdi-linux-complete-2.3.0.1+2.3.0/linux/drivers/dahdi/wct4xxp/base.o
/usr/src/dahdi-linux-complete-2.3.0.1+2.3.0/linux/drivers/dahdi/wct4xxp/base.c: In function ‘t4_allocate_buffers’:
/usr/src/dahdi-linux-complete-2.3.0.1+2.3.0/linux/drivers/dahdi/wct4xxp/base.c:3369: warning: passing argument 1 of ‘__constant_c_and_count_memset’ discards qualifiers from pointer target type
/usr/src/dahdi-linux-complete-2.3.0.1+2.3.0/linux/drivers/dahdi/wct4xxp/base.c:3369: warning: passing argument 1 of ‘__constant_c_memset’ discards qualifiers from pointer target type
/usr/src/dahdi-linux-complete-2.3.0.1+2.3.0/linux/drivers/dahdi/wct4xxp/base.c:3370: warning: passing argument 1 of ‘__constant_c_and_count_memset’ discards qualifiers from pointer target type
/usr/src/dahdi-linux-complete-2.3.0.1+2.3.0/linux/drivers/dahdi/wct4xxp/base.c:3370: warning: passing argument 1 of ‘__constant_c_memset’ discards qualifiers from pointer target type
/usr/src/dahdi-linux-complete-2.3.0.1+2.3.0/linux/drivers/dahdi/wct4xxp/base.c: In function ‘t4_increase_latency’:
/usr/src/dahdi-linux-complete-2.3.0.1+2.3.0/linux/drivers/dahdi/wct4xxp/base.c:3416: warning: passing argument 3 of ‘pci_free_consistent’ discards qualifiers from pointer target type
/usr/src/dahdi-linux-complete-2.3.0.1+2.3.0/linux/drivers/dahdi/wct4xxp/base.c: In function ‘t4_remove_one’:
/usr/src/dahdi-linux-complete-2.3.0.1+2.3.0/linux/drivers/dahdi/wct4xxp/base.c:4441: warning: passing argument 3 of ‘pci_free_consistent’ discards qualifiers from pointer target type
 LD [M]  /usr/src/dahdi-linux-complete-2.3.0.1+2.3.0/linux/drivers/dahdi/wct4xxp/wct4xxp.o

 Building modules, stage 2.
 MODPOST 30 modules
WARNING: could not find /usr/src/dahdi-linux-complete-2.3.0.1+2.3.0/linux/drivers/dahdi/vpmadt032_loader/.vpmadt032_x86_32.o.cmd for /usr/src/dahdi-linux-complete-2.3.0.1+2.3.0/linux/drivers/dahdi/vpmadt032_loader/vpmadt032_x86_32.o
 CC      /usr/src/dahdi-linux-complete-2.3.0.1+2.3.0/linux/drivers/dahdi/wct4xxp/wct4xxp.mod.o
 LD [M]  /usr/src/dahdi-linux-complete-2.3.0.1+2.3.0/linux/drivers/dahdi/wct4xxp/wct4xxp.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-26-openvz'
root@vigw3:/usr/src/dahdi-linux-complete-2.3.0.1+2.3.0/linux#

By: Shaun Ruffell (sruffell) 2010-09-22 11:31:14

Those warnings are not anywhere near where the patch was.  Most likely you get those when compiling a fresh 2.3.0.1 checkout?

However, it appears to be related to the way the compiler version you're using is casting away the "volatile" qualifier.

If you don't have a test machine, perhaps I can try to test that patch out here locally in the next few days.

By: Shaun Ruffell (sruffell) 2010-09-22 13:39:28

I've tested out the 0001 and 0002 patch and verified the operation.  I'm curious if the 0002 patch clears out the warnings for you on your compiler.

By: Digium Subversion (svnbot) 2010-09-23 16:38:38

Repository: dahdi
Revision: 9399

U   linux/trunk/drivers/dahdi/wct4xxp/base.c

------------------------------------------------------------------------
r9399 | sruffell | 2010-09-23 16:38:38 -0500 (Thu, 23 Sep 2010) | 9 lines

wct4xxp: Add debug option to log detected RBS bit changes.

Normally you can see RBS bit states in dahdi_tool, but you might also
want them logged to dmesg for troubleshooting.

(issue DAHLIN-211)

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>
------------------------------------------------------------------------

http://svn.digium.com/view/dahdi?view=rev&revision=9399

By: Shaun Ruffell (sruffell) 2010-10-15 15:55:20

Kicking this over to Russ since he is looking at potentially making it general and not wct4xxp specific.

By: Digium Subversion (svnbot) 2010-11-18 11:15:09.000-0600

Repository: dahdi
Revision: 9487

U   linux/trunk/drivers/dahdi/dahdi-base.c

------------------------------------------------------------------------
r9487 | rmeyerriecks | 2010-11-18 11:15:08 -0600 (Thu, 18 Nov 2010) | 10 lines

dahdi-base: Add debug option to log RBS bit changes

Logs the RBS bits to dmesg, for troubleshooting, for all drivers that call
dahdi_rbsbits(). Added the DEBUG_RBS bit in the debug module parameter
bitfield.

(issue DAHLIN-211)

Acked-by: Shaun Ruffell <sruffell@digium.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
------------------------------------------------------------------------

http://svn.digium.com/view/dahdi?view=rev&revision=9487