Module Name: src Committed By: mhitch Date: Mon May 16 17:21:38 UTC 2011
Modified Files: src/sys/dev/ic: ciss.c Log Message: I was allowing adapt_max_periph to use all available command slots, which easily exceeds the maximum of 256 tags used by the scsipi layer because the tag information from the scsipi layer was ignored and all the tagging is handled implicitly internal to ciss(4). But with the DIAGNOSTIC option, the scsipi layer does a check for > 256 tags and will panic. So, lets just limit the adapt_max_periph to 256 so the scsipi layer won't try to user more. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/dev/ic/ciss.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/ic/ciss.c diff -u src/sys/dev/ic/ciss.c:1.24 src/sys/dev/ic/ciss.c:1.25 --- src/sys/dev/ic/ciss.c:1.24 Sat Nov 13 13:52:00 2010 +++ src/sys/dev/ic/ciss.c Mon May 16 17:21:37 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ciss.c,v 1.24 2010/11/13 13:52:00 uebayasi Exp $ */ +/* $NetBSD: ciss.c,v 1.25 2011/05/16 17:21:37 mhitch Exp $ */ /* $OpenBSD: ciss.c,v 1.14 2006/03/13 16:02:23 mickey Exp $ */ /* @@ -19,7 +19,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ciss.c,v 1.24 2010/11/13 13:52:00 uebayasi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ciss.c,v 1.25 2011/05/16 17:21:37 mhitch Exp $"); #include "bio.h" @@ -373,7 +373,7 @@ sc->sc_adapter.adapt_dev = (device_t) sc; sc->sc_adapter.adapt_openings = sc->sc_channel.chan_openings; - sc->sc_adapter.adapt_max_periph = sc->sc_channel.chan_openings; + sc->sc_adapter.adapt_max_periph = min(sc->sc_adapter.adapt_openings, 256); sc->sc_adapter.adapt_request = ciss_scsi_cmd; sc->sc_adapter.adapt_minphys = cissminphys; sc->sc_adapter.adapt_ioctl = ciss_scsi_ioctl;