Patch "firmware: arm_ffa: Fix usage of partition info get count flag" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    firmware: arm_ffa: Fix usage of partition info get count flag

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     firmware-arm_ffa-fix-usage-of-partition-info-get-cou.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 2fbb7f647a422c87e7c155ac8cb640c970027f51
Author: Sudeep Holla <sudeep.holla@xxxxxxx>
Date:   Thu Apr 20 16:06:02 2023 +0100

    firmware: arm_ffa: Fix usage of partition info get count flag
    
    [ Upstream commit c6e045361a27ecd4fac6413164e0d091d80eee99 ]
    
    Commit bb1be7498500 ("firmware: arm_ffa: Add v1.1 get_partition_info support")
    adds support to discovery the UUIDs of the partitions or just fetch the
    partition count using the PARTITION_INFO_GET_RETURN_COUNT_ONLY flag.
    
    However the commit doesn't handle the fact that the older version doesn't
    understand the flag and must be MBZ which results in firmware returning
    invalid parameter error. That results in the failure of the driver probe
    which is in correct.
    
    Limit the usage of the PARTITION_INFO_GET_RETURN_COUNT_ONLY flag for the
    versions above v1.0(i.e v1.1 and onwards) which fixes the issue.
    
    Fixes: bb1be7498500 ("firmware: arm_ffa: Add v1.1 get_partition_info support")
    Reported-by: Jens Wiklander <jens.wiklander@xxxxxxxxxx>
    Reported-by: Marc Bonnici <marc.bonnici@xxxxxxx>
    Tested-by: Jens Wiklander <jens.wiklander@xxxxxxxxxx>
    Reviewed-by: Jens Wiklander <jens.wiklander@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230419-ffa_fixes_6-4-v2-2-d9108e43a176@xxxxxxx
    Signed-off-by: Sudeep Holla <sudeep.holla@xxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/firmware/arm_ffa/driver.c b/drivers/firmware/arm_ffa/driver.c
index 737f36e7a9035..5904a679d3512 100644
--- a/drivers/firmware/arm_ffa/driver.c
+++ b/drivers/firmware/arm_ffa/driver.c
@@ -274,7 +274,8 @@ __ffa_partition_info_get(u32 uuid0, u32 uuid1, u32 uuid2, u32 uuid3,
 	int idx, count, flags = 0, sz, buf_sz;
 	ffa_value_t partition_info;
 
-	if (!buffer || !num_partitions) /* Just get the count for now */
+	if (drv_info->version > FFA_VERSION_1_0 &&
+	    (!buffer || !num_partitions)) /* Just get the count for now */
 		flags = PARTITION_INFO_GET_RETURN_COUNT_ONLY;
 
 	mutex_lock(&drv_info->rx_lock);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux