svn commit: r189998 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb dev/mpt

Marius Strobl marius at FreeBSD.org
Wed Mar 18 15:57:56 PDT 2009


Author: marius
Date: Wed Mar 18 22:57:55 2009
New Revision: 189998
URL: http://svn.freebsd.org/changeset/base/189998

Log:
  MFC: r172842 (partial), r178725
  
  Restore multi-release tradition of the driver.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/dev/mpt/mpt.h
  stable/7/sys/dev/mpt/mpt_cam.c
  stable/7/sys/dev/mpt/mpt_raid.c

Modified: stable/7/sys/dev/mpt/mpt.h
==============================================================================
--- stable/7/sys/dev/mpt/mpt.h	Wed Mar 18 22:13:29 2009	(r189997)
+++ stable/7/sys/dev/mpt/mpt.h	Wed Mar 18 22:57:55 2009	(r189998)
@@ -270,13 +270,30 @@ void mpt_map_rquest(void *, bus_dma_segm
 #define	mpt_setup_intr	bus_setup_intr
 #endif
 
+/* **************************** NewBUS CAM Support ****************************/
+#if __FreeBSD_version < 700049
+#define mpt_xpt_bus_register(sim, parent, bus)	\
+	xpt_bus_register(sim, bus)
+#else
+#define mpt_xpt_bus_register	xpt_bus_register
+#endif
+
 /**************************** Kernel Thread Support ***************************/
-#if __FreeBSD_version > 500005
+#if __FreeBSD_version > 800001
+#define mpt_kthread_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) \
+	kproc_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg)
+#define	mpt_kthread_exit(status)	\
+	kproc_exit(status)
+#elif __FreeBSD_version > 500005
 #define mpt_kthread_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) \
 	kthread_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg)
+#define	mpt_kthread_exit(status)	\
+	kthread_exit(status)
 #else
 #define mpt_kthread_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) \
 	kthread_create(func, farg, proc_ptr, fmtstr, arg)
+#define	mpt_kthread_exit(status)	\
+	kthread_exit(status)
 #endif
 
 /****************************** Timer Facilities ******************************/

Modified: stable/7/sys/dev/mpt/mpt_cam.c
==============================================================================
--- stable/7/sys/dev/mpt/mpt_cam.c	Wed Mar 18 22:13:29 2009	(r189997)
+++ stable/7/sys/dev/mpt/mpt_cam.c	Wed Mar 18 22:57:55 2009	(r189998)
@@ -346,7 +346,7 @@ mpt_cam_attach(struct mpt_softc *mpt)
 	 * Register exactly this bus.
 	 */
 	MPT_LOCK(mpt);
-	if (xpt_bus_register(mpt->sim, mpt->dev, 0) != CAM_SUCCESS) {
+	if (mpt_xpt_bus_register(mpt->sim, mpt->dev, 0) != CAM_SUCCESS) {
 		mpt_prt(mpt, "Bus registration Failed!\n");
 		error = ENOMEM;
 		MPT_UNLOCK(mpt);
@@ -385,7 +385,8 @@ mpt_cam_attach(struct mpt_softc *mpt)
 	 * Register this bus.
 	 */
 	MPT_LOCK(mpt);
-	if (xpt_bus_register(mpt->phydisk_sim, mpt->dev, 1) != CAM_SUCCESS) {
+	if (mpt_xpt_bus_register(mpt->phydisk_sim, mpt->dev, 1) !=
+	    CAM_SUCCESS) {
 		mpt_prt(mpt, "Physical Disk Bus registration Failed!\n");
 		error = ENOMEM;
 		MPT_UNLOCK(mpt);
@@ -3988,7 +3989,7 @@ mpt_recovery_thread(void *arg)
 	mpt->recovery_thread = NULL;
 	wakeup(&mpt->recovery_thread);
 	MPT_UNLOCK(mpt);
-	kthread_exit(0);
+	mpt_kthread_exit(0);
 }
 
 static int

Modified: stable/7/sys/dev/mpt/mpt_raid.c
==============================================================================
--- stable/7/sys/dev/mpt/mpt_raid.c	Wed Mar 18 22:13:29 2009	(r189997)
+++ stable/7/sys/dev/mpt/mpt_raid.c	Wed Mar 18 22:57:55 2009	(r189998)
@@ -722,7 +722,7 @@ mpt_raid_thread(void *arg)
 	mpt->raid_thread = NULL;
 	wakeup(&mpt->raid_thread);
 	MPT_UNLOCK(mpt);
-	kthread_exit(0);
+	mpt_kthread_exit(0);
 }
 
 #if 0


More information about the svn-src-all mailing list