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.
This commit is contained in:
parent
e7976c8a86
commit
d3de8bec66
|
@ -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 ? */
|
||||
|
|
Loading…
Reference in New Issue