dahdi: Remove IRQF_DISABLED.

The IRQF_DISABLED flag was removed in 4.1 in commit
"genirq: Remove the deprecated 'IRQF_DISABLED' request_irq() flag entirely" [1].

By default all interrupt handlers are now run with interrupts disabled and
therefore should all be considered "fast interrupts". Any driver that was still
using the flag will now lock interrupts directly in the handler in case running
on an older kernel that is not disabling interrupts when running the handler.

[1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=d8bf368d0631d4bc2612d8bf2e4e8e74e620d0cc

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
(cherry picked from commit 8cd0823978)
This commit is contained in:
Shaun Ruffell 2015-04-20 11:07:11 -05:00 committed by Russ Meyerriecks
parent f56b748f73
commit 5aaaaf9d2f
4 changed files with 25 additions and 11 deletions

View File

@ -543,8 +543,7 @@ static int __devinit tor2_probe(struct pci_dev *pdev, const struct pci_device_id
for (x = 0; x < 256; x++)
writel(0x7f7f7f7f, &tor->mem32[x]);
if (request_irq(tor->irq, tor2_intr,
IRQF_SHARED | IRQF_DISABLED, "tor2", tor)) {
if (request_irq(tor->irq, tor2_intr, IRQF_SHARED, "tor2", tor)) {
printk(KERN_ERR "Unable to request tormenta IRQ %d\n", tor->irq);
goto err_out_release_all;
}
@ -1201,6 +1200,7 @@ DAHDI_IRQ_HANDLER(tor2_intr)
unsigned char c, rxc;
unsigned char abits, bbits;
struct tor2 *tor = (struct tor2 *) dev_id;
unsigned long flags;
/* make sure its a real interrupt for us */
if (!(readb(&tor->mem8[STATREG]) & INTACTIVE)) /* if not, just return */
@ -1208,6 +1208,8 @@ DAHDI_IRQ_HANDLER(tor2_intr)
return IRQ_NONE;
}
local_irq_save(flags);
if (tor->cardtype == TYPE_E1) {
/* set outbit, interrupt enable, and ack interrupt */
writeb(OUTBIT | INTENA | INTACK | E1DIV | tor->master,
@ -1505,6 +1507,8 @@ DAHDI_IRQ_HANDLER(tor2_intr)
else
/* clear OUTBIT and enable interrupts */
writeb(INTENA | tor->master, &tor->mem8[CTLREG]);
local_irq_restore(flags);
return IRQ_RETVAL(1);
}

View File

@ -2572,6 +2572,7 @@ DAHDI_IRQ_HANDLER(b4xxp_interrupt)
{
struct b4xxp *b4 = dev_id;
unsigned char status;
unsigned long flags;
int i;
/* Make sure it's really for us */
@ -2585,6 +2586,8 @@ DAHDI_IRQ_HANDLER(b4xxp_interrupt)
* That way if we get behind, we don't lose anything.
* We don't actually do any processing here, we simply flag the bottom-half to do the heavy lifting.
*/
local_irq_save(flags);
if (status & V_FR_IRQSTA) {
b4->fifo_irqstatus[0] |= __pci_in8(b4, R_IRQ_FIFO_BL0);
b4->fifo_irqstatus[1] |= __pci_in8(b4, R_IRQ_FIFO_BL1);
@ -2620,6 +2623,8 @@ DAHDI_IRQ_HANDLER(b4xxp_interrupt)
/* tasklet_hi_schedule(&b4->b4xxp_tlet); */
b4xxp_bottom_half((unsigned long)b4);
local_irq_restore(flags);
return IRQ_RETVAL(1);
}
@ -2951,8 +2956,7 @@ static int __devinit b4xx_probe(struct pci_dev *pdev, const struct pci_device_id
create_sysfs_files(b4);
if (request_irq(pdev->irq, b4xxp_interrupt,
IRQF_SHARED | IRQF_DISABLED, "b4xxp", b4)) {
if (request_irq(pdev->irq, b4xxp_interrupt, IRQF_SHARED, "b4xxp", b4)) {
dev_err(&b4->pdev->dev, "Unable to request IRQ %d\n",
pdev->irq);
ret = -EIO;

View File

@ -1174,6 +1174,8 @@ DAHDI_IRQ_HANDLER(t1xxp_interrupt)
if (!ints)
return IRQ_NONE;
local_irq_save(flags);
outb(ints, wc->ioaddr + WC_INTSTAT);
if (!wc->intcount) {
@ -1188,13 +1190,13 @@ DAHDI_IRQ_HANDLER(t1xxp_interrupt)
t1xxp_receiveprep(wc, ints);
t1xxp_transmitprep(wc, ints);
}
spin_lock_irqsave(&wc->lock, flags);
spin_lock(&wc->lock);
#if 1
__handle_leds(wc);
#endif
spin_unlock_irqrestore(&wc->lock, flags);
spin_unlock(&wc->lock);
/* Count down timers */
t1xxp_do_counters(wc);
@ -1220,6 +1222,8 @@ DAHDI_IRQ_HANDLER(t1xxp_interrupt)
if (ints & 0x20)
printk(KERN_INFO "PCI Target abort\n");
local_irq_restore(flags);
return IRQ_RETVAL(1);
}
@ -1333,8 +1337,7 @@ static int __devinit t1xxp_init_one(struct pci_dev *pdev, const struct pci_devic
/* Keep track of which device we are */
pci_set_drvdata(pdev, wc);
if (request_irq(pdev->irq, t1xxp_interrupt,
IRQF_SHARED | IRQF_DISABLED, "t1xxp", wc)) {
if (request_irq(pdev->irq, t1xxp_interrupt, IRQF_SHARED, "t1xxp", wc)) {
printk(KERN_NOTICE "t1xxp: Unable to request IRQ %d\n", pdev->irq);
kfree(wc);
return -EIO;

View File

@ -1351,6 +1351,8 @@ DAHDI_IRQ_HANDLER(t1xxp_interrupt)
if (!ints)
return IRQ_NONE;
local_irq_save(flags);
outb(ints, wc->ioaddr + WC_INTSTAT);
if (!wc->intcount) {
@ -1365,13 +1367,13 @@ DAHDI_IRQ_HANDLER(t1xxp_interrupt)
t1xxp_receiveprep(wc, ints);
t1xxp_transmitprep(wc, ints);
}
spin_lock_irqsave(&wc->lock, flags);
spin_lock(&wc->lock);
#if 1
__handle_leds(wc);
#endif
spin_unlock_irqrestore(&wc->lock, flags);
spin_unlock(&wc->lock);
/* Count down timers */
t1_do_counters(wc);
@ -1398,6 +1400,7 @@ DAHDI_IRQ_HANDLER(t1xxp_interrupt)
if (ints & 0x20)
printk(KERN_NOTICE "PCI Target abort\n");
local_irq_restore(flags);
return IRQ_RETVAL(1);
}
@ -1535,7 +1538,7 @@ static int __devinit t1xxp_init_one(struct pci_dev *pdev, const struct pci_devic
pci_set_drvdata(pdev, wc);
if (request_irq(pdev->irq, t1xxp_interrupt,
IRQF_SHARED | IRQF_DISABLED, "wcte11xp", wc)) {
IRQF_SHARED, "wcte11xp", wc)) {
printk(KERN_NOTICE "wcte11xp: Unable to request IRQ %d\n", pdev->irq);
kfree(wc);
return -EIO;