Restore multi-release tradition of the driver.
Reviewed by: mjacob
This commit is contained in:
parent
f1675e84a5
commit
a41aabe249
@ -270,18 +270,30 @@ void mpt_map_rquest(void *, bus_dma_segment_t *, int, int);
|
||||
#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)
|
||||
#else
|
||||
#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)
|
||||
#endif
|
||||
#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 ******************************/
|
||||
|
@ -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);
|
||||
kproc_exit(0);
|
||||
mpt_kthread_exit(0);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -722,7 +722,7 @@ mpt_raid_thread(void *arg)
|
||||
mpt->raid_thread = NULL;
|
||||
wakeup(&mpt->raid_thread);
|
||||
MPT_UNLOCK(mpt);
|
||||
kproc_exit(0);
|
||||
mpt_kthread_exit(0);
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
Loading…
Reference in New Issue
Block a user