From owner-svn-src-all@FreeBSD.ORG Mon Jul 19 21:13:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9D531065674; Mon, 19 Jul 2010 21:13:07 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9A96D8FC13; Mon, 19 Jul 2010 21:13:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JLD7Qi084356; Mon, 19 Jul 2010 21:13:07 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JLD7TD084354; Mon, 19 Jul 2010 21:13:07 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201007192113.o6JLD7TD084354@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 19 Jul 2010 21:13:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210257 - head/sys/dev/bce X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 21:13:07 -0000 Author: yongari Date: Mon Jul 19 21:13:07 2010 New Revision: 210257 URL: http://svn.freebsd.org/changeset/base/210257 Log: When we didn't find a matching flash device, do not touch flash config data. While I'm here, use return code of bce_init_nvram() to set error instead of directly setting ENODEV. Reviewed by: davidch Modified: head/sys/dev/bce/if_bce.c Modified: head/sys/dev/bce/if_bce.c ============================================================================== --- head/sys/dev/bce/if_bce.c Mon Jul 19 20:31:04 2010 (r210256) +++ head/sys/dev/bce/if_bce.c Mon Jul 19 21:13:07 2010 (r210257) @@ -2264,7 +2264,8 @@ bce_init_nvram(struct bce_softc *sc) sc->bce_flash_info = NULL; BCE_PRINTF("%s(%d): Unknown Flash NVRAM found!\n", __FILE__, __LINE__); - rc = ENODEV; + DBEXIT(BCE_VERBOSE_NVRAM); + return (ENODEV); } bce_init_nvram_get_flash_size: @@ -4796,10 +4797,8 @@ bce_chipinit(struct bce_softc *sc) } /* Prepare NVRAM for access. */ - if (bce_init_nvram(sc)) { - rc = ENODEV; + if ((rc = bce_init_nvram(sc)) != 0) goto bce_chipinit_exit; - } /* Set the kernel bypass block size */ val = REG_RD(sc, BCE_MQ_CONFIG);