changeset 12830:ebcd04af6c4a

6944756 igb driver does NOT resume correctly on X4270 M2
author Crisson Guanghao Hu <Crisson.Hu@Sun.COM>
date Wed, 14 Jul 2010 11:09:04 +0800
parents 0336e913b141
children b9f8177eb4e2
files usr/src/uts/common/io/igb/igb_main.c
diffstat 1 files changed, 19 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/uts/common/io/igb/igb_main.c	Tue Jul 13 16:34:04 2010 -0600
+++ b/usr/src/uts/common/io/igb/igb_main.c	Wed Jul 14 11:09:04 2010 +0800
@@ -30,7 +30,7 @@
 #include "igb_sw.h"
 
 static char ident[] = "Intel 1Gb Ethernet";
-static char igb_version[] = "igb 1.1.15";
+static char igb_version[] = "igb 1.1.16";
 
 /*
  * Local function protoypes
@@ -1055,6 +1055,17 @@
 
 	mutex_enter(&igb->gen_lock);
 
+	/*
+	 * Enable interrupts
+	 */
+	if (igb->attach_progress & ATTACH_PROGRESS_ENABLE_INTR) {
+		if (igb_enable_intrs(igb) != IGB_SUCCESS) {
+			igb_error(igb, "Failed to enable DDI interrupts");
+			mutex_exit(&igb->gen_lock);
+			return (DDI_FAILURE);
+		}
+	}
+
 	if (igb->igb_state & IGB_STARTED) {
 		if (igb_start(igb, B_FALSE) != IGB_SUCCESS) {
 			mutex_exit(&igb->gen_lock);
@@ -1087,6 +1098,13 @@
 
 	atomic_or_32(&igb->igb_state, IGB_SUSPENDED);
 
+	/*
+	 * Disable interrupts
+	 */
+	if (igb->attach_progress & ATTACH_PROGRESS_ENABLE_INTR) {
+		(void) igb_disable_intrs(igb);
+	}
+
 	if (!(igb->igb_state & IGB_STARTED)) {
 		mutex_exit(&igb->gen_lock);
 		return (DDI_SUCCESS);