diff options
| author | itohy <itohy@NetBSD.org> | 2007-10-29 03:17:24 +0000 |
|---|---|---|
| committer | itohy <itohy@NetBSD.org> | 2007-10-29 03:17:24 +0000 |
| commit | d3de8bec66d3c76fb775c2737c8a7dc8e27ddb94 (patch) | |
| tree | d38f5426e55e2d5d8b20fed9b65c06fce31dbc5a /sys/dev | |
| parent | e7976c8a86e6a68a7d7882f68dd0db2a9d63b447 (diff) | |
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.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/ic/ninjascsi32.c | 8 |
1 files changed, 4 insertions, 4 deletions
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 <sys/cdefs.h> -__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 <sys/param.h> #include <sys/systm.h> @@ -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 ? */ |
