rem: return;
context: ata_mode_sense_10(ide_device_info *device, ide_qrequest *qrequest){	scsi_ccb *request = qrequest->request;	scsi_cmd_mode_sense_10 *cmd = (scsi_cmd_mode_sense_10 *)request->cdb;	scsi_mode_param_header_10 param_header;	scsi_modepage_contr contr;	scsi_mode_param_block_desc block_desc;	size_t total_length = 		sizeof(scsi_mode_param_header_10) +		sizeof(scsi_mode_param_block_desc) +		sizeof(scsi_modepage_contr);	scsi_mode_param_dev_spec_da devspec = {		res0_0 : 0,		DPOFUA : 0,		res0_6 : 0,		WP : 0	};	int allocation_length;		SHOW_ERROR0( 0, "Hi!" );		allocation_length = ((int16)cmd->high_allocation_length << 8) 		| cmd->low_allocation_length;		// we answer control page requests and "all pages" requests	// (as the latter are the same as the first)	if( (cmd->page_code != SCSI_MODEPAGE_CONTROL &&		 cmd->page_code != SCSI_MODEPAGE_ALL) ||		(cmd->PC != SCSI_MODE_SENSE_PC_CURRENT &&		 cmd->PC != SCSI_MODE_SENSE_PC_SAVED)) 	{		set_sense( device, SCSIS_KEY_ILLEGAL_REQUEST, SCSIS_ASC_INV_CDB_FIELD );		return;	}	//param_header = (scsi_mode_param_header_10 *)request->data;	param_header.low_mode_data_len = total_length - 1;	param_header.high_mode_data_len = 0;	param_header.medium_type = 0; 		// XXX standard is a bit vague here	param_header.dev_spec_parameter = *(uint8 *)&devspec;	param_header.low_block_desc_len = sizeof( scsi_mode_param_block_desc );	param_header.high_block_desc_len = 0;		copy_sg_data( request, 0, allocation_length, 		&param_header, sizeof( param_header ), false );		/*block_desc = (scsi_mode_param_block_desc *)(request->data 		+ sizeof( *param_header ));*/	memset( &block_desc, 0, sizeof( block_desc ));	// density is reserved (0), descriptor apply to entire medium (num_blocks=0)	// remains the blocklen to be set	block_desc.high_blocklen = 0;	block_desc.med_blocklen = 512 >> 8;	block_desc.low_blocklen = 512 & 0xff;		copy_sg_data( request, sizeof( param_header ), allocation_length, 		&block_desc, sizeof( block_desc ), false );	/*contr = (scsi_modepage_contr *)(request->data 		+ sizeof( *param_header )		+ ((uint16)param_header->high_block_desc_len << 8) 		+ param_header->low_block_desc_len);*/		memset( &contr, 0, sizeof( contr ));	contr.RLEC = false;	contr.DQue = !device->CQ_enabled;	contr.QErr = false;					// when a command fails we requeue all 										// lost commands automagically	contr.QAM = SCSI_QAM_UNRESTRICTED;		copy_sg_data( request, 		sizeof( param_header ) 		+ ((uint16)param_header.high_block_desc_len << 8) 		+ param_header.low_block_desc_len, 		allocation_length,		&contr, sizeof( contr ), false );	// the number of bytes that were transferred to buffer is	// restricted by allocation length and by request data buffer size	total_length = min( total_length, allocation_length );	total_length = min( total_length, request->data_len );		request->data_resid = request->data_len - total_length;	return;}