History

bnge/bng_re: fix ring ID widths

Firmware requires more than 16 bits to address TX ring IDs for its internal QP management. Widen the associated HSI ring ID fields to 32 bits. The values firmware assigns remain within 24 bits, bounded by the hardware doorbell XID field. The fw_ring_id field belongs to bnge_ring_struct, a common struct shared by all ring types, so widening it to u32 applies uniformly across TX, RX, CP, and NQ rings but firmware assigns values within 16-bit range for all ring types except TX, which requires the wider field. Note that, Thor Ultra hardware has not yet been deployed and no firmware has been released to field, so backward compatibility is not a concern.

Vikas Gupta committed 3 months ago

Commit b9e55891 parent 47f42ff8 files · +39 −41Browse files

Showing the changes to include/linux (1 of 8 files). Show all

Unified · Split

include/linux/bnge/hsi.h+3−4
@@ -8317,8 +8317,7 @@ struct hwrm_ring_alloc_output { · 8316 unmodified lines
83178317 __le16 req_type;
83188318 __le16 seq_id;
83198319 __le16 resp_len;
8320− __le16 ring_id;
8321− __le16 logical_ring_id;
8320+ __le32 ring_id;
83228321 u8 push_buffer_index;
83238322 #define RING_ALLOC_RESP_PUSH_BUFFER_INDEX_PING_BUFFER 0x0UL
83248323 #define RING_ALLOC_RESP_PUSH_BUFFER_INDEX_PONG_BUFFER 0x1UL
@@ -8345,10 +8344,10 @@ struct hwrm_ring_free_input { · 20 unmodified lines
83458344 u8 flags;
83468345 #define RING_FREE_REQ_FLAGS_VIRTIO_RING_VALID 0x1UL
83478346 #define RING_FREE_REQ_FLAGS_LAST RING_FREE_REQ_FLAGS_VIRTIO_RING_VALID
8348− __le16 ring_id;
8347+ __le16 unused_1;
83498348 __le32 prod_idx;
83508349 __le32 opaque;
8351− __le32 unused_1;
8350+ __le32 ring_id;
83528351 };
83538352
83548353 /* hwrm_ring_free_output (size:128b/16B) */