mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
ufs: Fix Tegra UFS for Linux v6.15
In Linux v6.15, the pwr_change_notify() function was updated making the 3rd argument of type const. Add a conftest to detect this and update the Tegra UFS driver accordingly. JIRA LINQPJ14-47 Change-Id: I83f22bf0961200d9078fb35d408dac9149d786d2 Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3330680 (cherry picked from commit d9c16e70c4bf468a5ddab8a434693a8e7b442625) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3499757 Reviewed-by: Brad Griffis <bgriffis@nvidia.com> GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com> Tested-by: Brad Griffis <bgriffis@nvidia.com> Reviewed-by: svcacv <svcacv@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
3d26747166
commit
13ad68519d
@@ -8344,6 +8344,31 @@ compile_test() {
|
||||
compile_check_conftest "$CODE" "NV_UFS_HBA_VARIANT_OPS_HAS_SET_DMA_MASK" "" "types"
|
||||
;;
|
||||
|
||||
ufs_hba_variant_ops_pwr_change_notify_has_const_arg)
|
||||
#
|
||||
# Determine if the 3rd argument of pwr_change_notify() is const.
|
||||
#
|
||||
# In Linux v6.15, commit 3bcd901e4257 ("scsi: ufs: Constify the third
|
||||
# pwr_change_notify() argument") updated the pwr_change_notify()
|
||||
# function making the 3rd argument of type const.
|
||||
#
|
||||
CODE="
|
||||
#if defined(NV_UFS_UFSHCD_H_PRESENT)
|
||||
#include <ufs/ufshcd.h>
|
||||
#else
|
||||
#include \"../drivers/scsi/ufs/ufshcd.h\"
|
||||
#endif
|
||||
void conftest(struct ufs_hba_variant_ops *ops) {
|
||||
int (*fn)(struct ufs_hba *hba,
|
||||
enum ufs_notify_change_status status,
|
||||
const struct ufs_pa_layer_attr *desired_pwr_mode,
|
||||
struct ufs_pa_layer_attr *final_params) = ops->pwr_change_notify;
|
||||
}"
|
||||
|
||||
compile_check_conftest "$CODE" \
|
||||
"NV_UFS_HBA_VARIANT_OPS_PWR_CHANGE_NOTIFY_HAS_CONST_ARG" "" "types"
|
||||
;;
|
||||
|
||||
ufs_hba_variant_ops_suspend_has_status_arg)
|
||||
#
|
||||
# Determine if the 'suspend' function for the
|
||||
|
||||
Reference in New Issue
Block a user