[SCSI] add int_to_scsilun() function
authorJames.Smart@Emulex.Com <James.Smart@Emulex.Com>
Thu, 14 Jul 2005 02:05:03 +0000 (22:05 -0400)
committerJames Bottomley <jejb@mulgrave.(none)>
Thu, 14 Jul 2005 15:21:27 +0000 (11:21 -0400)
commit2f4701d8274c8663f5c50323dc72fefa24b55091
treedc578144cfcf1db0687c7c67f6f8b300577359b1
parent77d74143612c1dab6c055dac21f965929ba0a7e6
[SCSI] add int_to_scsilun() function

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:
http://marc.theaimsgroup.com/?l=linux-kernel&m=112116767118981&w=2

A patch for the lpfc driver to use this function will be along
in a few days (batched with other patches).

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/scsi_scan.c
include/scsi/scsi_device.h