[ 3.5.y.z extended stable ] Patch "ixgbe: fix registration order of driver and DCA nofitication" has been added to staging queue

Luis Henriques luis.henriques at canonical.com
Thu Apr 11 09:09:07 UTC 2013


This is a note to let you know that I have just added a patch titled

    ixgbe: fix registration order of driver and DCA nofitication

to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.5.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Luis

------

>From c3a59b7c76c23976377671a439e24df5adc0c4e9 Mon Sep 17 00:00:00 2001
From: Jakub Kicinski <jakub.kicinski at intel.com>
Date: Wed, 3 Apr 2013 16:50:54 +0000
Subject: [PATCH] ixgbe: fix registration order of driver and DCA nofitication

commit f01fc1a82c2ee68726b400fadb156bd623b5f2f1 upstream.

ixgbe_notify_dca cannot be called before driver registration
because it expects driver's klist_devices to be allocated and
initialized. While on it make sure debugfs files are removed
when registration fails.

Signed-off-by: Jakub Kicinski <jakub.kicinski at intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt at intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher at intel.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
[ luis: backported to 3.5: removed debugfs code ]
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 7c0878f..ab8d882 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -7662,12 +7662,15 @@ static int __init ixgbe_init_module(void)
 	pr_info("%s - version %s\n", ixgbe_driver_string, ixgbe_driver_version);
 	pr_info("%s\n", ixgbe_copyright);

+	ret = pci_register_driver(&ixgbe_driver);
+	if (ret)
+		return ret;
+
 #ifdef CONFIG_IXGBE_DCA
 	dca_register_notify(&dca_notifier);
 #endif

-	ret = pci_register_driver(&ixgbe_driver);
-	return ret;
+	return 0;
 }

 module_init(ixgbe_init_module);
--
1.8.1.2





More information about the kernel-team mailing list