From patchwork Mon Oct 20 11:54:12 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brice Goglin X-Patchwork-Id: 5064 X-Patchwork-Delegate: jgarzik@pobox.com Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 045D8DDDEE for ; Mon, 20 Oct 2008 22:54:16 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751830AbYJTLyN (ORCPT ); Mon, 20 Oct 2008 07:54:13 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751937AbYJTLyM (ORCPT ); Mon, 20 Oct 2008 07:54:12 -0400 Received: from mailbox2.myri.com ([64.172.73.26]:1945 "EHLO myri.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751956AbYJTLyL (ORCPT ); Mon, 20 Oct 2008 07:54:11 -0400 Received: from [172.31.134.203] (brice-ovpn.sw.myri.com [172.31.134.203]) by myri.com (8.13.7+Sun/8.13.7) with ESMTP id m9KBqO11002471; Mon, 20 Oct 2008 04:52:25 -0700 (PDT) Message-ID: <48FC7164.8040002@myri.com> Date: Mon, 20 Oct 2008 13:54:12 +0200 From: Brice Goglin User-Agent: Mozilla-Thunderbird 2.0.0.16 (X11/20080724) MIME-Version: 1.0 To: Jeff Garzik CC: netdev@vger.kernel.org Subject: [PATCH] myri10ge: disable NAPI on failure to setup the interface X-Enigmail-Version: 0.95.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Disable NAPI if a failure occurs when setting up the interface. Leaving it enabled could cause a BUG the next time an ifconfig up is issued. Signed-off-by: Brice Goglin --- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- linux-2.6/drivers/net/myri10ge/myri10ge.c 2008-10-20 08:36:48.000000000 +0200 +++ linux-tmp/drivers/net/myri10ge/myri10ge.c 2008-10-20 13:47:21.000000000 +0200 @@ -75,7 +75,7 @@ #include "myri10ge_mcp.h" #include "myri10ge_mcp_gen_header.h" -#define MYRI10GE_VERSION_STR "1.4.3-1.369" +#define MYRI10GE_VERSION_STR "1.4.3-1.371" MODULE_DESCRIPTION("Myricom 10G driver (10GbE)"); MODULE_AUTHOR("Maintainer: help@myri.com"); @@ -2497,6 +2497,10 @@ static int myri10ge_open(struct net_devi return 0; abort_with_rings: + while (slice) { + slice--; + napi_disable(&mgp->ss[slice].napi); + } for (i = 0; i < mgp->num_slices; i++) myri10ge_free_rings(&mgp->ss[i]);