diff options
Diffstat (limited to 'drivers/net/niu.c')
-rw-r--r-- | drivers/net/niu.c | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/drivers/net/niu.c b/drivers/net/niu.c index a8d10630f804..f368e7472133 100644 --- a/drivers/net/niu.c +++ b/drivers/net/niu.c | |||
@@ -5847,17 +5847,42 @@ static void niu_stop_hw(struct niu *np) | |||
5847 | niu_reset_rx_channels(np); | 5847 | niu_reset_rx_channels(np); |
5848 | } | 5848 | } |
5849 | 5849 | ||
5850 | static void niu_set_irq_name(struct niu *np) | ||
5851 | { | ||
5852 | int port = np->port; | ||
5853 | int i, j = 1; | ||
5854 | |||
5855 | sprintf(np->irq_name[0], "%s:MAC", np->dev->name); | ||
5856 | |||
5857 | if (port == 0) { | ||
5858 | sprintf(np->irq_name[1], "%s:MIF", np->dev->name); | ||
5859 | sprintf(np->irq_name[2], "%s:SYSERR", np->dev->name); | ||
5860 | j = 3; | ||
5861 | } | ||
5862 | |||
5863 | for (i = 0; i < np->num_ldg - j; i++) { | ||
5864 | if (i < np->num_rx_rings) | ||
5865 | sprintf(np->irq_name[i+j], "%s-rx-%d", | ||
5866 | np->dev->name, i); | ||
5867 | else if (i < np->num_tx_rings + np->num_rx_rings) | ||
5868 | sprintf(np->irq_name[i+j], "%s-tx-%d", np->dev->name, | ||
5869 | i - np->num_rx_rings); | ||
5870 | } | ||
5871 | } | ||
5872 | |||
5850 | static int niu_request_irq(struct niu *np) | 5873 | static int niu_request_irq(struct niu *np) |
5851 | { | 5874 | { |
5852 | int i, j, err; | 5875 | int i, j, err; |
5853 | 5876 | ||
5877 | niu_set_irq_name(np); | ||
5878 | |||
5854 | err = 0; | 5879 | err = 0; |
5855 | for (i = 0; i < np->num_ldg; i++) { | 5880 | for (i = 0; i < np->num_ldg; i++) { |
5856 | struct niu_ldg *lp = &np->ldg[i]; | 5881 | struct niu_ldg *lp = &np->ldg[i]; |
5857 | 5882 | ||
5858 | err = request_irq(lp->irq, niu_interrupt, | 5883 | err = request_irq(lp->irq, niu_interrupt, |
5859 | IRQF_SHARED | IRQF_SAMPLE_RANDOM, | 5884 | IRQF_SHARED | IRQF_SAMPLE_RANDOM, |
5860 | np->dev->name, lp); | 5885 | np->irq_name[i], lp); |
5861 | if (err) | 5886 | if (err) |
5862 | goto out_free_irqs; | 5887 | goto out_free_irqs; |
5863 | 5888 | ||