aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sh_eth.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/sh_eth.c')
-rw-r--r--drivers/net/sh_eth.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c
index 7f8e514eb5e9..7b1882765a0c 100644
--- a/drivers/net/sh_eth.c
+++ b/drivers/net/sh_eth.c
@@ -687,6 +687,7 @@ static irqreturn_t sh_eth_interrupt(int irq, void *netdev)
687{ 687{
688 struct net_device *ndev = netdev; 688 struct net_device *ndev = netdev;
689 struct sh_eth_private *mdp = netdev_priv(ndev); 689 struct sh_eth_private *mdp = netdev_priv(ndev);
690 irqreturn_t ret = IRQ_NONE;
690 u32 ioaddr, boguscnt = RX_RING_SIZE; 691 u32 ioaddr, boguscnt = RX_RING_SIZE;
691 u32 intr_status = 0; 692 u32 intr_status = 0;
692 693
@@ -696,7 +697,13 @@ static irqreturn_t sh_eth_interrupt(int irq, void *netdev)
696 /* Get interrpt stat */ 697 /* Get interrpt stat */
697 intr_status = ctrl_inl(ioaddr + EESR); 698 intr_status = ctrl_inl(ioaddr + EESR);
698 /* Clear interrupt */ 699 /* Clear interrupt */
699 ctrl_outl(intr_status, ioaddr + EESR); 700 if (intr_status & (EESR_FRC | EESR_RMAF | EESR_RRF |
701 EESR_RTLF | EESR_RTSF | EESR_PRE | EESR_CERF |
702 TX_CHECK | EESR_ERR_CHECK)) {
703 ctrl_outl(intr_status, ioaddr + EESR);
704 ret = IRQ_HANDLED;
705 } else
706 goto other_irq;
700 707
701 if (intr_status & (EESR_FRC | /* Frame recv*/ 708 if (intr_status & (EESR_FRC | /* Frame recv*/
702 EESR_RMAF | /* Multi cast address recv*/ 709 EESR_RMAF | /* Multi cast address recv*/
@@ -723,9 +730,10 @@ static irqreturn_t sh_eth_interrupt(int irq, void *netdev)
723 ndev->name, intr_status); 730 ndev->name, intr_status);
724 } 731 }
725 732
733other_irq:
726 spin_unlock(&mdp->lock); 734 spin_unlock(&mdp->lock);
727 735
728 return IRQ_HANDLED; 736 return ret;
729} 737}
730 738
731static void sh_eth_timer(unsigned long data) 739static void sh_eth_timer(unsigned long data)
@@ -844,7 +852,13 @@ static int sh_eth_open(struct net_device *ndev)
844 int ret = 0; 852 int ret = 0;
845 struct sh_eth_private *mdp = netdev_priv(ndev); 853 struct sh_eth_private *mdp = netdev_priv(ndev);
846 854
847 ret = request_irq(ndev->irq, &sh_eth_interrupt, 0, ndev->name, ndev); 855 ret = request_irq(ndev->irq, &sh_eth_interrupt,
856#if defined(CONFIG_CPU_SUBTYPE_SH7763) || defined(CONFIG_CPU_SUBTYPE_SH7764)
857 IRQF_SHARED,
858#else
859 0,
860#endif
861 ndev->name, ndev);
848 if (ret) { 862 if (ret) {
849 printk(KERN_ERR "Can not assign IRQ number to %s\n", CARDNAME); 863 printk(KERN_ERR "Can not assign IRQ number to %s\n", CARDNAME);
850 return ret; 864 return ret;