diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-23 12:25:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-23 12:25:58 -0400 |
commit | d56ffd38a93841a07c839a375049a56b51e9567c (patch) | |
tree | ac668709aa6f973de26e993f21adcf98626bed46 /drivers/net/sh_eth.c | |
parent | 12a37b5e2c93f6550b82490c3de6d4eedc509c39 (diff) | |
parent | 61fa9dcf9329cb92c220f7b656410fbe5e72f933 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (32 commits)
ucc_geth: Fix oops when using fixed-link support
dm9000: locking bugfix
net: update dnet.c for bus_id removal
dnet: DNET should depend on HAS_IOMEM
dca: add missing copyright/license headers
nl80211: Check that function pointer != NULL before using it
sungem: missing net_device_ops
be2net: fix to restore vlan ids into BE2 during a IF DOWN->UP cycle
be2net: replenish when posting to rx-queue is starved in out of mem conditions
bas_gigaset: correctly allocate USB interrupt transfer buffer
smsc911x: reset last known duplex and carrier on open
sh_eth: Fix mistake of the address of SH7763
sh_eth: Change handling of IRQ
netns: oops in ip[6]_frag_reasm incrementing stats
net: kfree(napi->skb) => kfree_skb
net: fix sctp breakage
ipv6: fix display of local and remote sit endpoints
net: Document /proc/sys/net/core/netdev_budget
tulip: fix crash on iface up with shirq debug
virtio_net: Make virtio_net support carrier detection
...
Diffstat (limited to 'drivers/net/sh_eth.c')
-rw-r--r-- | drivers/net/sh_eth.c | 20 |
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 | ||
733 | other_irq: | ||
726 | spin_unlock(&mdp->lock); | 734 | spin_unlock(&mdp->lock); |
727 | 735 | ||
728 | return IRQ_HANDLED; | 736 | return ret; |
729 | } | 737 | } |
730 | 738 | ||
731 | static void sh_eth_timer(unsigned long data) | 739 | static 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; |