]> git.baikalelectronics.ru Git - kernel.git/commit
net: qcom/emac: specify the correct size when mapping a DMA buffer
authorTimur Tabi <timur@codeaurora.org>
Fri, 22 Sep 2017 20:32:44 +0000 (15:32 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Sep 2017 23:34:29 +0000 (16:34 -0700)
commitd49f553ba072c2543d01a5369932f26cc2c9be96
treef19fb521b0796cc2af5ff3b3e20a148ca3a3f564
parent98966b750db3393c8462850eaab838647d26ffaa
net: qcom/emac: specify the correct size when mapping a DMA buffer

When mapping the RX DMA buffers, the driver was accidentally specifying
zero for the buffer length.  Under normal circumstances, SWIOTLB does not
need to allocate a bounce buffer, so the address is just mapped without
checking the size field.  This is why the error was not detected earlier.

Fixes: 537813f6160a ("net: emac: emac gigabit ethernet controller driver")
Cc: stable@vger.kernel.org
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