Skip to contentSkip to conversation

RDMA/vmw_pvrdma: Fix the active_speed and phys_state value

PATCH Applied Adit Ranadive 2 participants 2 messages Nov 2, 2020 – Nov 3, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 RDMA/vmw_pvrdma: Fix the active_speed and phys_state value

The PVRDMA device still reports the active_speed in u8. The pvrdma_port_attr structure is used by the device to report the port attributes in the device API query port response structure - pvrdma_cmd_query_port_resp - and shouldn't be changed.

Fixes 376ceb31ff87 ("RDMA: Fix link active_speed size")

---

Changelog:
- v0->v1: Reverted the structure layout only as per Jason. Updated description.

---
 drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.h +1 -1
index f0e5ffba2d51..97ed8f952f6e 100644
@@ -176,7 +176,7 @@ struct pvrdma_port_attr {
 	u8			subnet_timeout;
 	u8			init_type_reply;
 	u8			active_width;
-	u16			active_speed;
+	u8			active_speed;
 	u8			phys_state;
 	u8			reserved[2];
 };
Signature · 1 line
2.18.1
maintainer Applied
#1 lore raw
Quoted 8 lines · Adit Ranadive

The PVRDMA device still reports the active_speed in u8. The pvrdma_port_attr structure is used by the device to report the port attributes in the device API query port response structure - pvrdma_cmd_query_port_resp - and shouldn't be changed.

Fixes 376ceb31ff87 ("RDMA: Fix link active_speed size")
Quoted 7 lines

---

Changelog:
- v0->v1: Reverted the structure layout only as per Jason. Updated description.

---
 drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied to for-rc

If you think it is better you can send another patch to use the ib_get_eth_speed() function

Also please send a patch to move all of these ABI structs into the pvrdma_dev_api.h - ABI structures should not be strewn randomly over header files, it leads to mistakes like this.

Thanks,
Jason