Lines Matching refs:scsi_lun
1175 * scsilun_to_int - convert a scsi_lun to an int
1176 * @scsilun: struct scsi_lun to be converted.
1179 * Convert @scsilun from a struct scsi_lun to a four byte host byte-ordered
1184 * The struct scsi_lun is assumed to be four levels, with each level
1190 * Given a struct scsi_lun of: 0a 04 0b 03 00 00 00 00, this function returns
1193 int scsilun_to_int(struct scsi_lun *scsilun)
1200 lun = lun | (((scsilun->scsi_lun[i] << 8) |
1201 scsilun->scsi_lun[i + 1]) << (i * 8));
1207 * int_to_scsilun - reverts an int into a scsi_lun
1209 * @scsilun: struct scsi_lun to be set.
1221 * scsi_lun of : struct scsi_lun of: 0a 04 0b 03 00 00 00 00
1224 void int_to_scsilun(unsigned int lun, struct scsi_lun *scsilun)
1228 memset(scsilun->scsi_lun, 0, sizeof(scsilun->scsi_lun));
1231 scsilun->scsi_lun[i] = (lun >> 8) & 0xFF;
1232 scsilun->scsi_lun[i+1] = lun & 0xFF;
1267 struct scsi_lun *lunp, *lun_data;
1304 * Allocate enough to hold the header (the same size as one scsi_lun)
1313 length = (max_scsi_report_luns + 1) * sizeof(struct scsi_lun);
1380 data = (u8 *) lun_data->scsi_lun;
1384 num_luns = (length / sizeof(struct scsi_lun));
1407 if (memcmp(&lunp->scsi_lun[sizeof(lun)], "\0\0\0\0", 4)) {
1416 data = (char *)lunp->scsi_lun;
1417 for (i = 0; i < sizeof(struct scsi_lun); i++)