On 08/12/2010 02:30 AM, Ulrich Windl wrote:
"Eddie Wai"<[email protected]>  schrieb am 11.08.2010 um 21:26 in Nachricht
<f856ac0dbd5e8a48948c6fddff2eca9f94f7f3f...@irvexchccr02.corp.ad.broadcom.com>:
Hello Mike,

Thanks for reviewing.  Since both scsi_device->lun and the local scsi_lun
array variable are defined as u32 so we're using a direct u32 manipulation.
It's also consistent to the old code.

We chose to use memcpy for the default case as both tmfabort_wqe->lun and
tmfabort_hdr->lun are defined to be u8.  This u8 copying is also consistent to
the other code paths in the existing bnx2i like nopout_wqe, etc.

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

But aren't you copying 8 Bytes (u64?)?


The struct we want to copy is 8 bytes/u64:

struct scsi_lun {
        __u8 scsi_lun[8];
};




Thanks,
Eddie

-----Original Message-----
From: Mike Christie [mailto:[email protected]]
Sent: Wednesday, August 11, 2010 12:07 PM
To: Eddie Wai
Cc: James Bottomley; open-iscsi; linux-scsi; Michael Chan; Anil
Veerabhadrappa; Benjamin Li
Subject: Re: [PATCH 2/5] BNX2I: Added support for other TMFs besides
ABORT_TASK

On 08/10/2010 02:09 PM, Eddie Wai wrote:
+               /* Retrieve LUN directly from the ref_sc */
+               int_to_scsilun(ref_sc->device->lun,
+                              (struct scsi_lun *) scsi_lun);
+               tmfabort_wqe->lun[0] = be32_to_cpu(scsi_lun[0]);
+               tmfabort_wqe->lun[1] = be32_to_cpu(scsi_lun[1]);
+



+       default:
+               memcpy(tmfabort_wqe->lun, tmfabort_hdr->lun, 8);

Why do you copy the lun differently?







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

Reply via email to