diff options
author | mjacob <mjacob@FreeBSD.org> | 2006-09-05 23:53:07 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 2006-09-05 23:53:07 +0000 |
commit | 670deaece645da636be8d143eb99b79497386ec3 (patch) | |
tree | 49d1a437c793a1f6eddc1aa9d344cad82b01e251 /sys/dev/mpt | |
parent | 5c567602d82c61d90ee3ea5f3262c9e13e064769 (diff) | |
download | FreeBSD-src-670deaece645da636be8d143eb99b79497386ec3.zip FreeBSD-src-670deaece645da636be8d143eb99b79497386ec3.tar.gz |
The poison pill of death: adding a target mode reply handler and target
resources to a non-FC card killed us dead. Sorry for the breakage since
last July 12.
Diffstat (limited to 'sys/dev/mpt')
-rw-r--r-- | sys/dev/mpt/mpt_cam.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/mpt/mpt_cam.c b/sys/dev/mpt/mpt_cam.c index c460b28..468242e 100644 --- a/sys/dev/mpt/mpt_cam.c +++ b/sys/dev/mpt/mpt_cam.c @@ -104,9 +104,9 @@ __FBSDID("$FreeBSD$"); #include "dev/mpt/mpilib/mpi_init.h" #include "dev/mpt/mpilib/mpi_targ.h" #include "dev/mpt/mpilib/mpi_fc.h" - +#if __FreeBSD_version >= 500000 #include <sys/sysctl.h> - +#endif #include <sys/callout.h> #include <sys/kthread.h> @@ -248,7 +248,7 @@ mpt_cam_attach(struct mpt_softc *mpt) * If we support target mode, we register a reply handler for it, * but don't add resources until we actually enable target mode. */ - if ((mpt->role & MPT_ROLE_TARGET) != 0) { + if (mpt->is_fc && (mpt->role & MPT_ROLE_TARGET) != 0) { handler.reply_handler = mpt_scsi_tgt_reply_handler; error = mpt_register_handler(mpt, MPT_HANDLER_REPLY, handler, &mpt->scsi_tgt_handler_id); @@ -816,7 +816,7 @@ mpt_cam_enable(struct mpt_softc *mpt) * If we're in target mode, hang out resources now * so we don't cause the world to hang talking to us. */ - if (mpt->role & MPT_ROLE_TARGET) { + if (mpt->is_fc && (mpt->role & MPT_ROLE_TARGET)) { /* * Try to add some target command resources */ @@ -3166,7 +3166,7 @@ mpt_action(struct cam_sim *sim, union ccb *ccb) if ((mpt->role & MPT_ROLE_INITIATOR) == 0) { cpi->hba_misc |= PIM_NOINITIATOR; } - if ((mpt->role & MPT_ROLE_TARGET) != 0) { + if (mpt->is_fc && (mpt->role & MPT_ROLE_TARGET)) { cpi->target_sprt = PIT_PROCESSOR | PIT_DISCONNECT | PIT_TERM_IO; } else { |