bug in "PCI: Support INTx masking on ConnectX-4 with firmware x.14.1100+"?

2 messages, 2 authors, 2017-07-12 · open the first message on its own page

bug in "PCI: Support INTx masking on ConnectX-4 with firmware x.14.1100+"?

From: Denys Vlasenko <hidden>
Date: 2017-07-10 16:49:30

+       /* 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)?

Re: bug in "PCI: Support INTx masking on ConnectX-4 with firmware x.14.1100+"?

From: Noa Osherovich <hidden>
Date: 2017-07-12 07:58:48

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help