Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Jan 2007 22:53:14 GMT
From:      Matt Jacob <mjacob@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 112568 for review
Message-ID:  <200701052253.l05MrE6g056691@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=112568

Change 112568 by mjacob@mjexp on 2007/01/05 22:52:13

	RELENG_6 compatibility code diff reduction.

Affected files ...

.. //depot/projects/mjexp/sys/dev/mpt/mpt.h#5 edit
.. //depot/projects/mjexp/sys/dev/mpt/mpt_cam.c#7 edit
.. //depot/projects/mjexp/sys/dev/mpt/mpt_pci.c#4 edit

Differences ...

==== //depot/projects/mjexp/sys/dev/mpt/mpt.h#5 (text+ko) ====

@@ -515,7 +515,7 @@
 	uint32_t
 				: 8,
 		unit		: 8,
-				: 1,
+		ready		: 1,
 		fw_uploaded	: 1,
 		msi_enable	: 1,
 		twildcard	: 1,

==== //depot/projects/mjexp/sys/dev/mpt/mpt_cam.c#7 (text+ko) ====

@@ -110,7 +110,7 @@
 #include <sys/callout.h>
 #include <sys/kthread.h>
 
-#if __FreeBSD_version >= 700000
+#if __FreeBSD_version >= 700025
 #ifndef	CAM_NEW_TRAN_CODE
 #define	CAM_NEW_TRAN_CODE	1
 #endif
@@ -842,6 +842,7 @@
 		}
 		MPT_UNLOCK(mpt);
 	}
+	mpt->ready = 1;
 }
 
 void
@@ -849,6 +850,7 @@
 {
 	mpt_handler_t handler;
 
+	mpt->ready = 0;
 	mpt_terminate_recovery_thread(mpt); 
 
 	handler.reply_handler = mpt_scsi_reply_handler;
@@ -3231,6 +3233,7 @@
 		/*
 		 * The base speed is the speed of the underlying connection.
 		 */
+#ifdef	CAM_NEW_TRAN
 		cpi->protocol = PROTO_SCSI;
 		if (mpt->is_fc) {
 			cpi->hba_misc = PIM_NOBUSRESET;
@@ -3254,6 +3257,21 @@
 			cpi->transport_version = 2;
 			cpi->protocol_version = SCSI_REV_2;
 		}
+#else
+		if (mpt->is_fc) {
+			cpi->hba_misc = PIM_NOBUSRESET;
+			cpi->base_transfer_speed = 100000;
+			cpi->hba_inquiry = PI_TAG_ABLE;
+		} else if (mpt->is_sas) {
+			cpi->hba_misc = PIM_NOBUSRESET;
+			cpi->base_transfer_speed = 300000;
+			cpi->hba_inquiry = PI_TAG_ABLE;
+		} else {
+			cpi->hba_misc = PIM_SEQSCAN;
+			cpi->base_transfer_speed = 3300;
+			cpi->hba_inquiry = PI_SDTR_ABLE|PI_TAG_ABLE|PI_WIDE_16;
+		}
+#endif
 
 		/*
 		 * We give our fake RAID passhtru bus a width that is MaxVolumes

==== //depot/projects/mjexp/sys/dev/mpt/mpt_pci.c#4 (text+ko) ====

@@ -105,6 +105,12 @@
 #include <dev/mpt/mpt_cam.h>
 #include <dev/mpt/mpt_raid.h>
 
+#if __FreeBSD_version < 700000
+#define	pci_msi_count(x)	0
+#define	pci_msi_enable(x)	0
+#define	pci_alloc_msi(x, y)	1
+#define	pci_release_msi(x)	do { ; } while (0)
+#endif
 
 #ifndef	PCI_VENDOR_LSI
 #define	PCI_VENDOR_LSI			0x1000
@@ -327,7 +333,6 @@
 		}
 		mpt->do_cfg_role = 1;
 	}
-
 	mpt->msi_enable = 0;
 }
 #else



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