Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c1d867b8b7 | ||
|
|
1ff5629078 | ||
|
|
ce3f1f2650 | ||
|
|
2ad4dc555f | ||
|
|
0469efb733 | ||
|
|
8ea23535dc | ||
|
|
431571b5fc | ||
|
|
ab927f796b |
6
Makefile
6
Makefile
@@ -64,11 +64,7 @@ ASCIIDOC_CMD:=$(ASCIIDOC) -n -a toc -a toclevels=4
|
||||
|
||||
GENERATED_DOCS:=README.html
|
||||
|
||||
ifneq ($(wildcard .version),)
|
||||
DAHDIVERSION:=$(shell cat .version)
|
||||
else
|
||||
DAHDIVERSION:=$(shell build_tools/make_version . dahdi/linux)
|
||||
endif
|
||||
DAHDIVERSION:=$(shell build_tools/make_version . dahdi/linux)
|
||||
|
||||
all: modules
|
||||
|
||||
|
||||
6
README
6
README
@@ -646,8 +646,10 @@ or dynamically through the udev system.
|
||||
|
||||
* /dev/dahdi/ctl (196:0) - a general device file for various information and
|
||||
control operations on the DAHDI channels.
|
||||
* /dev/dahdi/channels/N/M - A device file for channel M in span N
|
||||
(M is chanpos - numbering relative to the current span).
|
||||
* /dev/dahdi/chan/N/M - A device file for channel M in span N
|
||||
- Both N and M are zero padded 3 digit numbers
|
||||
- Both N and M start at 001
|
||||
- M is chanpos - numbering relative to the current span.
|
||||
* /dev/dahdi/NNN (196:NNN) - for NNN in the range 1-249. A device file for
|
||||
DAHDI channel NNN. It can be used to read data from the channel
|
||||
and write data to the channel. It is not generated by default but may
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -f ${1}/.version ]; then
|
||||
cat ${1}.version
|
||||
cat ${1}/.version
|
||||
elif [ -f ${1}/.svnrevision ]; then
|
||||
echo SVN-`cat ${1}/.svnbranch`-r`cat ${1}/.svnrevision`
|
||||
elif [ -d ${1}/.svn ]; then
|
||||
|
||||
@@ -1964,7 +1964,6 @@ static int dahdi_net_open(struct net_device *dev)
|
||||
return -EINVAL;
|
||||
}
|
||||
ms->txbufpolicy = DAHDI_POLICY_IMMEDIATE;
|
||||
ms->rxbufpolicy = DAHDI_POLICY_IMMEDIATE;
|
||||
|
||||
res = dahdi_reallocbufs(ms, DAHDI_DEFAULT_MTU_MRU, DAHDI_DEFAULT_NUM_BUFS);
|
||||
if (res)
|
||||
|
||||
@@ -247,7 +247,7 @@ int chan_sysfs_create(struct dahdi_chan *chan)
|
||||
/*
|
||||
* FIXME: the name cannot be longer than KOBJ_NAME_LEN
|
||||
*/
|
||||
dev_set_name(dev, "dahdi!channels!%d!%d", span->spanno, chan->chanpos);
|
||||
dev_set_name(dev, "dahdi!chan!%03d!%03d", span->spanno, chan->chanpos);
|
||||
dev_set_drvdata(dev, chan);
|
||||
dev->release = chan_release;
|
||||
res = device_register(dev);
|
||||
|
||||
@@ -2839,6 +2839,11 @@ static int t13x_check_firmware(struct t13x *wc)
|
||||
if (force_firmware) {
|
||||
dev_info(&wc->dev->dev,
|
||||
"force_firmware module parameter is set. Forcing firmware load, regardless of version\n");
|
||||
} else if (is_pcie(wc)) {
|
||||
dev_info(&wc->dev->dev,
|
||||
"Firmware %x is running, but we require %x. ERROR: This version of dahdi temporarily disabled field upgradeable firmware. Please upgrade your dahdi revision.\n",
|
||||
version, FIRMWARE_VERSION);
|
||||
return -EIO;
|
||||
} else {
|
||||
dev_info(&wc->dev->dev,
|
||||
"Firmware %x is running, but we require %x\n",
|
||||
@@ -2903,6 +2908,26 @@ cleanup:
|
||||
return res;
|
||||
}
|
||||
|
||||
static void soft_reset_fpga(struct t13x *wc)
|
||||
{
|
||||
/* digium_gpo */
|
||||
iowrite32be(0x0, wc->membase);
|
||||
|
||||
/* xps_intc */
|
||||
iowrite32be(0x0, wc->membase + 0x300);
|
||||
iowrite32be(0x0, wc->membase + 0x308);
|
||||
iowrite32be(0x0, wc->membase + 0x310);
|
||||
iowrite32be(0x0, wc->membase + 0x31C);
|
||||
|
||||
/* xps_spi_config_flash */
|
||||
iowrite32be(0xA, wc->membase + 0x200);
|
||||
|
||||
/* tdm engine */
|
||||
iowrite32be(0x0, wc->membase + 0x2000);
|
||||
iowrite32be(0x0, wc->membase + 0x2000);
|
||||
iowrite32be(0x0, wc->membase + 0x2000);
|
||||
}
|
||||
|
||||
static int __devinit te13xp_init_one(struct pci_dev *pdev,
|
||||
const struct pci_device_id *ent)
|
||||
{
|
||||
@@ -2979,10 +3004,7 @@ static int __devinit te13xp_init_one(struct pci_dev *pdev,
|
||||
dev_info(&wc->dev->dev, "Unable to request regions\n");
|
||||
|
||||
/* Reset entire fpga */
|
||||
pci_save_state(pdev);
|
||||
iowrite32be(0xe00, wc->membase + TDM_CONTROL);
|
||||
msleep(2000);
|
||||
pci_restore_state(pdev);
|
||||
soft_reset_fpga(wc);
|
||||
|
||||
/* Enable writes to fpga status register */
|
||||
iowrite32be(0, wc->membase + 0x04);
|
||||
@@ -3053,7 +3075,7 @@ static int __devinit te13xp_init_one(struct pci_dev *pdev,
|
||||
list_add_tail(&wc->span.device_node, &wc->ddev->spans);
|
||||
|
||||
/* Span is in red alarm by default */
|
||||
wc->span.alarms = DAHDI_ALARM_RED;
|
||||
wc->span.alarms = DAHDI_ALARM_NONE;
|
||||
|
||||
res = dahdi_register_device(wc->ddev, &wc->dev->dev);
|
||||
if (res) {
|
||||
|
||||
@@ -1592,8 +1592,6 @@ static bool xpds_done(xbus_t *xbus)
|
||||
{
|
||||
if (XBUS_IS(xbus, FAIL))
|
||||
return 1; /* Nothing to wait for */
|
||||
if (!XBUS_IS(xbus, RECVD_DESC))
|
||||
return 1; /* We are not in the initialization phase */
|
||||
if (xbus->worker.xpds_init_done)
|
||||
return 1; /* All good */
|
||||
/* Keep waiting */
|
||||
@@ -1622,14 +1620,9 @@ int waitfor_xpds(xbus_t *xbus, char *buf)
|
||||
len = -ENODEV;
|
||||
goto out;
|
||||
}
|
||||
if (worker->num_units == 0) {
|
||||
XBUS_ERR(xbus, "No cards. Skipping.\n");
|
||||
goto out;
|
||||
}
|
||||
XBUS_DBG(DEVICES, xbus,
|
||||
"Waiting for card init of %d XPD's max %d seconds (%p)\n",
|
||||
worker->num_units, INITIALIZATION_TIMEOUT / HZ,
|
||||
&worker->wait_for_xpd_initialization);
|
||||
"Waiting for card init of XPDs max %d seconds\n",
|
||||
INITIALIZATION_TIMEOUT / HZ);
|
||||
ret =
|
||||
wait_event_interruptible_timeout(worker->
|
||||
wait_for_xpd_initialization,
|
||||
|
||||
@@ -1402,6 +1402,8 @@ static inline short dahdi_txtone_nextsample(struct dahdi_chan *ss)
|
||||
#define DAHDI_FORMAT_AUDIO_MASK ((1 << 16) - 1)
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
|
||||
#ifdef RHEL_RELEASE_VERSION
|
||||
#if RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(6, 5)
|
||||
#ifdef CONFIG_PROC_FS
|
||||
#include <linux/proc_fs.h>
|
||||
static inline void *PDE_DATA(const struct inode *inode)
|
||||
@@ -1409,6 +1411,16 @@ static inline void *PDE_DATA(const struct inode *inode)
|
||||
return PDE(inode)->data;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#ifdef CONFIG_PROC_FS
|
||||
#include <linux/proc_fs.h>
|
||||
static inline void *PDE_DATA(const struct inode *inode)
|
||||
{
|
||||
return PDE(inode)->data;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 31)
|
||||
#define KERN_CONT ""
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26)
|
||||
|
||||
Reference in New Issue
Block a user