Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Jul 2010 21:13:07 +0000 (UTC)
From:      Pyun YongHyeon <yongari@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r210257 - head/sys/dev/bce
Message-ID:  <201007192113.o6JLD7TD084354@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007192113.o6JLD7TD084354>