Lines Matching refs:scsi_lun
58 * scsilun_to_int - convert a scsi_lun to an int
59 * @scsilun: struct scsi_lun to be converted.
62 * Convert @scsilun from a struct scsi_lun to a four-byte host byte-ordered
70 * Given a struct scsi_lun of: d2 04 0b 03 00 00 00 00, this function
77 u64 scsilun_to_int(struct scsi_lun *scsilun)
84 lun = lun | (((u64)scsilun->scsi_lun[i] << ((i + 1) * 8)) |
85 ((u64)scsilun->scsi_lun[i + 1] << (i * 8)));
91 * int_to_scsilun - reverts an int into a scsi_lun
93 * @scsilun: struct scsi_lun to be set.
102 * struct scsi_lun of: d2 04 0b 03 00 00 00 00
105 void int_to_scsilun(u64 lun, struct scsi_lun *scsilun)
109 memset(scsilun->scsi_lun, 0, sizeof(scsilun->scsi_lun));
112 scsilun->scsi_lun[i] = (lun >> 8) & 0xFF;
113 scsilun->scsi_lun[i+1] = lun & 0xFF;