Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Jun 2012 19:39:34 -0700
From:      Matthew Jacob <mj@feral.com>
To:        Manfred Antar <null@pozo.com>, freebsd-current@freebsd.org
Subject:   Re: isp Tape Drive no longer detected
Message-ID:  <4FE7CF66.6000502@feral.com>
In-Reply-To: <201206250218.q5P2IcUr001543@pozo.com>
References:  <201206250218.q5P2IcUr001543@pozo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------070104040107010403090409
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Actually, can you try this patch please? I won't be able to get to my 
lab and get a working 1040 card into a system until tomorrow.




--------------070104040107010403090409
Content-Type: text/plain; charset=windows-1252;
 name="isp.c.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="isp.c.patch"

diff -r 5aba1b04ddd5 isp.c
--- a/isp.c	Sun Jun 24 10:22:10 2012 -0700
+++ b/isp.c	Sun Jun 24 19:36:06 2012 -0700
@@ -710,8 +710,11 @@
 			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_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]);

--------------070104040107010403090409--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4FE7CF66.6000502>