• James.Smart@Emulex.Com's avatar
    [SCSI] add int_to_scsilun() function · 2f4701d8
    James.Smart@Emulex.Com authored
    One of the issues we had was reverting the midlayers lun value
    into the 8byte lun value that we wanted to send to the device.
    Historically, there's been some combination of byte swapping,
    setting high/low, etc. There's also been no common thread between
    how our driver did it and others.  I also got very confused as
    to why byteswap routines were being used.
    Anyway, this patch is a LLDD-callable function that reverts the
    midlayer's lun value, stored in an int, to the 8-byte quantity
    (note: this is not the real 8byte quantity, just the same amount
    that scsilun_to_int() was able to convert and store originally).
    This also solves the dilemma of the thread:
    A patch for the lpfc driver to use this function will be along
    in a few days (batched with other patches).
    Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>