Compare commits

..

2 Commits

Author SHA1 Message Date
Shaun Ruffell
9992268a30 Importing files for 2.5.0.1 release.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/tags/2.5.0.1@10182 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-09-06 23:04:03 +00:00
Shaun Ruffell
9fa8a58e2d Creating tag for the release of dahdi-linux-2.5.0.1
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/tags/2.5.0.1@10181 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-09-06 23:03:12 +00:00
10 changed files with 4978 additions and 84 deletions

1
.version Normal file
View File

@@ -0,0 +1 @@
2.5.0.1

4939
ChangeLog Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -4797,10 +4797,6 @@ static int dahdi_ioctl_startup(struct file *file, unsigned long data)
*/
s->chans[x]->rxhooksig = DAHDI_RXSIG_INITIAL;
}
/* Now that this span is running, it might be selected as the
* master span */
__dahdi_find_master_span();
}
put_span(s);
return 0;
@@ -9231,12 +9227,12 @@ static void coretimer_init(void)
init_timer(&core_timer.timer);
core_timer.timer.function = coretimer_func;
core_timer.start_interval = current_kernel_time();
core_timer.timer.expires = jiffies + HZ;
atomic_set(&core_timer.count, 0);
atomic_set(&core_timer.shutdown, 0);
core_timer.interval = max(msecs_to_jiffies(DAHDI_MSECS_PER_CHUNK), 1UL);
if (core_timer.interval < (HZ/250))
core_timer.interval = (HZ/250);
core_timer.timer.expires = jiffies + core_timer.interval;
add_timer(&core_timer.timer);
}

View File

@@ -2205,7 +2205,7 @@ static const char *b4xxp_echocan_name(const struct dahdi_chan *chan)
{
struct b4xxp_span *bspan = container_of(chan->span, struct b4xxp_span,
span);
if (vpmsupport && (B410P == bspan->parent->card_type))
if (bspan->parent->card_type == B410P)
return "LASVEGAS2";
return NULL;
}

View File

@@ -766,9 +766,11 @@ static inline unsigned int __t4_raw_oct_in(struct t4 *wc, const unsigned int add
__t4_pci_out(wc, WC_LADDR, (WC_LWRITE | WC_LALE));
if (!pedanticpci)
__t4_pci_in(wc, WC_VERSION);
#ifdef PEDANTIC_OCTASIC_CHECKING
__t4_pci_out(wc, WC_LADDR, (WC_LALE));
if (!pedanticpci)
__t4_pci_in(wc, WC_VERSION);
#endif
if (!octopt) {
__t4_gpio_setdir(wc, 0xff, 0x00);
__t4_gpio_set(wc, 0xff, 0x00);

View File

@@ -73,6 +73,20 @@
dev_info(&(wc)->pdev->dev, _fmt, ## _args); \
} \
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18)
#ifndef WARN_ON_ONCE
#define WARN_ON_ONCE(__condition) do { \
static int __once = 1; \
if (unlikely(__condition)) { \
if (__once) { \
__once = 0; \
WARN_ON(0); \
} \
} \
} while (0)
#endif
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 14)
/* also added in RHEL kernels with the OpenInfiniband backport: */
#if LINUX_VERSION_CODE != KERNEL_VERSION(2, 6, 9) || !defined(DEFINE_SPINLOCK)
@@ -2144,13 +2158,12 @@ wctc4xxp_write(struct file *file, const char __user *frame,
}
if (DAHDI_FORMAT_G723_1 == dtc->srcfmt) {
if ((G723_5K_BYTES != count) && (G723_6K_BYTES != count) &&
(G723_SID_BYTES != count)) {
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 " \
"%d/%d/%d bytes.\n", count, G723_5K_BYTES,
G723_6K_BYTES, G723_SID_BYTES);
"%d/%d bytes.\n", count, G723_5K_BYTES,
G723_6K_BYTES);
return -EINVAL;
}
cpvt->timestamp += G723_SAMPLES;

View File

@@ -4242,6 +4242,7 @@ wctdm_init_span(struct wctdm *wc, int spanno, int chanoffset, int chancount,
(wc->desc->flags & FLAG_EXPRESS) ? " Express" : "",
pdev->bus->number, PCI_SLOT(pdev->devfn) + 1);
s->span.manufacturer = "Digium";
strncpy(s->span.devicetype, wc->desc->name, sizeof(s->span.devicetype) - 1);
if (wc->companding == DAHDI_LAW_DEFAULT) {
if (wc->digi_mods || digital_span)
@@ -4347,6 +4348,13 @@ static void wctdm_fixup_analog_span(struct wctdm *wc, int spanno)
s->chans[y++]->sigcap = 0;
}
}
for (x = 0; x < MAX_SPANS; x++) {
if (!wc->spans[x])
continue;
if (wc->vpmadt032)
strncat(wc->spans[x]->span.devicetype, " (VPMADT032)", sizeof(wc->spans[x]->span.devicetype) - 1);
}
}
static int wctdm_initialize_vpmadt032(struct wctdm *wc)
@@ -5260,27 +5268,6 @@ static void wctdm_allocate_irq_commands(struct wctdm *wc, unsigned int count)
spin_unlock_irqrestore(&wc->reglock, flags);
}
static void set_span_devicetype_string(struct wctdm *wc)
{
unsigned int x;
for (x = 0; x < ARRAY_SIZE(wc->spans); x++) {
struct dahdi_span *const s = &wc->spans[x]->span;
if (!s)
continue;
strlcpy(s->devicetype, wc->desc->name, sizeof(s->devicetype));
if (wc->vpmadt032) {
strlcat(s->devicetype, " (VPMADT032)",
sizeof(s->devicetype));
} else if (wc->vpmoct) {
strlcat(s->devicetype, " (VPMOCT032)",
sizeof(s->devicetype));
}
}
}
#ifdef USE_ASYNC_INIT
struct async_data {
struct pci_dev *pdev;
@@ -5536,8 +5523,6 @@ __wctdm_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
wctdm_initialize_vpm(wc);
set_span_devicetype_string(wc);
#ifdef USE_ASYNC_INIT
async_synchronize_cookie(cookie);
#endif

View File

@@ -1022,13 +1022,9 @@ static void set_span_devicetype(struct t1 *wc)
sizeof(wc->span.devicetype) - 1);
#if defined(VPM_SUPPORT)
if (wc->vpmadt032) {
if (wc->vpmadt032)
strncat(wc->span.devicetype, " (VPMADT032)",
sizeof(wc->span.devicetype) - 1);
} else if (wc->vpmoct) {
strncat(wc->span.devicetype, " (VPMOCT032)",
sizeof(wc->span.devicetype) - 1);
}
#endif
}
@@ -1664,8 +1660,6 @@ static void check_and_load_vpm(struct t1 *wc)
vpmoct_init(vpmoct, t1_vpm_load_complete);
}
set_span_devicetype(wc);
}
#else
static inline void check_and_load_vpm(const struct t1 *wc)

