Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1554ed20 authored by Sara Sharon's avatar Sara Sharon Committed by Luca Coelho
Browse files

iwlwifi: pcie: use shadow registers for updating write pointer



The RX queues have a shadow register for the write pointer
that enables updates without grabbing NIC access. Use them
instead of the periphery registers because accessing those
is much more expensive.

Signed-off-by: default avatarSara Sharon <sara.sharon@intel.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent cf961e16
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -321,6 +321,9 @@ static inline unsigned int FH_MEM_CBBC_QUEUE(unsigned int chnl)
/* Write index table */
/* Write index table */
#define RFH_Q0_FRBDCB_WIDX 0xA08080
#define RFH_Q0_FRBDCB_WIDX 0xA08080
#define RFH_Q_FRBDCB_WIDX(q) (RFH_Q0_FRBDCB_WIDX + (q) * 4)
#define RFH_Q_FRBDCB_WIDX(q) (RFH_Q0_FRBDCB_WIDX + (q) * 4)
/* Write index table - shadow registers */
#define RFH_Q0_FRBDCB_WIDX_TRG 0x1C80
#define RFH_Q_FRBDCB_WIDX_TRG(q) (RFH_Q0_FRBDCB_WIDX_TRG + (q) * 4)
/* Read index table */
/* Read index table */
#define RFH_Q0_FRBDCB_RIDX 0xA080C0
#define RFH_Q0_FRBDCB_RIDX 0xA080C0
#define RFH_Q_FRBDCB_RIDX(q) (RFH_Q0_FRBDCB_RIDX + (q) * 4)
#define RFH_Q_FRBDCB_RIDX(q) (RFH_Q0_FRBDCB_RIDX + (q) * 4)
+2 −2
Original line number Original line Diff line number Diff line
@@ -208,7 +208,7 @@ static void iwl_pcie_rxq_inc_wr_ptr(struct iwl_trans *trans,


	rxq->write_actual = round_down(rxq->write, 8);
	rxq->write_actual = round_down(rxq->write, 8);
	if (trans->cfg->mq_rx_supported)
	if (trans->cfg->mq_rx_supported)
		iwl_write_prph(trans, RFH_Q_FRBDCB_WIDX(rxq->id),
		iwl_write32(trans, RFH_Q_FRBDCB_WIDX_TRG(rxq->id),
			    rxq->write_actual);
			    rxq->write_actual);
	/*
	/*
	 * write to FH_RSCSR_CHNL0_WPTR register even in MQ as a W/A to
	 * write to FH_RSCSR_CHNL0_WPTR register even in MQ as a W/A to