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>
This commit is contained in:
parent
64a98af676
commit
8cd0823978
@ -543,8 +543,7 @@ static int __devinit tor2_probe(struct pci_dev *pdev, const struct pci_device_id
|
|||||||
for (x = 0; x < 256; x++)
|
for (x = 0; x < 256; x++)
|
||||||
writel(0x7f7f7f7f, &tor->mem32[x]);
|
writel(0x7f7f7f7f, &tor->mem32[x]);
|
||||||
|
|
||||||
if (request_irq(tor->irq, tor2_intr,
|
if (request_irq(tor->irq, tor2_intr, IRQF_SHARED, "tor2", tor)) {
|
||||||
IRQF_SHARED | IRQF_DISABLED, "tor2", tor)) {
|
|
||||||
printk(KERN_ERR "Unable to request tormenta IRQ %d\n", tor->irq);
|
printk(KERN_ERR "Unable to request tormenta IRQ %d\n", tor->irq);
|
||||||
goto err_out_release_all;
|
goto err_out_release_all;
|
||||||
}
|
}
|
||||||
@ -1201,6 +1200,7 @@ DAHDI_IRQ_HANDLER(tor2_intr)
|
|||||||
unsigned char c, rxc;
|
unsigned char c, rxc;
|
||||||
unsigned char abits, bbits;
|
unsigned char abits, bbits;
|
||||||
struct tor2 *tor = (struct tor2 *) dev_id;
|
struct tor2 *tor = (struct tor2 *) dev_id;
|
||||||
|
unsigned long flags;
|
||||||
|
|
||||||
/* make sure its a real interrupt for us */
|
/* make sure its a real interrupt for us */
|
||||||
if (!(readb(&tor->mem8[STATREG]) & INTACTIVE)) /* if not, just return */
|
if (!(readb(&tor->mem8[STATREG]) & INTACTIVE)) /* if not, just return */
|
||||||
@ -1208,6 +1208,8 @@ DAHDI_IRQ_HANDLER(tor2_intr)
|
|||||||
return IRQ_NONE;
|
return IRQ_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local_irq_save(flags);
|
||||||
|
|
||||||
if (tor->cardtype == TYPE_E1) {
|
if (tor->cardtype == TYPE_E1) {
|
||||||
/* set outbit, interrupt enable, and ack interrupt */
|
/* set outbit, interrupt enable, and ack interrupt */
|
||||||
writeb(OUTBIT | INTENA | INTACK | E1DIV | tor->master,
|
writeb(OUTBIT | INTENA | INTACK | E1DIV | tor->master,
|
||||||
@ -1505,6 +1507,8 @@ DAHDI_IRQ_HANDLER(tor2_intr)
|
|||||||
else
|
else
|
||||||
/* clear OUTBIT and enable interrupts */
|
/* clear OUTBIT and enable interrupts */
|
||||||
writeb(INTENA | tor->master, &tor->mem8[CTLREG]);
|
writeb(INTENA | tor->master, &tor->mem8[CTLREG]);
|
||||||
|
|
||||||
|
local_irq_restore(flags);
|
||||||
return IRQ_RETVAL(1);
|
return IRQ_RETVAL(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2953,6 +2953,7 @@ DAHDI_IRQ_HANDLER(b4xxp_interrupt)
|
|||||||
{
|
{
|
||||||
struct b4xxp *b4 = dev_id;
|
struct b4xxp *b4 = dev_id;
|
||||||
unsigned char status;
|
unsigned char status;
|
||||||
|
unsigned long flags;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* Make sure it's really for us */
|
/* Make sure it's really for us */
|
||||||
@ -2966,6 +2967,8 @@ DAHDI_IRQ_HANDLER(b4xxp_interrupt)
|
|||||||
* That way if we get behind, we don't lose anything.
|
* 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.
|
* 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) {
|
if (status & V_FR_IRQSTA) {
|
||||||
b4->fifo_irqstatus[0] |= __pci_in8(b4, R_IRQ_FIFO_BL0);
|
b4->fifo_irqstatus[0] |= __pci_in8(b4, R_IRQ_FIFO_BL0);
|
||||||
b4->fifo_irqstatus[1] |= __pci_in8(b4, R_IRQ_FIFO_BL1);
|
b4->fifo_irqstatus[1] |= __pci_in8(b4, R_IRQ_FIFO_BL1);
|
||||||
@ -3001,6 +3004,8 @@ DAHDI_IRQ_HANDLER(b4xxp_interrupt)
|
|||||||
/* tasklet_hi_schedule(&b4->b4xxp_tlet); */
|
/* tasklet_hi_schedule(&b4->b4xxp_tlet); */
|
||||||
b4xxp_bottom_half((unsigned long)b4);
|
b4xxp_bottom_half((unsigned long)b4);
|
||||||
|
|
||||||
|
local_irq_restore(flags);
|
||||||
|
|
||||||
return IRQ_RETVAL(1);
|
return IRQ_RETVAL(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3354,8 +3359,7 @@ static int __devinit b4xx_probe(struct pci_dev *pdev, const struct pci_device_id
|
|||||||
|
|
||||||
create_sysfs_files(b4);
|
create_sysfs_files(b4);
|
||||||
|
|
||||||
if (request_irq(pdev->irq, b4xxp_interrupt,
|
if (request_irq(pdev->irq, b4xxp_interrupt, IRQF_SHARED, "b4xxp", b4)) {
|
||||||
IRQF_SHARED | IRQF_DISABLED, "b4xxp", b4)) {
|
|
||||||
dev_err(&b4->pdev->dev, "Unable to request IRQ %d\n",
|
dev_err(&b4->pdev->dev, "Unable to request IRQ %d\n",
|
||||||
pdev->irq);
|
pdev->irq);
|
||||||
ret = -EIO;
|
ret = -EIO;
|
||||||
|
@ -1174,6 +1174,8 @@ DAHDI_IRQ_HANDLER(t1xxp_interrupt)
|
|||||||
if (!ints)
|
if (!ints)
|
||||||
return IRQ_NONE;
|
return IRQ_NONE;
|
||||||
|
|
||||||
|
local_irq_save(flags);
|
||||||
|
|
||||||
outb(ints, wc->ioaddr + WC_INTSTAT);
|
outb(ints, wc->ioaddr + WC_INTSTAT);
|
||||||
|
|
||||||
if (!wc->intcount) {
|
if (!wc->intcount) {
|
||||||
@ -1188,13 +1190,13 @@ DAHDI_IRQ_HANDLER(t1xxp_interrupt)
|
|||||||
t1xxp_receiveprep(wc, ints);
|
t1xxp_receiveprep(wc, ints);
|
||||||
t1xxp_transmitprep(wc, ints);
|
t1xxp_transmitprep(wc, ints);
|
||||||
}
|
}
|
||||||
spin_lock_irqsave(&wc->lock, flags);
|
spin_lock(&wc->lock);
|
||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
__handle_leds(wc);
|
__handle_leds(wc);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
spin_unlock_irqrestore(&wc->lock, flags);
|
spin_unlock(&wc->lock);
|
||||||
|
|
||||||
/* Count down timers */
|
/* Count down timers */
|
||||||
t1xxp_do_counters(wc);
|
t1xxp_do_counters(wc);
|
||||||
@ -1220,6 +1222,8 @@ DAHDI_IRQ_HANDLER(t1xxp_interrupt)
|
|||||||
if (ints & 0x20)
|
if (ints & 0x20)
|
||||||
printk(KERN_INFO "PCI Target abort\n");
|
printk(KERN_INFO "PCI Target abort\n");
|
||||||
|
|
||||||
|
local_irq_restore(flags);
|
||||||
|
|
||||||
return IRQ_RETVAL(1);
|
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 */
|
/* Keep track of which device we are */
|
||||||
pci_set_drvdata(pdev, wc);
|
pci_set_drvdata(pdev, wc);
|
||||||
|
|
||||||
if (request_irq(pdev->irq, t1xxp_interrupt,
|
if (request_irq(pdev->irq, t1xxp_interrupt, IRQF_SHARED, "t1xxp", wc)) {
|
||||||
IRQF_SHARED | IRQF_DISABLED, "t1xxp", wc)) {
|
|
||||||
printk(KERN_NOTICE "t1xxp: Unable to request IRQ %d\n", pdev->irq);
|
printk(KERN_NOTICE "t1xxp: Unable to request IRQ %d\n", pdev->irq);
|
||||||
kfree(wc);
|
kfree(wc);
|
||||||
return -EIO;
|
return -EIO;
|
||||||
|
@ -1351,6 +1351,8 @@ DAHDI_IRQ_HANDLER(t1xxp_interrupt)
|
|||||||
if (!ints)
|
if (!ints)
|
||||||
return IRQ_NONE;
|
return IRQ_NONE;
|
||||||
|
|
||||||
|
local_irq_save(flags);
|
||||||
|
|
||||||
outb(ints, wc->ioaddr + WC_INTSTAT);
|
outb(ints, wc->ioaddr + WC_INTSTAT);
|
||||||
|
|
||||||
if (!wc->intcount) {
|
if (!wc->intcount) {
|
||||||
@ -1365,13 +1367,13 @@ DAHDI_IRQ_HANDLER(t1xxp_interrupt)
|
|||||||
t1xxp_receiveprep(wc, ints);
|
t1xxp_receiveprep(wc, ints);
|
||||||
t1xxp_transmitprep(wc, ints);
|
t1xxp_transmitprep(wc, ints);
|
||||||
}
|
}
|
||||||
spin_lock_irqsave(&wc->lock, flags);
|
spin_lock(&wc->lock);
|
||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
__handle_leds(wc);
|
__handle_leds(wc);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
spin_unlock_irqrestore(&wc->lock, flags);
|
spin_unlock(&wc->lock);
|
||||||
|
|
||||||
/* Count down timers */
|
/* Count down timers */
|
||||||
t1_do_counters(wc);
|
t1_do_counters(wc);
|
||||||
@ -1398,6 +1400,7 @@ DAHDI_IRQ_HANDLER(t1xxp_interrupt)
|
|||||||
if (ints & 0x20)
|
if (ints & 0x20)
|
||||||
printk(KERN_NOTICE "PCI Target abort\n");
|
printk(KERN_NOTICE "PCI Target abort\n");
|
||||||
|
|
||||||
|
local_irq_restore(flags);
|
||||||
return IRQ_RETVAL(1);
|
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);
|
pci_set_drvdata(pdev, wc);
|
||||||
|
|
||||||
if (request_irq(pdev->irq, t1xxp_interrupt,
|
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);
|
printk(KERN_NOTICE "wcte11xp: Unable to request IRQ %d\n", pdev->irq);
|
||||||
kfree(wc);
|
kfree(wc);
|
||||||
return -EIO;
|
return -EIO;
|
||||||
|
Loading…
Reference in New Issue
Block a user