scsi: ufs: expose APIs to allow compiling ufs_test as a module
The UFS tests are used for testing the functionality and performance of the UFS driver. In some of the tests ufs_test uses several scsi and UFS APIs for getting the disc information and sending UFS specific commands. The used APIs should be exposed in order to allow compilation of ufs_test as a module. Change-Id: I1263429bd3d5172af3b5552f0b8b503e32a04e51 Signed-off-by: Gilad Broner <gbroner@codeaurora.org> Signed-off-by: Maya Erez <merez@codeaurora.org>
This commit is contained in:
parent
279fdf9c3a
commit
bf0f645acb
2 changed files with 5 additions and 0 deletions
|
@ -604,6 +604,7 @@ struct gendisk *scsi_gendisk_get_from_dev(struct device *dev)
|
||||||
mutex_unlock(&sd_ref_mutex);
|
mutex_unlock(&sd_ref_mutex);
|
||||||
return !sdkp ? NULL : sdkp->disk;
|
return !sdkp ? NULL : sdkp->disk;
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL(scsi_gendisk_get_from_dev);
|
||||||
|
|
||||||
void scsi_gendisk_put(struct device *dev)
|
void scsi_gendisk_put(struct device *dev)
|
||||||
{
|
{
|
||||||
|
@ -615,6 +616,7 @@ void scsi_gendisk_put(struct device *dev)
|
||||||
scsi_device_put(sdev);
|
scsi_device_put(sdev);
|
||||||
mutex_unlock(&sd_ref_mutex);
|
mutex_unlock(&sd_ref_mutex);
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL(scsi_gendisk_put);
|
||||||
|
|
||||||
static unsigned char sd_setup_protect_cmnd(struct scsi_cmnd *scmd,
|
static unsigned char sd_setup_protect_cmnd(struct scsi_cmnd *scmd,
|
||||||
unsigned int dix, unsigned int dif)
|
unsigned int dix, unsigned int dif)
|
||||||
|
|
|
@ -3004,6 +3004,7 @@ out_unlock:
|
||||||
ufshcd_release_all(hba);
|
ufshcd_release_all(hba);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL(ufshcd_query_flag);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ufshcd_query_attr - API function for sending attribute requests
|
* ufshcd_query_attr - API function for sending attribute requests
|
||||||
|
@ -3068,6 +3069,7 @@ out:
|
||||||
ufshcd_release_all(hba);
|
ufshcd_release_all(hba);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL(ufshcd_query_attr);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ufshcd_query_attr_retry() - API function for sending query
|
* ufshcd_query_attr_retry() - API function for sending query
|
||||||
|
@ -3183,6 +3185,7 @@ out:
|
||||||
ufshcd_release_all(hba);
|
ufshcd_release_all(hba);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL(ufshcd_query_descriptor);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ufshcd_read_desc_param - read the specified descriptor parameter
|
* ufshcd_read_desc_param - read the specified descriptor parameter
|
||||||
|
|
Loading…
Add table
Reference in a new issue