Compare commits
3 Commits
v2.10.0-rc
...
v2.10.0.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b9a8000bbd | ||
|
|
eedb4bf944 | ||
|
|
91bc5a3b57 |
@@ -10284,6 +10284,18 @@ MODULE_PARM_DESC(auto_assign_spans,
|
||||
"channel numbers assigned by the driver. If 0, user space "
|
||||
"will need to assign them via /sys/bus/dahdi_devices.");
|
||||
|
||||
|
||||
static ssize_t dahdi_no_read(struct file *file, char __user *usrbuf,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
static ssize_t dahdi_no_write(struct file *file, const char __user *usrbuf,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
static const struct file_operations dahdi_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = dahdi_open,
|
||||
@@ -10297,6 +10309,8 @@ static const struct file_operations dahdi_fops = {
|
||||
.ioctl = dahdi_ioctl,
|
||||
#endif
|
||||
.poll = dahdi_poll,
|
||||
.read = dahdi_no_read,
|
||||
.write = dahdi_no_write,
|
||||
};
|
||||
|
||||
static const struct file_operations dahdi_timer_fops = {
|
||||
@@ -10311,6 +10325,8 @@ static const struct file_operations dahdi_timer_fops = {
|
||||
.ioctl = dahdi_timer_ioctl,
|
||||
#endif
|
||||
.poll = dahdi_timer_poll,
|
||||
.read = dahdi_no_read,
|
||||
.write = dahdi_no_write,
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -201,7 +201,9 @@ static void dahdi_dynamic_sendmessage(struct dahdi_dynamic *d)
|
||||
static void __dahdi_dynamic_run(void)
|
||||
{
|
||||
struct dahdi_dynamic *d;
|
||||
#ifdef ENABLE_TASKLETS
|
||||
struct dahdi_dynamic_driver *drv;
|
||||
#endif
|
||||
|
||||
rcu_read_lock();
|
||||
list_for_each_entry_rcu(d, &dspan_list, list) {
|
||||
@@ -211,6 +213,13 @@ static void __dahdi_dynamic_run(void)
|
||||
}
|
||||
|
||||
#ifdef ENABLE_TASKLETS
|
||||
list_for_each_entry_rcu(drv, &driver_list, list) {
|
||||
/* Flush any traffic still pending in the driver */
|
||||
if (drv->flush) {
|
||||
drv->flush();
|
||||
}
|
||||
}
|
||||
#else
|
||||
/* If tasklets are not enabled, the above section will be called in
|
||||
* interrupt context and the flushing of each driver will be called in a
|
||||
* separate tasklet that only handles that. This is necessary since some
|
||||
@@ -221,13 +230,6 @@ static void __dahdi_dynamic_run(void)
|
||||
*
|
||||
*/
|
||||
tasklet_hi_schedule(&dahdi_dynamic_flush_tlet);
|
||||
#else
|
||||
list_for_each_entry_rcu(drv, &driver_list, list) {
|
||||
/* Flush any traffic still pending in the driver */
|
||||
if (drv->flush) {
|
||||
drv->flush();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
rcu_read_unlock();
|
||||
}
|
||||
|
||||
@@ -1063,12 +1063,23 @@ static int fr_add_pvc(struct net_device *master, unsigned int dlci, int type)
|
||||
|
||||
used = pvc_is_used(pvc);
|
||||
|
||||
if (type == ARPHRD_ETHER)
|
||||
if (type == ARPHRD_ETHER) {
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0)
|
||||
dev = alloc_netdev(sizeof(struct net_device_stats),
|
||||
"pvceth%d", NET_NAME_UNKNOWN, ether_setup);
|
||||
#else
|
||||
dev = alloc_netdev(sizeof(struct net_device_stats),
|
||||
"pvceth%d", ether_setup);
|
||||
else
|
||||
#endif
|
||||
} else {
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0)
|
||||
dev = alloc_netdev(sizeof(struct net_device_stats),
|
||||
"pvc%d", NET_NAME_UNKNOWN, dlci_setup);
|
||||
#else
|
||||
dev = alloc_netdev(sizeof(struct net_device_stats),
|
||||
"pvc%d", dlci_setup);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!dev) {
|
||||
printk(KERN_WARNING "%s: Memory squeeze on fr_pvc()\n",
|
||||
|
||||
@@ -282,7 +282,12 @@ static void hdlc_setup(struct net_device *dev)
|
||||
struct net_device *alloc_hdlcdev(void *priv)
|
||||
{
|
||||
struct net_device *dev;
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0)
|
||||
dev = alloc_netdev(sizeof(hdlc_device), "hdlc%d",
|
||||
NET_NAME_UNKNOWN, hdlc_setup);
|
||||
#else
|
||||
dev = alloc_netdev(sizeof(hdlc_device), "hdlc%d", hdlc_setup);
|
||||
#endif
|
||||
if (dev)
|
||||
dev_to_hdlc(dev)->priv = priv;
|
||||
return dev;
|
||||
|
||||
@@ -207,7 +207,13 @@ int vb_net_register(struct voicebus *vb, const char *board_name)
|
||||
struct voicebus_netdev_priv *priv;
|
||||
const char our_mac[] = { 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff};
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0)
|
||||
netdev = alloc_netdev(sizeof(*priv), board_name,
|
||||
NET_NAME_UNKNOWN, ether_setup);
|
||||
#else
|
||||
netdev = alloc_netdev(sizeof(*priv), board_name, ether_setup);
|
||||
#endif
|
||||
|
||||
if (!netdev)
|
||||
return -ENOMEM;
|
||||
priv = netdev_priv(netdev);
|
||||
|
||||
@@ -657,7 +657,13 @@ wctc4xxp_net_register(struct wcdte *wc)
|
||||
struct wcdte_netdev_priv *priv;
|
||||
const char our_mac[] = { 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff};
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0)
|
||||
netdev = alloc_netdev(sizeof(*priv), wc->board_name,
|
||||
NET_NAME_UNKNOWN, ether_setup);
|
||||
#else
|
||||
netdev = alloc_netdev(sizeof(*priv), wc->board_name, ether_setup);
|
||||
#endif
|
||||
|
||||
if (!netdev)
|
||||
return -ENOMEM;
|
||||
priv = netdev_priv(netdev);
|
||||
|
||||
Reference in New Issue
Block a user