From: Paul Chavent <paul.chavent@fnac.net>
To: unlisted-recipients:; (no To-header on input)
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
eric.dumazet@gmail.com, jkosina@suse.cz,
richard.cochran@omicron.at, jpirko@redhat.com,
davem@davemloft.net, nicolas.ferre@atmel.com
Subject: [PATCH] arm driver net macb
Date: Thu, 02 Sep 2010 22:40:15 +0200 [thread overview]
Message-ID: <4C800BAF.2090003@fnac.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 292 bytes --]
When listing processes on a system with SOFT/HARD_IRQ enabled, the name of the ethernet device is [irq/eth%d] (instead of [irq/eth0] for example).
This patch call the request_irq function after having initialized the name of the device.
Signed-off-by: Paul Chavent <paul.chavent@fnac.net>
[-- Attachment #2: linux-2.6.35.4-arm_at91_ethname.patch --]
[-- Type: text/plain, Size: 1907 bytes --]
diff -abBruN linux-2.6.35.4.orig/drivers/net/macb.c linux-2.6.35.4.mod/drivers/net/macb.c
--- linux-2.6.35.4.orig/drivers/net/macb.c 2010-09-02 17:35:18.422000143 +0200
+++ linux-2.6.35.4.mod/drivers/net/macb.c 2010-09-02 18:02:37.078000147 +0200
@@ -1165,16 +1242,6 @@
goto err_out_disable_clocks;
}
- dev->irq = platform_get_irq(pdev, 0);
- err = request_irq(dev->irq, macb_interrupt, IRQF_SAMPLE_RANDOM,
- dev->name, dev);
- if (err) {
- printk(KERN_ERR
- "%s: Unable to request IRQ %d (error %d)\n",
- dev->name, dev->irq, err);
- goto err_out_iounmap;
- }
-
dev->netdev_ops = &macb_netdev_ops;
netif_napi_add(dev, &bp->napi, macb_poll, 64);
dev->ethtool_ops = &macb_ethtool_ops;
@@ -1214,13 +1281,23 @@
err = register_netdev(dev);
if (err) {
dev_err(&pdev->dev, "Cannot register net device, aborting.\n");
- goto err_out_free_irq;
+ goto err_out_iounmap;
}
if (macb_mii_init(bp) != 0) {
goto err_out_unregister_netdev;
}
+ dev->irq = platform_get_irq(pdev, 0);
+ err = request_irq(dev->irq, macb_interrupt, IRQF_SAMPLE_RANDOM,
+ dev->name, dev);
+ if (err) {
+ printk(KERN_ERR
+ "%s: Unable to request IRQ %d (error %d)\n",
+ dev->name, dev->irq, err);
+ goto err_out_unregister_netdev;
+ }
+
platform_set_drvdata(pdev, dev);
printk(KERN_INFO "%s: Atmel MACB at 0x%08lx irq %d (%pM)\n",
@@ -1233,10 +1310,10 @@
return 0;
-err_out_unregister_netdev:
- unregister_netdev(dev);
err_out_free_irq:
free_irq(dev->irq, dev);
+err_out_unregister_netdev:
+ unregister_netdev(dev);
err_out_iounmap:
iounmap(bp->regs);
err_out_disable_clocks:
@@ -1270,8 +1347,8 @@
mdiobus_unregister(bp->mii_bus);
kfree(bp->mii_bus->irq);
mdiobus_free(bp->mii_bus);
- unregister_netdev(dev);
free_irq(dev->irq, dev);
+ unregister_netdev(dev);
iounmap(bp->regs);
#ifndef CONFIG_ARCH_AT91
clk_disable(bp->hclk);
next reply other threads:[~2010-09-02 20:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-02 20:40 Paul Chavent [this message]
2010-09-03 13:41 ` [PATCH] arm driver net macb Nicolas Ferre
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C800BAF.2090003@fnac.net \
--to=paul.chavent@fnac.net \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=jkosina@suse.cz \
--cc=jpirko@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nicolas.ferre@atmel.com \
--cc=richard.cochran@omicron.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.