On 08/12/2010 06:44 PM, Eddie Wai wrote:
-       tmfabort_wqe->ref_itt = (dword | (tmfabort_hdr->rtt&  ISCSI_ITT_MASK));
+       switch (tmfabort_hdr->flags&  ISCSI_FLAG_TM_FUNC_MASK) {
+       case ISCSI_TM_FUNC_ABORT_TASK:
+       case ISCSI_TM_FUNC_TASK_REASSIGN:
+               memcpy(tmfabort_wqe->lun, tmfabort_hdr->lun, 8);

....

+       default:
+               memcpy(tmfabort_wqe->lun, tmfabort_hdr->lun, 8);
+               tmfabort_wqe->ref_itt = RESERVED_ITT;
+       }
        tmfabort_wqe->ref_cmd_sn = be32_to_cpu(tmfabort_hdr->refcmdsn);

The 2 memcpys are exactly the same so just do it once right here:

        memcpy(tmfabort_wqe->lun, tmfabort_hdr->lun, 8);


        tmfabort_wqe->bd_list_addr_lo = (u32) bnx2i_conn->hba->mp_bd_dma;

--
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-is...@googlegroups.com.
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/open-iscsi?hl=en.

Reply via email to