misc/183543: Recommend misc/dahdi, misc/dahdi-kmod, misc/dahdi-kmod26 USE_GCC=any

Dimitry Andric dim at FreeBSD.org
Fri Nov 1 21:50:03 UTC 2013


The following reply was made to PR misc/183543; it has been noted by GNATS.

From: Dimitry Andric <dim at FreeBSD.org>
To: bug-followup at FreeBSD.org,
 dcecchin at gmail.com
Cc:  
Subject: Re: misc/183543: Recommend misc/dahdi, misc/dahdi-kmod, misc/dahdi-kmod26 USE_GCC=any
Date: Fri, 1 Nov 2013 22:40:39 +0100

 --Apple-Mail=_3A5BCF7C-E093-476F-B7C3-D6F49514C1E1
 Content-Type: multipart/mixed;
 	boundary="Apple-Mail=_65EE7788-E643-4BAC-AEE3-00BC2146F5A4"
 
 
 --Apple-Mail=_65EE7788-E643-4BAC-AEE3-00BC2146F5A4
 Content-Transfer-Encoding: 7bit
 Content-Type: text/plain;
 	charset=us-ascii
 
 Here is a diff for the problems I could find in misc/dahdi-kmod.  This
 changes the following:
 
 - Adds a hunk to the patch-dahdi-iface diff, to disable use of D_PSEUDO
   on FreeBSD 10.x.  This define has been removed.
 - Adds a hunk to patch-flush_workqueue, which initializes a variable to
   silence a warning about it being possibly used uninitialized.
 - Adds several hunks to patch-ithread, to fix invalid format specifiers,
   and one other instance of using uninitialized variables.
 
 -Dimitry
 
 --Apple-Mail=_65EE7788-E643-4BAC-AEE3-00BC2146F5A4
 Content-Disposition: attachment;
 	filename=misc__dahdi-kmod-fix-pr183543-1.diff
 Content-Type: application/octet-stream;
 	name="misc__dahdi-kmod-fix-pr183543-1.diff"
 Content-Transfer-Encoding: 7bit
 
 Index: misc/dahdi-kmod/files/patch-dahdi-iface
 ===================================================================
 --- misc/dahdi-kmod/files/patch-dahdi-iface	(revision 332290)
 +++ misc/dahdi-kmod/files/patch-dahdi-iface	(working copy)
 @@ -929,6 +929,17 @@
   #endif
   #ifdef CONFIG_DAHDI_PPP
   				if (ms->flags & DAHDI_FLAG_PPP) {
 +@@ -9206,7 +9263,9 @@
 + 	.d_poll		= dahdi_device_poll,
 + 	.d_mmap		= dahdi_device_mmap,
 + 	.d_name		= "dahdi",
 +-#if __FreeBSD_version >= 800039
 ++#if __FreeBSD_version >= 1000001
 ++	.d_flags	= D_TRACKCLOSE | D_NEEDMINOR
 ++#elif __FreeBSD_version >= 800039
 + 	.d_flags	= D_PSEUDO | D_TRACKCLOSE | D_NEEDMINOR
 + #else
 + 	.d_flags	= D_PSEUDO | D_TRACKCLOSE
  @@ -9351,6 +9406,7 @@
   DAHDI_DEV_MODULE(dahdi);
   MODULE_VERSION(dahdi, 1);
 Index: misc/dahdi-kmod/files/patch-flush_workqueue
 ===================================================================
 --- misc/dahdi-kmod/files/patch-flush_workqueue	(revision 332290)
 +++ misc/dahdi-kmod/files/patch-flush_workqueue	(working copy)
 @@ -59,6 +59,15 @@
  ===================================================================
  --- freebsd/drivers/dahdi/wcte12xp/base.c	(revision 10598)
  +++ freebsd/drivers/dahdi/wcte12xp/base.c	(working copy)
 +@@ -1607,7 +1607,7 @@
 + 
 + static int t1_software_init(struct t1 *wc)
 + {
 +-	int x;
 ++	int x = 0;
 + 	int num;
 + 	struct pci_dev *pdev = wc->vb.pdev;
 + 
  @@ -2441,13 +2441,11 @@
   	clear_bit(INITIALIZED, &wc->bit_flags);
   
 Index: misc/dahdi-kmod/files/patch-ithread
 ===================================================================
 --- misc/dahdi-kmod/files/patch-ithread	(revision 332290)
 +++ misc/dahdi-kmod/files/patch-ithread	(working copy)
 @@ -15,6 +15,35 @@
  ===================================================================
  --- freebsd/drivers/dahdi/wctc4xxp/base.c	(revision 10453)
  +++ freebsd/drivers/dahdi/wctc4xxp/base.c	(working copy)
 +@@ -2456,8 +2456,8 @@
 + 
 + 	if (unlikely(count > SFRAME_SIZE - sizeof(struct rtp_packet))) {
 + 		DTE_DEBUG(DTE_DEBUG_GENERAL,
 +-		   "Cannot transcode packet of %Zu bytes. This exceeds the " \
 +-		   "maximum size of %Zu bytes.\n", count,
 ++		   "Cannot transcode packet of %zu bytes. This exceeds the " \
 ++		   "maximum size of %zu bytes.\n", count,
 + 		   SFRAME_SIZE - sizeof(struct rtp_packet));
 + 		return -EINVAL;
 + 	}
 +@@ -2466,7 +2466,7 @@
 + 		if ((G723_5K_BYTES != count) && (G723_6K_BYTES != count)) {
 + 			DTE_DEBUG(DTE_DEBUG_GENERAL,
 + 			   "Trying to transcode packet into G723 format " \
 +-			   "that is %Zu bytes instead of the expected " \
 ++			   "that is %zu bytes instead of the expected " \
 + 			   "%d/%d bytes.\n", count, G723_5K_BYTES,
 + 			   G723_6K_BYTES);
 + 			return -EINVAL;
 +@@ -2496,7 +2496,7 @@
 + 	cpvt->seqno += 1;
 + 
 + 	DTE_DEBUG(DTE_DEBUG_RTP_TX,
 +-	    "Sending packet of %Zu byte on channel (%p).\n", count, dtc);
 ++	    "Sending packet of %zu byte on channel (%p).\n", count, dtc);
 + 
 + 	atomic_inc(&cpvt->stats.packets_sent);
 + 	wctc4xxp_transmit_cmd(wc, cmd);
  @@ -2931,7 +2931,7 @@
   #if DEFERRED_PROCESSING == WORKQUEUE
   		schedule_work(&wc->deferred_work);
 @@ -24,3 +53,25 @@
   #elif DEFERRED_PROCESSING == INTERRUPT
   #error "You will need to change the locks if you want to run the processing " \
   		"in the interrupt handler."
 +@@ -3355,10 +3355,6 @@
 + 		complicated = temp;
 + 	}
 + 
 +-	DTE_DEBUG(DTE_DEBUG_CHANNEL_SETUP,
 +-	   "DTE is using the following channels encoder_channel: " \
 +-	   "%d decoder_channel: %d\n", encoder_channel, decoder_channel);
 +-
 + 	BUG_ON(encoder_timeslot/2 >= wc->numchannels);
 + 	BUG_ON(decoder_timeslot/2 >= wc->numchannels);
 + 	encoder_pvt = wc->uencode->channels[encoder_timeslot/2].pvt;
 +@@ -3377,6 +3373,10 @@
 + 		&decoder_channel))
 + 		goto error_exit;
 + 
 ++	DTE_DEBUG(DTE_DEBUG_CHANNEL_SETUP,
 ++	   "DTE is using the following channels encoder_channel: " \
 ++	   "%d decoder_channel: %d\n", encoder_channel, decoder_channel);
 ++
 + 	length = (DTE_FORMAT_G729A == complicated) ? G729_LENGTH :
 + 		(DTE_FORMAT_G723_1 == complicated) ? G723_LENGTH : 0;
 + 
 
 --Apple-Mail=_65EE7788-E643-4BAC-AEE3-00BC2146F5A4
 Content-Transfer-Encoding: 7bit
 Content-Type: text/plain;
 	charset=us-ascii
 
 
 
 --Apple-Mail=_65EE7788-E643-4BAC-AEE3-00BC2146F5A4--
 
 --Apple-Mail=_3A5BCF7C-E093-476F-B7C3-D6F49514C1E1
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
 	filename=signature.asc
 Content-Type: application/pgp-signature;
 	name=signature.asc
 Content-Description: Message signed with OpenPGP using GPGMail
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
 
 iEYEARECAAYFAlJ0H90ACgkQsF6jCi4glqNEVgCg+HjC03aSEnad7m9McfmNvgYs
 yV8AnRcbOlAgnh1TStOPsAgMoldodIls
 =xAnv
 -----END PGP SIGNATURE-----
 
 --Apple-Mail=_3A5BCF7C-E093-476F-B7C3-D6F49514C1E1--


More information about the freebsd-bugs mailing list