From owner-svn-src-all@FreeBSD.ORG  Thu Mar 19 16:14:00 2009
Return-Path: <owner-svn-src-all@FreeBSD.ORG>
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9E9E11065A4B;
	Thu, 19 Mar 2009 16:14:00 +0000 (UTC)
	(envelope-from marius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7D4728FC16;
	Thu, 19 Mar 2009 16:14:00 +0000 (UTC)
	(envelope-from marius@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n2JGE0bu068495;
	Thu, 19 Mar 2009 16:14:00 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n2JGE03a068492;
	Thu, 19 Mar 2009 16:14:00 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <200903191614.n2JGE03a068492@svn.freebsd.org>
From: Marius Strobl <marius@FreeBSD.org>
Date: Thu, 19 Mar 2009 16:14:00 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r190079 - in stable/7/sys: . contrib/pf dev/cxgb dev/isp
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
	user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-all>,
	<mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-all>,
	<mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 19 Mar 2009 16:14:07 -0000

Author: marius
Date: Thu Mar 19 16:14:00 2009
New Revision: 190079
URL: http://svn.freebsd.org/changeset/base/190079

Log:
  MFC: r186140
  
  Don't try reading the SXP_PINS_DIFF on the 10160 and 12160 SCSI
  controllers. Reading this register, for which there are indications
  that it doesn't really exist, returns 0 on at least some 12160
  and doing so on Sun Fire V880 causes a data access error exception.
  
  Reported and tested by:	Beat Gaetzi
  Approved by:		mjacob
  Obtained from:		OpenBSD (modulo setting isp_lvdmode)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/dev/isp/isp.c

Modified: stable/7/sys/dev/isp/isp.c
==============================================================================
--- stable/7/sys/dev/isp/isp.c	Thu Mar 19 16:11:14 2009	(r190078)
+++ stable/7/sys/dev/isp/isp.c	Thu Mar 19 16:14:00 2009	(r190079)
@@ -335,6 +335,23 @@ isp_reset(ispsoftc_t *isp)
 		/*
 		 * XXX: Should probably do some bus sensing.
 		 */
+	} else if (IS_ULTRA3(isp)) {
+		sdparam *sdp = isp->isp_param;
+
+		isp->isp_clock = 100;
+
+		if (IS_10160(isp))
+			btype = "10160";
+		else if (IS_12160(isp))
+			btype = "12160";
+		else
+			btype = "<UNKLVD>";
+		sdp->isp_lvdmode = 1;
+
+		if (IS_DUALBUS(isp)) {
+			sdp++;
+			sdp->isp_lvdmode = 1;
+		}
 	} else if (IS_ULTRA2(isp)) {
 		static const char m[] = "bus %d is in %s Mode";
 		uint16_t l;
@@ -346,10 +363,6 @@ isp_reset(ispsoftc_t *isp)
 			btype = "1280";
 		else if (IS_1080(isp))
 			btype = "1080";
-		else if (IS_10160(isp))
-			btype = "10160";
-		else if (IS_12160(isp))
-			btype = "12160";
 		else
 			btype = "<UNKLVD>";