Compare commits
20 Commits
v2.5.0-rc1
...
v2.5.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a118a30248 | ||
|
|
aeed6a0268 | ||
|
|
9fd43e0139 | ||
|
|
1813c9ad09 | ||
|
|
00764f705c | ||
|
|
071cfdc983 | ||
|
|
abafafcdfe | ||
|
|
0fa8ec572b | ||
|
|
91da279443 | ||
|
|
64b150eb96 | ||
|
|
3adb075975 | ||
|
|
26116a08c5 | ||
|
|
b2f71aa2b8 | ||
|
|
47823b3a74 | ||
|
|
6c2233c894 | ||
|
|
0ab741b32d | ||
|
|
6308ee5f7a | ||
|
|
dd270a3fdc | ||
|
|
f7dadef95f | ||
|
|
643b60ffb0 |
14
README
14
README
@@ -380,6 +380,20 @@ A list of modules to remove when unloading. Will be resolved
|
||||
recursively. The default is 'dahdi'. You may also want to have 'oslec'
|
||||
or 'hpec' there if you use them.
|
||||
|
||||
===== KVERS
|
||||
If you want to build DAHDI for a different kernel version than the one
|
||||
currently running on the system (mostly useful for a remote install).
|
||||
Note that you will normally need to export this, in order for this to
|
||||
take effect on the 'make' command. In live/live.conf itself have the line:
|
||||
|
||||
export KVERS="2.6.39-local"
|
||||
|
||||
===== KSRC
|
||||
Alternatively, if you want to point to an exact kernel source tree,
|
||||
set it with KSRC. Just like KVERS above, it needs to be explicitly exported.
|
||||
|
||||
export KSRC="/usr/src/tree/linux"
|
||||
|
||||
|
||||
Module Parameters
|
||||
-----------------
|
||||
|
||||
@@ -193,7 +193,6 @@ unload_dynamic() {
|
||||
}
|
||||
|
||||
genconf() {
|
||||
mkdir -p "$DESTDIR/etc/asterisk"
|
||||
GENCONF_PARAMETERS=$DESTDIR/etc/dahdi/genconf_parameters \
|
||||
DAHDI_CONF_FILE=$DESTDIR/etc/dahdi/system.conf \
|
||||
DAHDI_MODS_FILE=$DESTDIR/etc/dahdi/modules \
|
||||
@@ -225,6 +224,7 @@ usage() {
|
||||
echo "$me xpp-firm (Reset and load xpp firmware)"
|
||||
echo "$me genconf dahdi_genconf; dahdi_cfg"
|
||||
echo "$me asterisk /etc/init.d/asterisk start"
|
||||
echo "$me symlink_ast symlink dahdi-channels.conf"
|
||||
echo "$me rsync TARGET (copy filea to /tmp/live in host TARGET)"
|
||||
echo "$me exec COMMAND (Run COMMAND in 'live' environment)"
|
||||
echo ""
|
||||
@@ -300,6 +300,9 @@ genconf)
|
||||
asterisk)
|
||||
run_asterisk
|
||||
;;
|
||||
symlink_ast)
|
||||
ln -sf "$DESTDIR/etc/asterisk/dahdi-channels.conf" /etc/asterisk/
|
||||
;;
|
||||
reload)
|
||||
$0 unload
|
||||
$0 load
|
||||
@@ -323,6 +326,7 @@ xpp-firm)
|
||||
"$FIRMWARE_DIR/xpp_fxloader" reset
|
||||
sleep 5
|
||||
XPP_FIRMWARE_DIR=$FIRMWARE_DIR \
|
||||
XPP_CONFIG="$DESTDIR/etc/dahdi/xpp.conf" \
|
||||
"$FIRMWARE_DIR/xpp_fxloader" load
|
||||
;;
|
||||
help|'')
|
||||
|
||||
@@ -3065,6 +3065,7 @@ static void dahdi_free_pseudo(struct dahdi_chan *chan)
|
||||
if (!chan)
|
||||
return;
|
||||
|
||||
mutex_lock(®istration_mutex);
|
||||
pseudo = chan_to_pseudo(chan);
|
||||
|
||||
spin_lock_irqsave(&chan_lock, flags);
|
||||
@@ -3073,6 +3074,7 @@ static void dahdi_free_pseudo(struct dahdi_chan *chan)
|
||||
spin_unlock_irqrestore(&chan_lock, flags);
|
||||
|
||||
dahdi_chan_unreg(chan);
|
||||
mutex_unlock(®istration_mutex);
|
||||
kfree(pseudo);
|
||||
}
|
||||
|
||||
@@ -4840,8 +4842,10 @@ static int dahdi_ioctl_shutdown(unsigned long data)
|
||||
*/
|
||||
static bool dahdi_is_hwec_available(const struct dahdi_chan *chan)
|
||||
{
|
||||
if (!hwec_factory.get_name(chan))
|
||||
if (!chan->span || !chan->span->ops->echocan_name ||
|
||||
!hwec_factory.get_name(chan))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -56,10 +56,10 @@ typedef struct _OCT6100_API_CHANNEL_TDM_
|
||||
UINT8 byRoutPcmLaw : 1;
|
||||
UINT8 bySoutPcmLaw : 1;
|
||||
|
||||
UINT8 byRinNumTssts : 1;
|
||||
UINT8 bySinNumTssts : 1;
|
||||
UINT8 byRoutNumTssts : 1;
|
||||
UINT8 bySoutNumTssts : 1;
|
||||
UINT8 byRinNumTssts : 2;
|
||||
UINT8 bySinNumTssts : 2;
|
||||
UINT8 byRoutNumTssts : 2;
|
||||
UINT8 bySoutNumTssts : 2;
|
||||
|
||||
/* RIN port. */
|
||||
UINT16 usRinTimeslot;
|
||||
@@ -101,19 +101,20 @@ typedef struct _OCT6100_API_CHANNEL_VQE_
|
||||
UINT8 fSoutAdaptiveNoiseReduction : 1;
|
||||
UINT8 fDtmfToneRemoval : 1;
|
||||
UINT8 fAcousticEcho : 1;
|
||||
UINT8 byComfortNoiseMode : 1;
|
||||
UINT8 byComfortNoiseMode : 2;
|
||||
UINT8 fSoutNaturalListenerEnhancement : 1;
|
||||
UINT8 fRoutNoiseReduction : 1;
|
||||
UINT8 fEnableMusicProtection : 1;
|
||||
UINT8 fIdleCodeDetection : 1;
|
||||
UINT8 byAnrVoiceNoiseSegregation : 1;
|
||||
UINT8 byAnrVoiceNoiseSegregation : 4;
|
||||
UINT8 byDoubleTalkBehavior : 1;
|
||||
UINT8 fSoutNoiseBleaching : 1;
|
||||
UINT8 fSoutConferencingNoiseReduction : 1;
|
||||
UINT8 bySoutAutomaticListenerEnhancementGainDb : 1;
|
||||
UINT8 byNonLinearityBehaviorA : 1;
|
||||
UINT8 byNonLinearityBehaviorB : 1;
|
||||
UINT8 bySoutNaturalListenerEnhancementGainDb : 1;
|
||||
UINT8 byNonLinearityBehaviorA : 4;
|
||||
UINT8 byNonLinearityBehaviorB : 4;
|
||||
|
||||
UINT8 bySoutAutomaticListenerEnhancementGainDb;
|
||||
UINT8 bySoutNaturalListenerEnhancementGainDb;
|
||||
|
||||
OCT_INT8 chRinAutomaticLevelControlTargetDb;
|
||||
OCT_INT8 chSoutAutomaticLevelControlTargetDb;
|
||||
@@ -142,15 +143,15 @@ typedef struct _OCT6100_API_CHANNEL_CODEC_
|
||||
UINT8 byAdpcmNibblePosition : 1;
|
||||
UINT8 fEnableSilenceSuppression : 1;
|
||||
|
||||
UINT8 byEncoderPort : 1;
|
||||
UINT8 byEncodingRate : 1;
|
||||
UINT8 byEncoderPort : 4;
|
||||
UINT8 byDecoderPort : 4;
|
||||
|
||||
UINT8 byDecoderPort : 1;
|
||||
UINT8 byDecodingRate : 1;
|
||||
UINT8 byPhasingType : 2;
|
||||
|
||||
UINT8 byEncodingRate;
|
||||
UINT8 byDecodingRate;
|
||||
|
||||
UINT8 byPhase : 1;
|
||||
UINT8 byPhasingType : 1;
|
||||
|
||||
UINT16 byPhase;
|
||||
} tOCT6100_API_CHANNEL_CODEC, *tPOCT6100_API_CHANNEL_CODEC;
|
||||
|
||||
typedef struct _OCT6100_API_CHANNEL_
|
||||
@@ -171,7 +172,7 @@ typedef struct _OCT6100_API_CHANNEL_
|
||||
UINT8 fEnableToneDisabler : 1;
|
||||
|
||||
/* Current echo operation mode. */
|
||||
UINT8 byEchoOperationMode : 1;
|
||||
UINT8 byEchoOperationMode : 3;
|
||||
|
||||
UINT8 byToneDisablerStatus : 1;
|
||||
|
||||
@@ -367,7 +368,7 @@ typedef struct _OCT6100_API_BIDIR_CHANNEL_
|
||||
/* Flag specifying whether the entry is used or not. */
|
||||
UINT8 fReserved : 1;
|
||||
/* Count used to manage entry handles allocated to user. */
|
||||
UINT8 byEntryOpenCnt : 1;
|
||||
UINT8 byEntryOpenCnt;
|
||||
|
||||
} tOCT6100_API_BIDIR_CHANNEL, *tPOCT6100_API_BIDIR_CHANNEL;
|
||||
|
||||
|
||||
@@ -1881,7 +1881,7 @@ __voicebus_init(struct voicebus *vb, const char *board_name,
|
||||
goto cleanup;
|
||||
|
||||
#if !defined(CONFIG_VOICEBUS_TIMER)
|
||||
retval = request_irq(vb->pdev->irq, vb_isr, DAHDI_IRQ_SHARED,
|
||||
retval = request_irq(vb->pdev->irq, vb_isr, DAHDI_IRQ_SHARED_DISABLED,
|
||||
board_name, vb);
|
||||
if (retval) {
|
||||
dev_warn(&vb->pdev->dev, "Failed to request interrupt line.\n");
|
||||
|
||||
@@ -2375,6 +2375,9 @@ b4xxp_chanconfig(struct file *file, struct dahdi_chan *chan, int sigtype)
|
||||
|
||||
if (alreadyrunning && bspan->sigchan) {
|
||||
hdlc_stop(b4, fifo);
|
||||
atomic_set(&bspan->hdlc_pending, 0);
|
||||
bspan->sigactive = 0;
|
||||
smp_mb();
|
||||
bspan->sigchan = NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -244,9 +244,11 @@ static int altab[] = {
|
||||
#define CANARY 0xc0de
|
||||
|
||||
/* names of available HWEC modules */
|
||||
#ifdef VPM_SUPPORT
|
||||
static const char *vpm400_name = "VPM400M";
|
||||
static const char *vpmoct064_name = "VPMOCT064";
|
||||
static const char *vpmoct128_name = "VPMOCT128";
|
||||
#endif
|
||||
|
||||
#define PORTS_PER_FRAMER 4
|
||||
|
||||
@@ -1635,7 +1637,6 @@ static int t4_maint(struct dahdi_span *span, int cmd)
|
||||
dev_info(&wc->dev->dev, "Transmitting loopdown code\n");
|
||||
t4_clear_maint(span);
|
||||
t4_set_framer_bits(wc, span->offset, FMR5, FMR5_XLD);
|
||||
ts->span.maintstat = DAHDI_MAINT_NONE;
|
||||
break;
|
||||
case DAHDI_MAINT_FAS_DEFECT:
|
||||
t4_framer_out(wc, span->offset, IERR_T, IFASE);
|
||||
@@ -2032,6 +2033,7 @@ static void set_span_devicetype(struct t4 *wc)
|
||||
ts = wc->tspans[x];
|
||||
strlcpy(ts->span.devicetype, wc->variety,
|
||||
sizeof(ts->span.devicetype));
|
||||
#ifdef VPM_SUPPORT
|
||||
if (wc->vpm == T4_VPM_PRESENT) {
|
||||
if (!wc->vpm450m)
|
||||
strncat(ts->span.devicetype, " (VPM400M)", sizeof(ts->span.devicetype) - 1);
|
||||
@@ -2039,6 +2041,7 @@ static void set_span_devicetype(struct t4 *wc)
|
||||
strncat(ts->span.devicetype, (wc->numspans > 2) ? " (VPMOCT128)" : " (VPMOCT064)",
|
||||
sizeof(ts->span.devicetype) - 1);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4015,6 +4018,7 @@ DAHDI_IRQ_HANDLER(t4_interrupt_gen2)
|
||||
t4_framer_interrupt(wc, 3);
|
||||
}
|
||||
|
||||
#ifdef VPM_SUPPORT
|
||||
if (wc->vpm && vpmdtmfsupport) {
|
||||
if (wc->vpm450m) {
|
||||
/* How stupid is it that the octasic can't generate an
|
||||
@@ -4028,6 +4032,7 @@ DAHDI_IRQ_HANDLER(t4_interrupt_gen2)
|
||||
set_bit(T4_CHECK_VPM, &wc->checkflag);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
spin_lock(&wc->reglock);
|
||||
|
||||
@@ -4919,10 +4924,12 @@ static void _t4_remove_one(struct t4 *wc)
|
||||
/* Stop hardware */
|
||||
t4_hardware_stop(wc);
|
||||
|
||||
#ifdef VPM_SUPPORT
|
||||
/* Release vpm450m */
|
||||
if (wc->vpm450m)
|
||||
release_vpm450m(wc->vpm450m);
|
||||
wc->vpm450m = NULL;
|
||||
#endif
|
||||
/* Unregister spans */
|
||||
|
||||
basesize = DAHDI_MAX_CHUNKSIZE * 32 * 4;
|
||||
|
||||
@@ -1614,6 +1614,20 @@ wctc4xxp_transmit_cmd(struct wcdte *wc, struct tcb *cmd)
|
||||
{
|
||||
int res;
|
||||
|
||||
/* If we're shutdown all commands will timeout. Just complete the
|
||||
* command here with the timeout flag */
|
||||
if (unlikely(test_bit(DTE_SHUTDOWN, &wc->flags))) {
|
||||
if (cmd->flags & DO_NOT_AUTO_FREE) {
|
||||
cmd->flags |= DTE_CMD_TIMEOUT;
|
||||
list_del_init(&cmd->node);
|
||||
complete(&cmd->complete);
|
||||
} else {
|
||||
list_del(&cmd->node);
|
||||
free_cmd(cmd);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (cmd->data_len < MIN_PACKET_LEN) {
|
||||
memset((u8 *)(cmd->data) + cmd->data_len, 0,
|
||||
MIN_PACKET_LEN-cmd->data_len);
|
||||
@@ -2740,11 +2754,10 @@ wctc4xxp_start_dma(struct wcdte *wc)
|
||||
}
|
||||
|
||||
static void
|
||||
wctc4xxp_stop_dma(struct wcdte *wc)
|
||||
_wctc4xxp_stop_dma(struct wcdte *wc)
|
||||
{
|
||||
/* Disable interrupts and reset */
|
||||
unsigned int reg;
|
||||
unsigned long newjiffies;
|
||||
/* Disable interrupts */
|
||||
wctc4xxp_setintmask(wc, 0x00000000);
|
||||
wctc4xxp_setctl(wc, 0x0084, 0x00000000);
|
||||
@@ -2753,7 +2766,14 @@ wctc4xxp_stop_dma(struct wcdte *wc)
|
||||
reg = wctc4xxp_getctl(wc, 0x0000);
|
||||
reg |= 0x00000001;
|
||||
wctc4xxp_setctl(wc, 0x0000, reg);
|
||||
}
|
||||
|
||||
static void
|
||||
wctc4xxp_stop_dma(struct wcdte *wc)
|
||||
{
|
||||
unsigned long newjiffies;
|
||||
|
||||
_wctc4xxp_stop_dma(wc);
|
||||
newjiffies = jiffies + HZ; /* One second timeout */
|
||||
/* We'll wait here for the part to come out of reset */
|
||||
while (((wctc4xxp_getctl(wc, 0x0000)) & 0x00000001) &&
|
||||
@@ -2761,7 +2781,6 @@ wctc4xxp_stop_dma(struct wcdte *wc)
|
||||
msleep(1);
|
||||
}
|
||||
|
||||
|
||||
#define MDIO_SHIFT_CLK 0x10000
|
||||
#define MDIO_DATA_WRITE1 0x20000
|
||||
#define MDIO_ENB 0x00000
|
||||
@@ -3305,13 +3324,19 @@ wctc4xxp_watchdog(unsigned long data)
|
||||
if (time_after(jiffies, cmd->timeout)) {
|
||||
if (++cmd->retries > MAX_RETRIES) {
|
||||
if (!(cmd->flags & TX_COMPLETE)) {
|
||||
|
||||
cmd->flags |= DTE_CMD_TIMEOUT;
|
||||
list_del_init(&cmd->node);
|
||||
complete(&cmd->complete);
|
||||
|
||||
set_bit(DTE_SHUTDOWN, &wc->flags);
|
||||
spin_unlock(&wc->cmd_list_lock);
|
||||
wctc4xxp_stop_dma(wc);
|
||||
_wctc4xxp_stop_dma(wc);
|
||||
dev_err(&wc->pdev->dev,
|
||||
"Board malfunctioning. " \
|
||||
"Halting operation.\n");
|
||||
return;
|
||||
reschedule_timer = 0;
|
||||
break;
|
||||
}
|
||||
/* ERROR: We've retried the command and
|
||||
* haven't received the ACK or the response.
|
||||
|
||||
@@ -1937,7 +1937,7 @@ static inline void t1_check_alarms(struct t1 *wc)
|
||||
/* Detect loopup code if we're not sending one */
|
||||
if ((!wc->span.mainttimer) && (d & 0x08)) {
|
||||
/* Loop-up code detected */
|
||||
if ((wc->loopupcnt++ > 80) && (wc->span.maintstat != DAHDI_MAINT_REMOTELOOP)) {
|
||||
if ((wc->span.maintstat != DAHDI_MAINT_REMOTELOOP)) {
|
||||
t1_notice(wc, "Loopup detected,"\
|
||||
" enabling remote loop\n");
|
||||
t1_setreg(wc, 0x36, 0x08); /* LIM0: Disable any local loop */
|
||||
@@ -1949,7 +1949,7 @@ static inline void t1_check_alarms(struct t1 *wc)
|
||||
/* Same for loopdown code */
|
||||
if ((!wc->span.mainttimer) && (d & 0x10)) {
|
||||
/* Loop-down code detected */
|
||||
if ((wc->loopdowncnt++ > 80) && (wc->span.maintstat == DAHDI_MAINT_REMOTELOOP)) {
|
||||
if ((wc->span.maintstat == DAHDI_MAINT_REMOTELOOP)) {
|
||||
t1_notice(wc, "Loopdown detected,"\
|
||||
" disabling remote loop\n");
|
||||
t1_setreg(wc, 0x36, 0x08); /* LIM0: Disable any local loop */
|
||||
@@ -2686,6 +2686,7 @@ static void __devexit te12xp_remove_one(struct pci_dev *pdev)
|
||||
remove_sysfs_files(wc);
|
||||
|
||||
clear_bit(INITIALIZED, &wc->bit_flags);
|
||||
smp_mb__after_clear_bit();
|
||||
|
||||
del_timer_sync(&wc->timer);
|
||||
flush_workqueue(wc->wq);
|
||||
|
||||
@@ -1783,7 +1783,7 @@ static void PRI_card_pcm_tospan(xpd_t *xpd, xpacket_t *pack)
|
||||
spin_unlock_irqrestore(&xpd->lock, flags);
|
||||
}
|
||||
|
||||
int PRI_timing_priority(xpd_t *xpd)
|
||||
static int PRI_timing_priority(xpd_t *xpd)
|
||||
{
|
||||
struct PRI_priv_data *priv;
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ static int proc_xbus_command_write(struct file *file, const char __user *buffer,
|
||||
|
||||
/* Command line parameters */
|
||||
extern int debug;
|
||||
static DEF_PARM(uint, command_queue_length, 800, 0444, "Maximal command queue length");
|
||||
static DEF_PARM(uint, command_queue_length, 1000, 0444, "Maximal command queue length");
|
||||
static DEF_PARM(uint, poll_timeout, 1000, 0644, "Timeout (in jiffies) waiting for units to reply");
|
||||
static DEF_PARM_BOOL(rx_tasklet, 0, 0644, "Use receive tasklets");
|
||||
|
||||
|
||||
@@ -208,8 +208,8 @@ struct xbus {
|
||||
int cpu_rcv_tasklet[NR_CPUS];
|
||||
|
||||
struct quirks {
|
||||
int has_fxo:1;
|
||||
int has_digital_span:1;
|
||||
unsigned int has_fxo:1;
|
||||
unsigned int has_digital_span:1;
|
||||
} quirks;
|
||||
bool self_ticking;
|
||||
enum sync_mode sync_mode;
|
||||
|
||||
@@ -48,6 +48,7 @@ static void __xframe_dump_queue(struct xframe_queue *q)
|
||||
static bool __xframe_enqueue(struct xframe_queue *q, xframe_t *xframe)
|
||||
{
|
||||
int ret = 1;
|
||||
static int overflow_cnt = 0;
|
||||
|
||||
if(unlikely(q->disabled)) {
|
||||
ret = 0;
|
||||
@@ -55,7 +56,8 @@ static bool __xframe_enqueue(struct xframe_queue *q, xframe_t *xframe)
|
||||
}
|
||||
if(q->count >= q->max_count) {
|
||||
q->overflows++;
|
||||
NOTICE("Overflow of %-15s: counts %3d, %3d, %3d worst %3d, overflows %3d worst_lag %02ld.%ld ms\n",
|
||||
if ((overflow_cnt++ % 1000) < 5) {
|
||||
NOTICE("Overflow of %-15s: counts %3d, %3d, %3d worst %3d, overflows %3d worst_lag %02ld.%ld ms\n",
|
||||
q->name,
|
||||
q->steady_state_count,
|
||||
q->count,
|
||||
@@ -64,7 +66,8 @@ static bool __xframe_enqueue(struct xframe_queue *q, xframe_t *xframe)
|
||||
q->overflows,
|
||||
q->worst_lag_usec / 1000,
|
||||
q->worst_lag_usec % 1000);
|
||||
__xframe_dump_queue(q);
|
||||
__xframe_dump_queue(q);
|
||||
}
|
||||
ret = 0;
|
||||
goto out;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user