Lines Matching refs:scsi_lun
1270 * scsilun_to_int - convert a scsi_lun to an int
1271 * @scsilun: struct scsi_lun to be converted.
1274 * Convert @scsilun from a struct scsi_lun to a four byte host byte-ordered
1282 * Given a struct scsi_lun of: d2 04 0b 03 00 00 00 00, this function
1289 u64 scsilun_to_int(struct scsi_lun *scsilun)
1296 lun = lun | (((u64)scsilun->scsi_lun[i] << ((i + 1) * 8)) |
1297 ((u64)scsilun->scsi_lun[i + 1] << (i * 8)));
1303 * int_to_scsilun - reverts an int into a scsi_lun
1305 * @scsilun: struct scsi_lun to be set.
1314 * struct scsi_lun of: d2 04 0b 03 00 00 00 00
1317 void int_to_scsilun(u64 lun, struct scsi_lun *scsilun)
1321 memset(scsilun->scsi_lun, 0, sizeof(scsilun->scsi_lun));
1324 scsilun->scsi_lun[i] = (lun >> 8) & 0xFF;
1325 scsilun->scsi_lun[i+1] = lun & 0xFF;
1361 struct scsi_lun *lunp, *lun_data;
1401 * Allocate enough to hold the header (the same size as one scsi_lun)
1410 length = (max_scsi_report_luns + 1) * sizeof(struct scsi_lun);
1479 data = (u8 *) lun_data->scsi_lun;
1483 num_luns = (length / sizeof(struct scsi_lun));