Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4d86a8f3f6 | ||
|
|
e005030995 | ||
|
|
ee691c23f4 | ||
|
|
9698657f7a | ||
|
|
79bf41ea8b | ||
|
|
41b5353338 | ||
|
|
378986841c | ||
|
|
b9a8000bbd | ||
|
|
eedb4bf944 |
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
|
||||
@@ -98,7 +98,11 @@
|
||||
#define chan_to_netdev(h) ((h)->hdlcnetdev->netdev)
|
||||
|
||||
/* macro-oni for determining a unit (channel) number */
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20)
|
||||
#define UNIT(file) MINOR(file->f_dentry->d_inode->i_rdev)
|
||||
#else
|
||||
#define UNIT(file) MINOR(file->f_path.dentry->d_inode->i_rdev)
|
||||
#endif
|
||||
|
||||
EXPORT_SYMBOL(dahdi_transcode_fops);
|
||||
EXPORT_SYMBOL(dahdi_init_tone_state);
|
||||
@@ -10284,6 +10288,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 +10313,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 +10329,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();
|
||||
}
|
||||
|
||||
@@ -266,6 +266,7 @@ static void ztdeth_destroy(struct dahdi_dynamic *dyn)
|
||||
struct ztdeth *z = dyn->pvt;
|
||||
unsigned long flags;
|
||||
struct ztdeth *prev=NULL, *cur;
|
||||
|
||||
spin_lock_irqsave(&zlock, flags);
|
||||
cur = zdevs;
|
||||
while(cur) {
|
||||
@@ -279,12 +280,14 @@ static void ztdeth_destroy(struct dahdi_dynamic *dyn)
|
||||
prev = cur;
|
||||
cur = cur->next;
|
||||
}
|
||||
spin_unlock_irqrestore(&zlock, flags);
|
||||
|
||||
if (cur == z) { /* Successfully removed */
|
||||
dyn->pvt = NULL;
|
||||
dev_put(z->dev);
|
||||
printk(KERN_INFO "TDMoE: Removed interface for %s\n", z->span->name);
|
||||
kfree(z);
|
||||
}
|
||||
spin_unlock_irqrestore(&zlock, flags);
|
||||
}
|
||||
|
||||
static int ztdeth_create(struct dahdi_dynamic *dyn, const char *addr)
|
||||
|
||||
@@ -3823,7 +3823,7 @@ static void wcaxx_back_out_gracefully(struct wcaxx *wc)
|
||||
unsigned long flags;
|
||||
|
||||
clear_bit(INITIALIZED, &wc->bit_flags);
|
||||
smp_mb__after_clear_bit();
|
||||
smp_mb__after_atomic();
|
||||
|
||||
/* Make sure we're not on the card list anymore. */
|
||||
mutex_lock(&card_list_lock);
|
||||
|
||||
@@ -2110,7 +2110,7 @@ static int t1xxp_set_linemode(struct dahdi_span *span, enum spantypes linemode)
|
||||
* them. */
|
||||
clear_bit(INITIALIZED, &wc->bit_flags);
|
||||
synchronize_irq(wc->vb.pdev->irq);
|
||||
smp_mb__after_clear_bit();
|
||||
smp_mb__after_atomic();
|
||||
del_timer_sync(&wc->timer);
|
||||
flush_workqueue(wc->wq);
|
||||
|
||||
@@ -3076,7 +3076,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();
|
||||
smp_mb__after_atomic();
|
||||
|
||||
del_timer_sync(&wc->timer);
|
||||
flush_workqueue(wc->wq);
|
||||
|
||||
@@ -1849,7 +1849,7 @@ static int t13x_set_linemode(struct dahdi_span *span, enum spantypes linemode)
|
||||
clear_bit(INITIALIZED, &wc->bit_flags);
|
||||
disable_irq(wc->xb.pdev->irq);
|
||||
|
||||
smp_mb__after_clear_bit();
|
||||
smp_mb__after_atomic();
|
||||
del_timer_sync(&wc->timer);
|
||||
flush_workqueue(wc->wq);
|
||||
|
||||
@@ -2725,7 +2725,7 @@ static void __devexit te13xp_remove_one(struct pci_dev *pdev)
|
||||
return;
|
||||
|
||||
clear_bit(INITIALIZED, &wc->bit_flags);
|
||||
smp_mb__after_clear_bit();
|
||||
smp_mb__after_atomic();
|
||||
|
||||
/* Quiesce DMA engine interrupts */
|
||||
wcxb_stop(&wc->xb);
|
||||
|
||||
@@ -3581,7 +3581,7 @@ static void __devexit t43x_remove_one(struct pci_dev *pdev)
|
||||
return;
|
||||
|
||||
wc->not_ready = 1;
|
||||
smp_mb__after_clear_bit();
|
||||
smp_mb__after_atomic();
|
||||
|
||||
/* Stop everything */
|
||||
wcxb_stop(&wc->xb);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -20,7 +20,12 @@ install:
|
||||
mkdir -p $(TARGET)
|
||||
install $(SCRIPTS) $(TARGET)/
|
||||
install -m 644 ../XppConfig.pm $(FIRMWARES) $(TARGET)/
|
||||
if [ ! -r $(TARGET)/USB_FW.202.hex ]; then \
|
||||
ln -s USB_FW.201.hex $(TARGET)/USB_FW.202.hex;\
|
||||
for id in 202 203; do \
|
||||
if [ ! -r $(TARGET)/USB_FW.$$id.hex ]; then \
|
||||
ln -s USB_FW.201.hex $(TARGET)/USB_FW.$$id.hex;\
|
||||
fi; \
|
||||
done
|
||||
if [ ! -r $(TARGET)/FPGA_1161.203.hex ]; then \
|
||||
ln -s FPGA_1161.201.hex $(TARGET)/FPGA_1161.203.hex;\
|
||||
fi
|
||||
|
||||
|
||||
@@ -1408,6 +1408,17 @@ static inline short dahdi_txtone_nextsample(struct dahdi_chan *ss)
|
||||
/*! Maximum audio mask */
|
||||
#define DAHDI_FORMAT_AUDIO_MASK ((1 << 16) - 1)
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0)
|
||||
|
||||
/* DAHDI only was using the xxx_clear_bit variants. */
|
||||
#ifndef smp_mb__before_atomic
|
||||
#define smp_mb__before_atomic smp_mb__before_clear_bit
|
||||
#endif
|
||||
|
||||
#ifndef smp_mb__after_atomic
|
||||
#define smp_mb__after_atomic smp_mb__after_clear_bit
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
|
||||
#ifdef RHEL_RELEASE_VERSION
|
||||
#if RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(6, 5)
|
||||
@@ -1523,6 +1534,7 @@ static inline int strcasecmp(const char *s1, const char *s2)
|
||||
#endif /* 2.6.27 */
|
||||
#endif /* 2.6.31 */
|
||||
#endif /* 3.10.0 */
|
||||
#endif /* 3.16.0 */
|
||||
|
||||
#ifndef DEFINE_SPINLOCK
|
||||
#define DEFINE_SPINLOCK(x) spinlock_t x = SPIN_LOCK_UNLOCKED
|
||||
|
||||
Reference in New Issue
Block a user