Hi,
On 7/10/2017 7:49 PM, Denys Vlasenko wrote:
+ /* Reading from resource space should be 32b aligned */
+ fw_maj_min = ioread32be(fw_ver);
+ fw_sub_min = ioread32be(fw_ver + 1);
+ fw_major = fw_maj_min & 0xffff;
+ fw_minor = fw_maj_min >> 16;
+ fw_subminor = fw_sub_min & 0xffff;
Maybe second read should be ioread32be(fw_ver + 4)?
fw_ver is a pointer:
__be32 __iomem *fw_ver;
Increasing its value means incrementing it by the size of its contents
thus reading the next 32 bits.
Doesn't seem like a bug.
Thanks, Noa