if (conn->hdrdgst_en) iscsi_hdr_digest(conn, &r2t->headbuf, (u8*)r2t->dtask->hdrext); 
iscsi_ctask_xmit(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask){	int rc = 0;	debug_scsi("ctask deq [cid %d xmstate %x itt 0x%x]\n",		conn->id, ctask->xmstate, ctask->itt);	/*	 * serialize with TMF AbortTask	 */	if (ctask->mtask)		return rc;	if (ctask->xmstate & XMSTATE_R_HDR) {		rc = handle_xmstate_r_hdr(conn, ctask);		return rc;	}	if (ctask->xmstate & XMSTATE_W_HDR) {		rc = handle_xmstate_w_hdr(conn, ctask);		if (rc)			return rc;	}	/* XXX: for data digest xmit recover */	if (ctask->xmstate & XMSTATE_DATA_DIGEST) {		rc = handle_xmstate_data_digest(conn, ctask);		if (rc)			return rc;	}	if (ctask->xmstate & XMSTATE_IMM_DATA) {		rc = handle_xmstate_imm_data(conn, ctask);		if (rc)			return rc;	}	if (ctask->xmstate & XMSTATE_UNS_HDR) {		BUG_ON(!ctask->unsol_count);		ctask->xmstate &= ~XMSTATE_UNS_HDR;unsolicit_head_again:		rc = handle_xmstate_uns_hdr(conn, ctask);		if (rc)			return rc;	}	if (ctask->xmstate & XMSTATE_UNS_DATA) {		rc = handle_xmstate_uns_data(conn, ctask);		if (rc == 1)			goto unsolicit_head_again;		else if (rc)			return rc;		goto done;	}	if (ctask->xmstate & XMSTATE_SOL_HDR) {		struct iscsi_r2t_info *r2t;		ctask->xmstate &= ~XMSTATE_SOL_HDR;		ctask->xmstate |= XMSTATE_SOL_DATA;		if (!ctask->r2t)			__kfifo_get(ctask->r2tqueue, (void*)&ctask->r2t,				    sizeof(void*));solicit_head_again:		r2t = ctask->r2t;		if (iscsi_sendhdr(conn, &r2t->headbuf, r2t->data_count)) {			ctask->xmstate &= ~XMSTATE_SOL_DATA;			ctask->xmstate |= XMSTATE_SOL_HDR;			return -EAGAIN;		}		debug_scsi("sol dout [dsn %d itt 0x%x dlen %d sent %d]\n",			r2t->solicit_datasn - 1, ctask->itt, r2t->data_count,			r2t->sent);	}	if (ctask->xmstate & XMSTATE_SOL_DATA) {		rc = handle_xmstate_sol_data(conn, ctask);		if (rc == 1)			goto solicit_head_again;		if (rc)			return rc;	}done:	/*	 * Last thing to check is whether we need to send write	 * padding. Note that we check for xmstate equality, not just the bit.	 */	if (ctask->xmstate == XMSTATE_W_PAD)		rc = handle_xmstate_w_pad(conn, ctask);	return rc;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/af973481f4a0902ad35726636c290f4794704948/iscsi_tcp.c/clean/drivers/scsi/iscsi_tcp.c