Mercurial > illumos > illumos-gate
changeset 10878:6ecfd56a37e4
6890605 check for alua state first in stmf_proxy_scsi_cmd()
6894324 itask_proxy_msg_id must be initialized to 0 in stmf_task_lu_free()
6895228 cleanup unnecessary messages in ALUA
author | John Forte <John.Forte@Sun.COM> |
---|---|
date | Mon, 26 Oct 2009 21:20:13 -0700 |
parents | b7af9d29fb0a |
children | 420834d9266b |
files | usr/src/uts/common/io/comstar/port/pppt/pppt.c usr/src/uts/common/io/comstar/stmf/stmf.c |
diffstat | 2 files changed, 14 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/common/io/comstar/port/pppt/pppt.c Mon Oct 26 12:36:15 2009 -0700 +++ b/usr/src/uts/common/io/comstar/port/pppt/pppt.c Mon Oct 26 21:20:13 2009 -0700 @@ -383,8 +383,6 @@ break; case PPPT_INSTALL_DOOR: - cmn_err(CE_NOTE, "RECEIVE DOOR HANDLE"); - new_handle = door_ki_lookup((int)iocd.pppt_door_fd); if (new_handle == NULL) return (EINVAL);
--- a/usr/src/uts/common/io/comstar/stmf/stmf.c Mon Oct 26 12:36:15 2009 -0700 +++ b/usr/src/uts/common/io/comstar/stmf/stmf.c Mon Oct 26 21:20:13 2009 -0700 @@ -1706,12 +1706,6 @@ itask = (stmf_i_scsi_task_t *)task->task_stmf_private; dbuf = itask->itask_proxy_dbuf; - /* - * stmf will now take over the task handling for this task - * but it still needs to be treated differently from other - * default handled tasks, hence the ITASK_PROXY_TASK - */ - itask->itask_flags |= ITASK_DEFAULT_HANDLING | ITASK_PROXY_TASK; task->task_cmd_xfer_length = msg->icsd_data_len; @@ -1769,20 +1763,26 @@ stmf_ic_msg_status_t ic_ret; stmf_status_t ret = STMF_FAILURE; - if (ilport->ilport_proxy_registered == 0) { - cmn_err(CE_WARN, "proxy port not registered"); - return (STMF_FAILURE); - } - if (stmf_state.stmf_alua_state != 1) { cmn_err(CE_WARN, "stmf alua state is disabled"); return (STMF_FAILURE); } + if (ilport->ilport_proxy_registered == 0) { + return (STMF_FAILURE); + } + mutex_enter(&stmf_state.stmf_lock); itask->itask_proxy_msg_id = stmf_proxy_msg_id++; mutex_exit(&stmf_state.stmf_lock); itask->itask_proxy_dbuf = dbuf; + + /* + * stmf will now take over the task handling for this task + * but it still needs to be treated differently from other + * default handled tasks, hence the ITASK_PROXY_TASK + */ + itask->itask_flags |= ITASK_DEFAULT_HANDLING | ITASK_PROXY_TASK; if (dbuf) { ic_cmd_msg = ic_scsi_cmd_msg_alloc(itask->itask_proxy_msg_id, task, dbuf->db_data_size, dbuf->db_sglist[0].seg_addr, @@ -1949,7 +1949,6 @@ } if (alua_state->alua_node != 0) { /* reset existing rtpids to new base */ - cmn_err(CE_NOTE, "non-zero alua node set"); stmf_rtpid_counter = 255; } stmf_state.stmf_alua_node = alua_state->alua_node; @@ -3824,6 +3823,7 @@ ASSERT(rw_lock_held(iss->iss_lockp)); itask->itask_flags = ITASK_IN_FREE_LIST; + itask->itask_proxy_msg_id = 0; mutex_enter(&ilu->ilu_task_lock); itask->itask_lu_free_next = ilu->ilu_free_tasks; ilu->ilu_free_tasks = itask; @@ -4430,7 +4430,8 @@ stmf_task_free(task); } else { cmn_err(CE_PANIC, "LU is done with the task but LPORT " - " is not done, itask %p", (void *)itask); + " is not done, itask %p itask_flags %x", + (void *)itask, itask->itask_flags); } } }