svn commit: r210257 - head/sys/dev/bce

[ Available lists | Index of svn-src-all | Month of Jul 2010 | Week of 19 Jul 2010 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Pyun YongHyeon <yongari@FreeBSD.org>
Date
19 Jul 2010 21:13:07
Subject
svn commit: r210257 - head/sys/dev/bce
Message-ID
201007192113.o6JLD7TD084354@svn.freebsd.org


[ Hide this part ]
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);


Elapsed time: 0.126 seconds