View File

@@ -386,8 +386,6 @@ static xpd_t *FXS_card_new(xbus_t *xbus, int unit, int subunit, const xproto_tab
int regular_channels;
struct FXS_priv_data *priv;
int i;
int d_inputs = 0;
int d_outputs = 0;
if(!to_phone) {
XBUS_NOTICE(xbus,
@@ -400,30 +398,16 @@ static xpd_t *FXS_card_new(xbus_t *xbus, int unit, int subunit, const xproto_tab
else
regular_channels = min(8, subunit_ports);
channels = regular_channels;
/* Calculate digital inputs/outputs */
if(unit == 0 && subtype != 4) {
if(unit == 0 && subtype != 4)
channels += 6; /* 2 DIGITAL OUTPUTS, 4 DIGITAL INPUTS */
d_inputs = LINES_DIGI_INP;
d_outputs = LINES_DIGI_OUT;
}
xpd = xpd_alloc(xbus, unit, subunit, subtype, subunits, sizeof(struct FXS_priv_data), proto_table, channels);
if(!xpd)
return NULL;
/* Initialize digital inputs/outputs */
if (d_inputs) {
XBUS_DBG(GENERAL, xbus, "Initialize %d digital inputs\n",
d_inputs);
PHONEDEV(xpd).digital_inputs =
BITMASK(d_inputs) << (regular_channels + d_outputs);
} else
XBUS_DBG(GENERAL, xbus, "No digital inputs\n");
if (d_outputs) {
XBUS_DBG(GENERAL, xbus, "Initialize %d digital outputs\n",
d_outputs);
PHONEDEV(xpd).digital_outputs =
BITMASK(d_outputs) << regular_channels;
} else
XBUS_DBG(GENERAL, xbus, "No digital outputs\n");
if(unit == 0) {
XBUS_DBG(GENERAL, xbus, "First XPD detected. Initialize digital outputs/inputs\n");
PHONEDEV(xpd).digital_outputs = BITMASK(LINES_DIGI_OUT) << regular_channels;
PHONEDEV(xpd).digital_inputs = BITMASK(LINES_DIGI_INP) << (regular_channels + LINES_DIGI_OUT);
}
PHONEDEV(xpd).direction = TO_PHONE;
xpd->type_name = "FXS";
if(fxs_proc_create(xbus, xpd) < 0)
@@ -1158,7 +1142,7 @@ static int FXS_card_tick(xbus_t *xbus, xpd_t *xpd)
priv = xpd->priv;
BUG_ON(!priv);
#ifdef POLL_DIGITAL_INPUTS
if (poll_digital_inputs && PHONEDEV(xpd).digital_inputs) {
if(poll_digital_inputs && xpd->xbus_idx == 0) {
if((xpd->timer_count % poll_digital_inputs) == 0)
poll_inputs(xpd);
}
@@ -1270,13 +1254,6 @@ static void process_digital_inputs(xpd_t *xpd, const reg_cmd_t *info)
bool offhook = (REG_FIELD(info, data_low) & 0x1) == 0;
xpp_line_t lines = BIT(info->portnum);
/* Sanity check */
if (!PHONEDEV(xpd).digital_inputs) {
XPD_NOTICE(xpd,
"%s called without digital inputs. Ignored\n",
__func__);
return;
}
/* Map SLIC number into line number */
for(i = 0; i < ARRAY_SIZE(input_channels); i++) {
int channo = input_channels[i];
@@ -1389,7 +1366,7 @@ static int FXS_card_register_reply(xbus_t *xbus, xpd_t *xpd, reg_cmd_t *info)
/*
* Process digital inputs polling results
*/
else if (!indirect && regnum == REG_DIGITAL_IOCTRL) {
else if(xpd->xbus_idx == 0 && !indirect && regnum == REG_DIGITAL_IOCTRL) {
process_digital_inputs(xpd, info);
}
#endif

View File

@@ -1364,19 +1364,6 @@ static inline void list_replace(struct list_head *old, struct list_head *new)
new->prev = old->prev;
new->prev->next = new;
}
#ifndef WARN_ON_ONCE
#define WARN_ON_ONCE(__condition) do { \
static int __once = 1; \
if (unlikely(__condition)) { \
if (__once) { \
__once = 0; \
WARN_ON(0); \
} \
} \
} while (0)
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 14)
#define kzalloc(a, b) kcalloc(1, a, b)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 12)