ehea: Fix a DLPAR bug on ehea_rereg_mrs().
authorBreno Leitao <leitao@linux.vnet.ibm.com>
Tue, 19 Apr 2011 09:39:22 +0000 (09:39 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Apr 2011 08:41:26 +0000 (01:41 -0700)
We are currently continuing if ehea_restart_qps() fails, when we
do a memory DLPAR (remove or add more memory to the system).

This patch just let the NAPI disabled if the ehea_restart_qps()
fails.

Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ehea/ehea_main.c

index f75d3144b8a508e9668c48be6592eff49fbb7e3f..53c0f04b1b2322ccee9c53e19e71f5321e81cb8a 100644 (file)
@@ -3040,11 +3040,14 @@ static void ehea_rereg_mrs(void)
 
                                        if (dev->flags & IFF_UP) {
                                                mutex_lock(&port->port_lock);
-                                               port_napi_enable(port);
                                                ret = ehea_restart_qps(dev);
-                                               check_sqs(port);
-                                               if (!ret)
+                                               if (!ret) {
+                                                       check_sqs(port);
+                                                       port_napi_enable(port);
                                                        netif_wake_queue(dev);
+                                               } else {
+                                                       netdev_err(dev, "Unable to restart QPS\n");
+                                               }
                                                mutex_unlock(&port->port_lock);
                                        }
                                }