diff options
author | mav <mav@FreeBSD.org> | 2015-10-05 09:07:15 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2015-10-05 09:07:15 +0000 |
commit | 94d587a93b9592befaec433139ea27c7a95a842c (patch) | |
tree | eaf872e39fc1989fa0cfa66c09d3ff827285be58 | |
parent | de5feb201af3fcecd4c550998c0f109c4c56b9c2 (diff) | |
download | FreeBSD-src-94d587a93b9592befaec433139ea27c7a95a842c.zip FreeBSD-src-94d587a93b9592befaec433139ea27c7a95a842c.tar.gz |
MFC r287721: Add HA support for CTL_TASK_I_T_NEXUS_RESET.
-rw-r--r-- | sys/cam/ctl/ctl.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c index a06aa34..71ed27f 100644 --- a/sys/cam/ctl/ctl.c +++ b/sys/cam/ctl/ctl.c @@ -11518,13 +11518,24 @@ ctl_i_t_nexus_reset(union ctl_io *io) struct ctl_lun *lun; uint32_t initidx; + if (!(io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC)) { + union ctl_ha_msg msg_info; + + msg_info.hdr.nexus = io->io_hdr.nexus; + msg_info.task.task_action = CTL_TASK_I_T_NEXUS_RESET; + msg_info.hdr.msg_type = CTL_MSG_MANAGE_TASKS; + msg_info.hdr.original_sc = NULL; + msg_info.hdr.serializing_sc = NULL; + ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg_info, + sizeof(msg_info.task), M_WAITOK); + } + initidx = ctl_get_initindex(&io->io_hdr.nexus); mtx_lock(&softc->ctl_lock); STAILQ_FOREACH(lun, &softc->lun_list, links) { mtx_lock(&lun->lun_lock); ctl_abort_tasks_lun(lun, io->io_hdr.nexus.targ_port, - io->io_hdr.nexus.initid, - (io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC) != 0); + io->io_hdr.nexus.initid, 1); #ifdef CTL_WITH_CA ctl_clear_mask(lun->have_ca, initidx); #endif |