Commit 2a9bc71e authored by Tony Zelenoff's avatar Tony Zelenoff Committed by David S. Miller

atl1: do not process interrupts in cycle in handler

As the rx/tx handled inside napi handler, the cycle is
not needed now, because only the rx/tx need such kind of
processing.
Signed-off-by: default avatarTony Zelenoff <antonz@parallels.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 73650f28
...@@ -2499,77 +2499,68 @@ static irqreturn_t atl1_intr(int irq, void *data) ...@@ -2499,77 +2499,68 @@ static irqreturn_t atl1_intr(int irq, void *data)
{ {
struct atl1_adapter *adapter = netdev_priv(data); struct atl1_adapter *adapter = netdev_priv(data);
u32 status; u32 status;
int max_ints = 10;
status = adapter->cmb.cmb->int_stats; status = adapter->cmb.cmb->int_stats;
if (!status) if (!status)
return IRQ_NONE; return IRQ_NONE;
do { /* clear CMB interrupt status at once */
/* clear CMB interrupt status at once */ adapter->cmb.cmb->int_stats = 0;
adapter->cmb.cmb->int_stats = 0;
if (status & ISR_GPHY) /* clear phy status */
atlx_clear_phy_int(adapter);
/* clear ISR status, and Enable CMB DMA/Disable Interrupt */ if (status & ISR_GPHY) /* clear phy status */
iowrite32(status | ISR_DIS_INT, adapter->hw.hw_addr + REG_ISR); atlx_clear_phy_int(adapter);
/* check if SMB intr */ /* clear ISR status, and Enable CMB DMA/Disable Interrupt */
if (status & ISR_SMB) iowrite32(status | ISR_DIS_INT, adapter->hw.hw_addr + REG_ISR);
atl1_inc_smb(adapter);
/* check if PCIE PHY Link down */ /* check if SMB intr */
if (status & ISR_PHY_LINKDOWN) { if (status & ISR_SMB)
if (netif_msg_intr(adapter)) atl1_inc_smb(adapter);
dev_printk(KERN_DEBUG, &adapter->pdev->dev,
"pcie phy link down %x\n", status);
if (netif_running(adapter->netdev)) { /* reset MAC */
atlx_irq_disable(adapter);
schedule_work(&adapter->pcie_dma_to_rst_task);
return IRQ_HANDLED;
}
}
/* check if DMA read/write error ? */ /* check if PCIE PHY Link down */
if (status & (ISR_DMAR_TO_RST | ISR_DMAW_TO_RST)) { if (status & ISR_PHY_LINKDOWN) {
if (netif_msg_intr(adapter)) if (netif_msg_intr(adapter))
dev_printk(KERN_DEBUG, &adapter->pdev->dev, dev_printk(KERN_DEBUG, &adapter->pdev->dev,
"pcie DMA r/w error (status = 0x%x)\n", "pcie phy link down %x\n", status);
status); if (netif_running(adapter->netdev)) { /* reset MAC */
atlx_irq_disable(adapter); atlx_irq_disable(adapter);
schedule_work(&adapter->pcie_dma_to_rst_task); schedule_work(&adapter->pcie_dma_to_rst_task);
return IRQ_HANDLED; return IRQ_HANDLED;
} }
}
/* link event */ /* check if DMA read/write error ? */
if (status & ISR_GPHY) { if (status & (ISR_DMAR_TO_RST | ISR_DMAW_TO_RST)) {
adapter->soft_stats.tx_carrier_errors++; if (netif_msg_intr(adapter))
atl1_check_for_link(adapter); dev_printk(KERN_DEBUG, &adapter->pdev->dev,
} "pcie DMA r/w error (status = 0x%x)\n",
status);
/* transmit or receive event */ atlx_irq_disable(adapter);
if (status & (ISR_CMB_TX | ISR_CMB_RX) && schedule_work(&adapter->pcie_dma_to_rst_task);
atl1_sched_rings_clean(adapter)) return IRQ_HANDLED;
break; }
/* rx exception */ /* link event */
if (unlikely(status & (ISR_RXF_OV | ISR_RFD_UNRUN | if (status & ISR_GPHY) {
ISR_RRD_OV | ISR_HOST_RFD_UNRUN | adapter->soft_stats.tx_carrier_errors++;
ISR_HOST_RRD_OV))) { atl1_check_for_link(adapter);
if (netif_msg_intr(adapter)) }
dev_printk(KERN_DEBUG,
&adapter->pdev->dev, /* transmit or receive event */
"rx exception, ISR = 0x%x\n", if (status & (ISR_CMB_TX | ISR_CMB_RX))
status); atl1_sched_rings_clean(adapter);
if (atl1_sched_rings_clean(adapter))
break; /* rx exception */
} if (unlikely(status & (ISR_RXF_OV | ISR_RFD_UNRUN |
ISR_RRD_OV | ISR_HOST_RFD_UNRUN |
if (--max_ints < 0) ISR_HOST_RRD_OV))) {
break; if (netif_msg_intr(adapter))
dev_printk(KERN_DEBUG,
} while ((status = adapter->cmb.cmb->int_stats)); &adapter->pdev->dev,
"rx exception, ISR = 0x%x\n",
status);
atl1_sched_rings_clean(adapter);
}
/* re-enable Interrupt */ /* re-enable Interrupt */
iowrite32(ISR_DIS_SMB | ISR_DIS_DMA, adapter->hw.hw_addr + REG_ISR); iowrite32(ISR_DIS_SMB | ISR_DIS_DMA, adapter->hw.hw_addr + REG_ISR);
......
...@@ -1100,6 +1100,10 @@ void handle_moddevtable(struct module *mod, struct elf_info *info, ...@@ -1100,6 +1100,10 @@ void handle_moddevtable(struct module *mod, struct elf_info *info,
if (!sym->st_shndx || get_secindex(info, sym) >= info->num_sections) if (!sym->st_shndx || get_secindex(info, sym) >= info->num_sections)
return; return;
/* We're looking for an object */
if (ELF_ST_TYPE(sym->st_info) != STT_OBJECT)
return;
/* All our symbols are of form <prefix>__mod_XXX_device_table. */ /* All our symbols are of form <prefix>__mod_XXX_device_table. */
name = strstr(symname, "__mod_"); name = strstr(symname, "__mod_");
if (!name) if (!name)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment