From b723bc38e50ad96f50ea9b6410addf0fd213cfd7 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Sat, 15 Mar 2014 11:53:36 +0000 Subject: Only issue SET_FIRMWARE_FEATURES command if we actually have any firmware features to set. Needed for upcoming ISP1000 SBus support. Might help with running on older firmwares on PCI variants as well. --- sys/dev/ic/qlw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/ic/qlw.c b/sys/dev/ic/qlw.c index 183ffedc0c1..b0f2ede1b3e 100644 --- a/sys/dev/ic/qlw.c +++ b/sys/dev/ic/qlw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qlw.c,v 1.13 2014/03/15 11:36:38 kettenis Exp $ */ +/* $OpenBSD: qlw.c,v 1.14 2014/03/15 11:53:35 kettenis Exp $ */ /* * Copyright (c) 2011 David Gwynne @@ -248,7 +248,7 @@ qlw_attach(struct qlw_softc *sc) sc->sc_mbox[1] = 0; if (sc->sc_fw_features & QLW_FW_FEATURE_LVD_NOTIFY) sc->sc_mbox[1] |= QLW_FW_FEATURE_LVD_NOTIFY; - if (qlw_mbox(sc, 0x0003, 0x0001)) { + if (sc->sc_mbox[1] != 0 && qlw_mbox(sc, 0x0003, 0x0001)) { printf("couldn't set firmware features: %x\n", sc->sc_mbox[0]); return (ENXIO); } -- cgit v1.2.3