From d3de8bec66d3c76fb775c2737c8a7dc8e27ddb94 Mon Sep 17 00:00:00 2001 From: itohy Date: Mon, 29 Oct 2007 03:17:24 +0000 Subject: Fix problem where targets with ID 0, 1, or 2 couldn't be reconnected. It seems I have always tested with targets those ID >= 3, and that I am the only user of this driver. --- sys/dev/ic/ninjascsi32.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/ic/ninjascsi32.c b/sys/dev/ic/ninjascsi32.c index 227fbca0693..4a21e965ab1 100644 --- a/sys/dev/ic/ninjascsi32.c +++ b/sys/dev/ic/ninjascsi32.c @@ -1,4 +1,4 @@ -/* $NetBSD: ninjascsi32.c,v 1.12 2007/10/19 11:59:57 ad Exp $ */ +/* $NetBSD: ninjascsi32.c,v 1.13 2007/10/29 03:17:24 itohy Exp $ */ /*- * Copyright (c) 2004, 2006 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ninjascsi32.c,v 1.12 2007/10/19 11:59:57 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ninjascsi32.c,v 1.13 2007/10/29 03:17:24 itohy Exp $"); #include #include @@ -2387,8 +2387,8 @@ njsc32_intr(void *arg) idbit = njsc32_read_1(sc, NJSC32_REG_RESELECT_ID); if ((idbit & (1 << NJSC32_INITIATOR_ID)) == 0 || - (sc->sc_reselid = ffs(idbit & ~NJSC32_INITIATOR_ID) -1) - < 0) { + (sc->sc_reselid = + ffs(idbit & ~(1 << NJSC32_INITIATOR_ID)) - 1) < 0) { printf("%s: invalid reselection (id: %#x)\n", sc->sc_dev.dv_xname, idbit); sc->sc_stat = NJSC32_STAT_IDLE; /* XXX ? */ -- cgit