Re: [PATCH 2/5 v2] BNX2I: Added support for other TMFs besides ABORT_TASK

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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;

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux