Date: Mon, 25 Jun 2012 03:06:30 +0000 (UTC) From: Matt Jacob <mjacob@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r237544 - head/sys/dev/isp Message-ID: <201206250306.q5P36Umu046375@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mjacob Date: Mon Jun 25 03:06:29 2012 New Revision: 237544 URL: http://svn.freebsd.org/changeset/base/237544 Log: Unbreak register tests for parallel SCSI. You can't overwrite registers 7 and 8. MFC after: 3 days Modified: head/sys/dev/isp/isp.c Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Mon Jun 25 01:48:18 2012 (r237543) +++ head/sys/dev/isp/isp.c Mon Jun 25 03:06:29 2012 (r237544) @@ -710,8 +710,11 @@ isp_reset(ispsoftc_t *isp, int do_load_d 0x6666, 0x6677, 0x1122, 0x33ff, 0x0000, 0x0001, 0x1000, 0x1010, }; + int nmbox = ISP_NMBOX(isp); + if (IS_SCSI(isp)) + nmbox = 6; MBSINIT(&mbs, MBOX_MAILBOX_REG_TEST, MBLOGALL, 0); - for (i = 1; i < ISP_NMBOX(isp); i++) { + for (i = 1; i < nmbox; i++) { mbs.param[i] = patterns[i]; } isp_mboxcmd(isp, &mbs); @@ -719,7 +722,7 @@ isp_reset(ispsoftc_t *isp, int do_load_d ISP_RESET0(isp); return; } - for (i = 1; i < ISP_NMBOX(isp); i++) { + for (i = 1; i < nmbox; i++) { if (mbs.param[i] != patterns[i]) { ISP_RESET0(isp); isp_prt(isp, ISP_LOGERR, "Register Test Failed at Register %d: should have 0x%04x but got 0x%04x", i, patterns[i], mbs.param[i]);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206250306.q5P36Umu046375>