netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@osdl.org>
To: netdev@vger.kernel.org
Subject: [PATCH 4/8] sky2: name irq after eth for irqbalance
Date: Tue, 26 Sep 2006 16:11:34 -0700	[thread overview]
Message-ID: <20060926161134.4bb4071b@freekitty> (raw)
In-Reply-To: <20060926160814.79750148@freekitty>

Use the ethernet device name when requesting the irq because the
irqbalance daemon looks for the name when deciding policy.
Better to play along with this dubious heuristic.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>

---
 drivers/net/sky2.c |   37 ++++++++++++++++---------------------
 1 file changed, 16 insertions(+), 21 deletions(-)

--- netdev-2.6.orig/drivers/net/sky2.c	2006-09-25 15:23:13.000000000 -0700
+++ netdev-2.6/drivers/net/sky2.c	2006-09-25 15:23:16.000000000 -0700
@@ -3349,6 +3349,14 @@
 	if (!dev)
 		goto err_out_free_pci;
 
+	if (!disable_msi && pci_enable_msi(pdev) == 0) {
+		err = sky2_test_msi(hw);
+		if (err == -EOPNOTSUPP)
+ 			pci_disable_msi(pdev);
+		else if (err)
+			goto err_out_free_netdev;
+ 	}
+
 	err = register_netdev(dev);
 	if (err) {
 		printk(KERN_ERR PFX "%s: cannot register net device\n",
@@ -3356,6 +3364,14 @@
 		goto err_out_free_netdev;
 	}
 
+	err = request_irq(pdev->irq,  sky2_intr, IRQF_SHARED, dev->name, hw);
+	if (err) {
+		printk(KERN_ERR PFX "%s: cannot assign irq %d\n",
+		       pci_name(pdev), pdev->irq);
+		goto err_out_unregister;
+	}
+	sky2_write32(hw, B0_IMSK, Y2_IS_BASE);
+
 	sky2_show_addr(dev);
 
 	if (hw->ports > 1 && (dev1 = sky2_init_netdev(hw, 1, using_dac))) {
@@ -3370,23 +3386,6 @@
 		}
 	}
 
-	if (!disable_msi && pci_enable_msi(pdev) == 0) {
-		err = sky2_test_msi(hw);
-		if (err == -EOPNOTSUPP)
- 			pci_disable_msi(pdev);
-		else if (err)
-			goto err_out_unregister;
- 	}
-
-	err = request_irq(pdev->irq,  sky2_intr, IRQF_SHARED, DRV_NAME, hw);
-	if (err) {
-		printk(KERN_ERR PFX "%s: cannot assign irq %d\n",
-		       pci_name(pdev), pdev->irq);
-		goto err_out_unregister;
-	}
-
-	sky2_write32(hw, B0_IMSK, Y2_IS_BASE);
-
 	setup_timer(&hw->idle_timer, sky2_idle, (unsigned long) hw);
 	sky2_idle_start(hw);
 
@@ -3396,10 +3395,6 @@
 
 err_out_unregister:
 	pci_disable_msi(pdev);
-	if (dev1) {
-		unregister_netdev(dev1);
-		free_netdev(dev1);
-	}
 	unregister_netdev(dev);
 err_out_free_netdev:
 	free_netdev(dev);

  parent reply	other threads:[~2006-09-26 23:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20060926160814.79750148@freekitty>
2006-09-26 23:09 ` [PATCH 2/8] sky2: use standard pci register capabilties for error register Stephen Hemminger
2006-09-26 23:10 ` [PATCH 3/8] sky2: workarounds for some 88e806x chips Stephen Hemminger
2006-09-26 23:11 ` Stephen Hemminger [this message]
2006-09-26 23:13 ` [PATCH 6/8] sky2: use netif_tx_lock instead of LLTX Stephen Hemminger
2006-09-26 23:14 ` [PATCH 5/8] sky2: incremental transmit completion Stephen Hemminger
2006-09-26 23:15 ` [PATCH 7/8] sky2: fragmented receive for large MTU Stephen Hemminger
2006-09-26 23:16 ` [PATCH 8/8] " Stephen Hemminger

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=20060926161134.4bb4071b@freekitty \
    --to=shemminger@osdl.org \
    --cc=netdev@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).