CXGBE: fix big-endian behaviour
The setbit/clearbit pair casts the bitfield pointer to uint8_t* which effectively treats its contents as little-endian variable. The ffs() function accepts int as the parameter, which is big-endian. Use uint8_t here to avoid mismatch, as we have only 4 doorbells. Submitted by: Wojciech Macek <wma@freebsd.org> Reviewed by: np Obtained from: Semihalf Sponsored by: QCM Technologies Differential revision: https://reviews.freebsd.org/D13084
This commit is contained in:
parent
9e45a31607
commit
ec7f8d58b9
@ -424,7 +424,7 @@ struct sge_eq {
|
||||
struct mtx eq_lock;
|
||||
|
||||
struct tx_desc *desc; /* KVA of descriptor ring */
|
||||
uint16_t doorbells;
|
||||
uint8_t doorbells;
|
||||
volatile uint32_t *udb; /* KVA of doorbell (lies within BAR2) */
|
||||
u_int udb_qid; /* relative qid within the doorbell page */
|
||||
uint16_t sidx; /* index of the entry with the status page */
|
||||
@ -695,7 +695,7 @@ struct sge_nm_txq {
|
||||
uint16_t equiqidx; /* EQUIQ last requested at this pidx */
|
||||
uint16_t equeqidx; /* EQUEQ last requested at this pidx */
|
||||
uint16_t dbidx; /* pidx of the most recent doorbell */
|
||||
uint16_t doorbells;
|
||||
uint8_t doorbells;
|
||||
volatile uint32_t *udb;
|
||||
u_int udb_qid;
|
||||
u_int cntxt_id;
|
||||
@ -807,7 +807,7 @@ struct adapter {
|
||||
struct l2t_data *l2t; /* L2 table */
|
||||
struct tid_info tids;
|
||||
|
||||
uint16_t doorbells;
|
||||
uint8_t doorbells;
|
||||
int offload_map; /* ports with IFCAP_TOE enabled */
|
||||
int active_ulds; /* ULDs activated on this adapter */
|
||||
int flags;
|
||||
|
Loading…
x
Reference in New Issue
Block a user