diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2014-03-07 22:39:09 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2014-03-07 22:39:09 +0000 |
commit | b549fc52d1799de74aa633aca4ef272480a95356 (patch) | |
tree | b2865a17154e35a0315dc99776570b0a19e3d931 /sys/dev/ic/qlw.c | |
parent | 4c26d533db46fd9ce60c0565529995ec30c8165c (diff) |
Make sure a SCSI initiator ID provided by Open Firmware overrides the value
read from nvram, just like we did for isp(4).
Diffstat (limited to 'sys/dev/ic/qlw.c')
-rw-r--r-- | sys/dev/ic/qlw.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/dev/ic/qlw.c b/sys/dev/ic/qlw.c index ddf602a839f..ed76ab3895f 100644 --- a/sys/dev/ic/qlw.c +++ b/sys/dev/ic/qlw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qlw.c,v 1.3 2014/03/07 22:17:02 kettenis Exp $ */ +/* $OpenBSD: qlw.c,v 1.4 2014/03/07 22:39:07 kettenis Exp $ */ /* * Copyright (c) 2011 David Gwynne <dlg@openbsd.org> @@ -1432,7 +1432,9 @@ qlw_parse_nvram_1040(struct qlw_softc *sc, int bus) KASSERT(bus == 0); - sc->sc_initiator[0] = (nv->config1 >> 4); + if (!ISSET(sc->sc_flags, QLW_FLAG_INITIATOR)) + sc->sc_initiator[0] = (nv->config1 >> 4); + sc->sc_retry_count[0] = nv->retry_count; sc->sc_retry_delay[0] = nv->retry_delay; sc->sc_reset_delay[0] = nv->reset_delay; @@ -1459,7 +1461,9 @@ qlw_parse_nvram_1080(struct qlw_softc *sc, int bus) struct qlw_nvram_bus *nv = &nvram->bus[bus]; int target; - sc->sc_initiator[bus] = (nv->config1 & 0x0f); + if (!ISSET(sc->sc_flags, QLW_FLAG_INITIATOR)) + sc->sc_initiator[bus] = (nv->config1 & 0x0f); + sc->sc_retry_count[bus] = nv->retry_count; sc->sc_retry_delay[bus] = nv->retry_delay; sc->sc_reset_delay[bus] = nv->reset_delay; |