]> git.baikalelectronics.ru Git - kernel.git/commit
net: qcom/emac: enforce DMA address restrictions
authorTimur Tabi <timur@codeaurora.org>
Wed, 11 Oct 2017 19:52:25 +0000 (14:52 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Oct 2017 23:01:56 +0000 (16:01 -0700)
commit79decbabd59eb4cfc008f7625e3df2fb1fd5c796
tree6517b0971be884eaf91b521cbfbb95bd9969f498
parent38e04134d01e585c95e1a0c4681d7bf271d90f30
net: qcom/emac: enforce DMA address restrictions

The EMAC has a restriction that the upper 32 bits of the base addresses
for the RFD and RRD rings must be the same.  The ensure that restriction,
we allocate twice the space for the RRD and locate it at an appropriate
address.

We also re-arrange the allocations so that invalid addresses are even
less likely.

Signed-off-by: Timur Tabi <timur@codeaurora.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qualcomm/emac/emac-mac.c