diff options
author | James.Smart@Emulex.Com <James.Smart@Emulex.Com> | 2005-07-14 04:05:03 +0200 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-07-14 17:21:27 +0200 |
commit | 2f4701d8274c8663f5c50323dc72fefa24b55091 (patch) | |
tree | dc578144cfcf1db0687c7c67f6f8b300577359b1 /include | |
parent | [SCSI] qla2xxx: Cleanup FC remote port registration. (diff) | |
download | linux-2f4701d8274c8663f5c50323dc72fefa24b55091.tar.xz linux-2f4701d8274c8663f5c50323dc72fefa24b55091.zip |
[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>
Diffstat (limited to 'include')
-rw-r--r-- | include/scsi/scsi_device.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 63c91dd85ca1..223f92f4d2cb 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h @@ -243,6 +243,7 @@ extern void scsi_target_reap(struct scsi_target *); extern void scsi_target_block(struct device *); extern void scsi_target_unblock(struct device *); extern void scsi_remove_target(struct device *); +extern void int_to_scsilun(unsigned int, struct scsi_lun *); extern const char *scsi_device_state_name(enum scsi_device_state); extern int scsi_is_sdev_device(const struct device *); extern int scsi_is_target_device(const struct device *); |