Compare commits
7 Commits
v2.9.0-rc1
...
v2.9.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fdca6f36de | ||
|
|
02f6b4e7bd | ||
|
|
701ed41adf | ||
|
|
03b3ce1a10 | ||
|
|
2c4373972b | ||
|
|
2ecf700dd8 | ||
|
|
74e949c33a |
26
README
26
README
@@ -528,11 +528,12 @@ XPP (Astribank) module parameters
|
||||
==== dahdi_autoreg
|
||||
(xpp)
|
||||
|
||||
Register spans automatically (1) or not (0). Default: 0.
|
||||
Setting it simplifies operations with a single Astribank and no other
|
||||
DAHDI hardware. However if you have such systems, automatic
|
||||
registration can cause the order of spans to be unpredictable.
|
||||
The standard startup scripts use 'dahdi_registration on' instead of this.
|
||||
Deprecated. See dahdi.<<_auto_assign_spans,auto_assign_spans>> above.
|
||||
|
||||
Originally had a somewhat similar (but xpp-specific and more limited)
|
||||
role to auto_assign_spans. For backward compatibility this variable is
|
||||
still kept, but its value is unused. Astribanks will auto-register
|
||||
with dahdi if auto_assign_spans is not set.
|
||||
|
||||
==== tools_rootdir
|
||||
(xpp)
|
||||
@@ -896,11 +897,12 @@ to other nodes.
|
||||
|
||||
Class DAHDI
|
||||
^^^^^^^^^^^
|
||||
under /sys/class/dadhi there exists a node for each DAHDI device file
|
||||
under /dev/dahdi. The name is 'dahdi!foo' for the file '/dev/dahdi/foo'
|
||||
(udev translates exclamation marks to slashes). Those nodes are not, for
|
||||
the most part, proper SysFS nodes, and don't include any interesting
|
||||
properties.
|
||||
Under /sys/class/dadhi there exists a node for the non-channel DAHDI
|
||||
device file under /dev/dahdi. The name is 'dahdi!foo' for the file
|
||||
'/dev/dahdi/foo' (udev translates exclamation marks to slashes). Those
|
||||
nodes are not, for the most part, proper SysFS nodes, and don't include
|
||||
any interesting properties. The files in this class `ctl`, `timer`,
|
||||
`channel`, `pseudo` and (if exists) `transcode`.
|
||||
|
||||
|
||||
Devices Bus
|
||||
@@ -925,6 +927,10 @@ A unique hardware-level identifier (e.g. serial number), if available.
|
||||
===== /sys/bus/dahdi_devices/devices/DEVICE/manufacturer
|
||||
The name of the manufacturer. Freeform-string.
|
||||
|
||||
===== /sys/bus/dahdi_devices/devices/DEVICE/registration_time
|
||||
The time at which the device registered with the DAHDI core. Example
|
||||
value: "0005634136.941901429".
|
||||
|
||||
===== /sys/bus/dahdi_devices/devices/DEVICE/spantype
|
||||
A line for each available span: <num>:<type>. This has to be provided
|
||||
here as in the case of manual assignment, userspace may need to know
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
#include <linux/list.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/ktime.h>
|
||||
|
||||
#if defined(HAVE_UNLOCKED_IOCTL) && defined(CONFIG_BKL)
|
||||
#include <linux/smp_lock.h>
|
||||
@@ -7373,7 +7374,8 @@ int dahdi_assign_device_spans(struct dahdi_device *ddev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int auto_assign_spans = 1;
|
||||
int auto_assign_spans = 1;
|
||||
EXPORT_SYMBOL(auto_assign_spans);
|
||||
static const char *UNKNOWN = "";
|
||||
|
||||
/**
|
||||
@@ -7403,6 +7405,7 @@ static int _dahdi_register_device(struct dahdi_device *ddev,
|
||||
__dahdi_init_span(s);
|
||||
}
|
||||
|
||||
ktime_get_ts(&ddev->registration_time);
|
||||
ret = dahdi_sysfs_add_device(ddev, parent);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@@ -677,6 +677,19 @@ dahdi_spantype_store(struct device *dev, struct device_attribute *attr,
|
||||
return (ret < 0) ? ret : count;
|
||||
}
|
||||
|
||||
static ssize_t
|
||||
dahdi_registration_time_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
struct dahdi_device *ddev = to_ddev(dev);
|
||||
int count = 0;
|
||||
|
||||
count += sprintf(buf, "%010ld.%09ld\n",
|
||||
ddev->registration_time.tv_sec,
|
||||
ddev->registration_time.tv_nsec);
|
||||
return count;
|
||||
}
|
||||
|
||||
static struct device_attribute dahdi_device_attrs[] = {
|
||||
__ATTR(manufacturer, S_IRUGO, dahdi_device_manufacturer_show, NULL),
|
||||
__ATTR(type, S_IRUGO, dahdi_device_type_show, NULL),
|
||||
@@ -688,6 +701,7 @@ static struct device_attribute dahdi_device_attrs[] = {
|
||||
__ATTR(unassign_span, S_IWUSR, NULL, dahdi_device_unassign_span),
|
||||
__ATTR(spantype, S_IWUSR | S_IRUGO, dahdi_spantype_show,
|
||||
dahdi_spantype_store),
|
||||
__ATTR(registration_time, S_IRUGO, dahdi_registration_time_show, NULL),
|
||||
__ATTR_NULL,
|
||||
};
|
||||
|
||||
|
||||
@@ -60,8 +60,8 @@ static DEF_PARM(uint, command_queue_length, 1500, 0444,
|
||||
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");
|
||||
static DEF_PARM_BOOL(dahdi_autoreg, 1, 0644,
|
||||
"Register devices automatically (1) or not (0)");
|
||||
static DEF_PARM_BOOL(dahdi_autoreg, 0, 0444,
|
||||
"Register devices automatically (1) or not (0). UNUSED.");
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
static const struct file_operations xbus_read_proc_ops;
|
||||
@@ -1118,7 +1118,7 @@ void xbus_populate(void *data)
|
||||
*/
|
||||
xbus_request_sync(xbus, SYNC_MODE_PLL);
|
||||
elect_syncer("xbus_populate(end)"); /* FIXME: try to do it later */
|
||||
if (dahdi_autoreg)
|
||||
if (!auto_assign_spans)
|
||||
xbus_register_dahdi_device(xbus);
|
||||
out:
|
||||
XBUS_DBG(DEVICES, xbus, "Leaving\n");
|
||||
@@ -1977,6 +1977,10 @@ int __init xbus_core_init(void)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
if (dahdi_autoreg == 1) {
|
||||
NOTICE("WARNING: The dahdi_autoreg parameter is deprecated " \
|
||||
"-- just set dahdi.auto_assign_spans=0\n");
|
||||
}
|
||||
initialize_xbuses_array();
|
||||
#ifdef PROTOCOL_DEBUG
|
||||
INFO("FEATURE: with PROTOCOL_DEBUG\n");
|
||||
|
||||
@@ -941,6 +941,7 @@ struct dahdi_device {
|
||||
const char *devicetype;
|
||||
struct device dev;
|
||||
unsigned int irqmisses;
|
||||
struct timespec registration_time;
|
||||
};
|
||||
|
||||
struct dahdi_span {
|
||||
@@ -1279,6 +1280,7 @@ static inline void dahdi_ec_span(struct dahdi_span *span)
|
||||
}
|
||||
|
||||
extern struct file_operations *dahdi_transcode_fops;
|
||||
extern int auto_assign_spans;
|
||||
|
||||
/* Don't use these directly -- they're not guaranteed to
|
||||
be there. */
|
||||
|
||||
Reference in New Issue
Block a user