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 |
155
ChangeLog
155
ChangeLog
@@ -1,3 +1,158 @@
|
||||
2011-08-05 Shaun Ruffell <sruffell@digium.com>
|
||||
|
||||
* dahdi-linux 2.5.0 released.
|
||||
|
||||
2011-07-26 20:19 +0000 [r10082] Shaun Ruffell <sruffell@digium.com>
|
||||
|
||||
* drivers/dahdi/wctc4xxp/base.c: wctc4xxp: Cleanup in-flight
|
||||
commands when halting due to hardware error. On one system I was
|
||||
seeing the board reset in the middle of a transaction. Any
|
||||
commands that were on the response list when this would happen
|
||||
would never be completed and the process would then be stuck in
|
||||
an uninterruptible sleep. This change also prevents the driver
|
||||
from sleeping in timer context, which would result in a kernel
|
||||
panic. This change at least lets an error message propogate back
|
||||
to the user. DAHDI-880 Signed-off-by: Shaun Ruffell
|
||||
<sruffell@digium.com>
|
||||
|
||||
2011-07-22 17:56 +0000 [r10079] Russ Meyerriecks <rmeyerreicks@digium.com>
|
||||
|
||||
* drivers/dahdi/wcb4xxp/base.c: wcb4xxp: Prevent null pointer
|
||||
dereference on spanconfig In the rare case where spanconfig is
|
||||
called while there is pending data on the hdlc channel, the
|
||||
hdlc_getbuf interrupt could try to read from the hdlc buffer
|
||||
before the channel was fully setup. This could potentially result
|
||||
in a null pointer dereference. This condition has existed since
|
||||
the creation of the wcb4xxp driver. Signed-off-by: Russ
|
||||
Meyerriecks <rmeyerriecks@digium.com> Signed-off-by: Shaun
|
||||
Ruffell <sruffell@digium.com>
|
||||
|
||||
2011-07-21 Shaun Ruffell <sruffell@digium.com>
|
||||
|
||||
* dahdi-linux version 2.5.0-rc2 released.
|
||||
|
||||
2011-07-21 16:26 +0000 [r10066-10070] Shaun Ruffell <sruffell@digium.com>
|
||||
|
||||
* drivers/dahdi/dahdi-base.c: dahdi: Drivers that do not support
|
||||
hwec should not report hwec is available. When attaching software
|
||||
echocans to a channel, if there is a hardware echocan available
|
||||
always give preference to them. Revision 9995 "dahdi: Always
|
||||
attach hwec to a channel if available" had an error where if a
|
||||
driver did not even support an option of hardware echocan,
|
||||
dahdi-base would take that to mean there always was a hardware
|
||||
echocan available on the channel. DAHLIN-246 Reported-by: Michael
|
||||
L. Young Signed-off-by: Shaun Ruffell <sruffell@digium.com>
|
||||
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
|
||||
|
||||
* drivers/dahdi/voicebus/voicebus.c: wctdm24xxp, wcte12xp: Run the
|
||||
ISR with interrupts disabled. Revision 9886, "wcte12xp: Use the
|
||||
in-hardirq versions of dahdi_receive/dahdi_transmit", changed the
|
||||
call into dahdi_receive and dahdi_transmit to use versions that
|
||||
assume local interrupts are already disabled. Not all versions of
|
||||
the kernel run interrupt service routines with all interrupts
|
||||
disabled and therefore it was possible to lock up a CPU with a
|
||||
recursive grab of the chan_lock. When LOCKDEP was enabled (on
|
||||
debug kernels) interrupt handlers were run atomically so this
|
||||
problem would only occur on pre 2.6.35 kernels that did not have
|
||||
lockdep enabled. Signed-off-by: Shaun Ruffell
|
||||
<sruffell@digium.com>
|
||||
|
||||
2011-07-20 21:32 +0000 [r10063-10064] Russ Meyerriecks <rmeyerreicks@digium.com>
|
||||
|
||||
* drivers/dahdi/wcte12xp/base.c: wcte12xp: Fix bug when not
|
||||
recognizing loopup codes The wcte12xp wasn't recognizing
|
||||
loopup/loopdown signals. The debounce was so long that it was
|
||||
preventing the loopup/loopdown signals from being registered
|
||||
properly. Removed the debounce entirely as it was unnecessary to
|
||||
the operation. Signed-off-by: Russ Meyerriecks
|
||||
<rmeyerriecks@digium.com> Acked-by: Shaun Ruffell
|
||||
<sruffell@digium.com>
|
||||
|
||||
* drivers/dahdi/wct4xxp/base.c: wct4xxp: Fixed a bug where it sent
|
||||
loopdown signals forever The wct4xxp driver was resetting it's
|
||||
maint state to NONE prematurely. Signed-off-by: Russ Meyerriecks
|
||||
<rmeyerriecks@digium.com> Acked-by: Shaun Ruffell
|
||||
<sruffell@digium.com>
|
||||
|
||||
2011-07-20 17:24 +0000 [r10060-10061] Shaun Ruffell <sruffell@digium.com>
|
||||
|
||||
* drivers/dahdi/wct4xxp/base.c: wct4xxp: Fix compilation when
|
||||
VPM_SUPPORT is not defined. Signed-off-by: Shaun Ruffell
|
||||
<sruffell@digium.com>
|
||||
|
||||
* drivers/dahdi/oct612x/include/oct6100api/oct6100_channel_inst.h:
|
||||
oct612x: Increase the size of some of the instance variables.
|
||||
Revision 9750 "wct4xxp: Reduce the memory footprint of the
|
||||
hardware echocanceler" reduced the number of bits used to store
|
||||
some structure members. Some of the new field lengths were unable
|
||||
to store all the possible values the API as used assigned to the
|
||||
fields, resulting in channels never entering power down mode when
|
||||
they were disabled like they were previously. The change for
|
||||
byEchoOperationMode was found in testing the operation of the
|
||||
VPMOCT032 which currently uses the same code. The others were
|
||||
done via a review of the API doc. This change represents
|
||||
negligable risk and contains no logic changes. It only increases
|
||||
the memory footprint of the API instance in the kernel.
|
||||
Signed-off-by: Doug Bailey <dbailey@digium.com> Acked-by: Shaun
|
||||
Ruffell <sruffell@digium.com> Acked-by: Tzafrir Cohen
|
||||
<tzafrir.cohen@xorcom.com>
|
||||
|
||||
2011-07-20 16:50 +0000 [r10050-10058] Tzafrir Cohen <tzafrir.cohen@xorcom.com>
|
||||
|
||||
* README: README: KVERS, KSRC in live.conf Signed-off-by: Tzafrir
|
||||
Cohen <tzafrir.cohen@xorcom.com>
|
||||
|
||||
* build_tools/live_dahdi: live_dahdi: symlink_ast live_dahdi: Add a
|
||||
new command: symlink_ast, to make the system's
|
||||
/etc/asterisk/dahdi-channels.conf a symlink to the one generated
|
||||
by 'reload' / 'genconf'. If the system dahdi-channels.conf is a
|
||||
generated one and has not edited, there's no real harm with
|
||||
running this. Signed-off-by: Tzafrir Cohen
|
||||
<tzafrir.cohen@xorcom.com>
|
||||
|
||||
* drivers/dahdi/dahdi-base.c: get registration_mutex at free_pseudo
|
||||
Make sure that the call to dahdi_chan_unreg() in free_pseudo() is
|
||||
protected by the registration_mutex, like the other calls to that
|
||||
function. Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
|
||||
Acked-By: Oron Peled <oron.peled@xorcom.com> Acked-by: Shaun
|
||||
Ruffell <sruffell@digium.com>
|
||||
|
||||
* drivers/dahdi/xpp/xbus-core.c: xpp: increase command queue lenge
|
||||
to 1000 Required by CAS in latest (2.5) DAHDI versions.
|
||||
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
|
||||
|
||||
* drivers/dahdi/xpp/xbus-core.h: xpp: make quirk bit flags unsigned
|
||||
This avoids a nag about a meaningless single-bit signed int.
|
||||
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
|
||||
|
||||
* drivers/dahdi/xpp/card_pri.c: xpp: PRI_timing_priority can be
|
||||
static. Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
|
||||
|
||||
* drivers/dahdi/xpp/xframe_queue.c: xpp: rate limit queue overflow
|
||||
messages If the CPU becomes overly busy, merely printing the
|
||||
"Overflow in the recieve_queue" messages becomes CPU-intensive on
|
||||
its own right. Signed-off-by: Tzafrir Cohen
|
||||
<tzafrir.cohen@xorcom.com>
|
||||
|
||||
* build_tools/live_dahdi: live_dahdi: xpp_fxloader: use live
|
||||
xpp.conf xpp_fxloader also reads /etc/dahdi/xpp.conf in one
|
||||
specific case. Make it use the live copy.
|
||||
|
||||
* build_tools/live_dahdi: live_dahdi: no need to create asterisk at
|
||||
genconf /etc/asterisk already gets generated at config. No need
|
||||
to re-create it at genconf time. Signed-off-by: Tzafrir Cohen
|
||||
<tzafrir.cohen@xorcom.com>
|
||||
|
||||
2011-07-18 23:32 +0000 [r10047] Shaun Ruffell <sruffell@digium.com>
|
||||
|
||||
* drivers/dahdi/wcte12xp/base.c: wcte12xp: Close a potential race
|
||||
on driver unload. The shutdown logic requires that all CPUs see
|
||||
that the INITIALIZED bit has been cleared. Otherwise it may be
|
||||
possible for the workqueue to run after the hardware resources
|
||||
have been released. Signed-off-by: Shaun Ruffell
|
||||
<sruffell@digium.com> Acked-by: Russ Meyerriecks
|
||||
<rmeyerriecks@digium.com>
|
||||
|
||||
2011-07-12 18:15 +0000 [r10036-10038] Tzafrir Cohen <tzafrir.cohen@xorcom.com>
|
||||
|
||||
* drivers/dahdi/xpp/firmwares/Makefile: xpp: install Octasic
|
||||
|
||||
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