Sergey Matyukevich <sergey.matyukevich.os@xxxxxxxxxxxxx> writes: > Use 64-bit dma for hosts with CONFIG_ARCH_DMA_ADDR_T_64BIT enabled. > > Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@xxxxxxxxxxxxx> > --- > .../net/wireless/quantenna/qtnfmac/pearl/pcie.c | 70 ++++++++++++++++++---- > .../wireless/quantenna/qtnfmac/pearl/pcie_ipc.h | 10 ++-- > .../quantenna/qtnfmac/pearl/pcie_regs_pearl.h | 1 + > 3 files changed, 65 insertions(+), 16 deletions(-) > > diff --git a/drivers/net/wireless/quantenna/qtnfmac/pearl/pcie.c b/drivers/net/wireless/quantenna/qtnfmac/pearl/pcie.c > index 2921d8069bf2..502e72b7cdcc 100644 > --- a/drivers/net/wireless/quantenna/qtnfmac/pearl/pcie.c > +++ b/drivers/net/wireless/quantenna/qtnfmac/pearl/pcie.c > @@ -403,10 +403,12 @@ static int alloc_bd_table(struct qtnf_pcie_bus_priv *priv) > priv->rx_bd_vbase = vaddr; > priv->rx_bd_pbase = paddr; > > - writel(QTN_HOST_LO32(paddr), > - PCIE_HDP_TX_HOST_Q_BASE_L(priv->pcie_reg_base)); > +#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT > writel(QTN_HOST_HI32(paddr), > PCIE_HDP_TX_HOST_Q_BASE_H(priv->pcie_reg_base)); > +#endif Personally I detest ifdefs and try to write code like this using IS_ENABLED(): if (IS_ENABLED(CONFIG_ARCH_DMA_ADDR_T_64BIT)) writel(QTN_HOST_HI32(paddr), PCIE_HDP_TX_HOST_Q_BASE_H(priv->pcie_reg_base)); But up to you which style you prefer. -- Kalle Valo