/* scsi_build_sense_buffer - build sense data in a buffer @desc: Sense format (non zero == descriptor format, 0 == fixed format) @buf: Where to build sense data @key: Sense key @asc: Additional sense code @ascq: Additional sense code qualifier  */
void scsi_build_sense_buffer(int desc, u8 *buf, u8 key, u8 asc, u8 ascq)
/* scsi_build_sense_buffer - build sense data in a buffer @desc: Sense format (non zero == descriptor format, 0 == fixed format) @buf: Where to build sense data @key: Sense key @asc: Additional sense code @ascq: Additional sense code qualifier  */
void scsi_build_sense_buffer(int desc, u8 *buf, u8 key, u8 asc, u8 ascq)
{
	if (desc) {
		buf[0] = 0x72;
		buf[1] = key;
		buf[2] = asc;
		buf[3] = ascq;
		buf[7] = 0;
	} else {
		buf[0] = 0x70;
		buf[2] = key;
		buf[7] = 0xa;
		buf[12] = asc;
		buf[13] = ascq;
	}
}