14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * CDDL HEADER START
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * The contents of this file are subject to the terms of the
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * Common Development and Distribution License (the "License").
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * You may not use this file except in compliance with the License.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * See the License for the specific language governing permissions
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * and limitations under the License.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * When distributing Covered Code, include this CDDL HEADER in each
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * If applicable, add the following below this CDDL HEADER, with the
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * fields enclosed by brackets "[]" replaced with your own identifying
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * information: Portions Copyright [yyyy] [name of copyright owner]
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * CDDL HEADER END
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * Use is subject to license terms.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsynctypedef struct srp_portinfo {
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync /* initiator */
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync string pi_initiator; /* Initiator: eui.xxxxxxxxxxxxxxx */
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync /* target */
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync string pi_target; /* Target: eui.xxxxxxxxxxxxxxx */
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsynctypedef struct srp_logininfo {
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync uint32_t li_max_it_iu_len; /* Maximum iu length that initiator can
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync send to target */
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync uint32_t li_max_ti_iu_len; /* Maximum iu length that target can
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync send to initiator */
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync uint32_t li_request_limit; /* Maximun number of SRP requests
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync that initiator can send on a channel */
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync li_reason_code = ntohl(((srp_login_rej_t *)arg2)->lrej_reason);
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsynctypedef struct srp_taskinfo {
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync uint8_t ti_function; /* Task management function */
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync uint32_t ti_req_limit_delta; /* Increment of channel's request limit */
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync /* bit 3: DOUNDER */
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync /* bit 4: DIOVER */
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync /* bit 5: DIUNDER */
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync uint32_t ti_do_resid_cnt; /* Data-out residual count */
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync uint32_t ti_di_resid_cnt; /* Data-in residual count */
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync ti_function = P->cr_type == 1 ? /* 1: MGMT CMD 2: SRP CMD */
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync ti_lun = ntohll(*(uint64_t *)((scsi_task_t *)arg2)->task_lun_no);
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync ti_function = ((scsi_task_t *)arg2)->task_mgmt_function;
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync ti_req_limit_delta = ntohl(P->rsp_req_limit_delta);
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync ti_lun = ntohll(*(uint64_t *)P->iu_stmf_task->task_lun_no);
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync ((ibt_send_wr_t *)arg3)->wr.rc.rcwr.rdma.rdma_raddr;