Lines Matching refs:scsi_lun
110 * scsilun_to_int - convert a scsi_lun to an int
111 * @scsilun: struct scsi_lun to be converted.
114 * Convert @scsilun from a struct scsi_lun to a four-byte host byte-ordered
122 * Given a struct scsi_lun of: d2 04 0b 03 00 00 00 00, this function
129 u64 scsilun_to_int(struct scsi_lun *scsilun)
136 lun = lun | (((u64)scsilun->scsi_lun[i] << ((i + 1) * 8)) |
137 ((u64)scsilun->scsi_lun[i + 1] << (i * 8)));
143 * int_to_scsilun - reverts an int into a scsi_lun
145 * @scsilun: struct scsi_lun to be set.
154 * struct scsi_lun of: d2 04 0b 03 00 00 00 00
157 void int_to_scsilun(u64 lun, struct scsi_lun *scsilun)
161 memset(scsilun->scsi_lun, 0, sizeof(scsilun->scsi_lun));
164 scsilun->scsi_lun[i] = (lun >> 8) & 0xFF;
165 scsilun->scsi_lun[i+1] = lun & 0xFF;