提交 c3b7c12c 编写于 作者: S Steven J. Magnani 提交者: David S. Miller

ll_temac: Add support for V2 LLTEMAC core

LLTEMAC V1 cores place only received packet length in the app4 word.
V2 cores place additional information in app4.
Mask out the additional information when retrieving the packet length.
Signed-off-by: NSteven J. Magnani <steve@digidescorp.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 e1d44477
...@@ -615,7 +615,7 @@ static void ll_temac_recv(struct net_device *ndev) ...@@ -615,7 +615,7 @@ static void ll_temac_recv(struct net_device *ndev)
while ((bdstat & STS_CTRL_APP0_CMPLT)) { while ((bdstat & STS_CTRL_APP0_CMPLT)) {
skb = lp->rx_skb[lp->rx_bd_ci]; skb = lp->rx_skb[lp->rx_bd_ci];
length = cur_p->app4; length = cur_p->app4 & 0x3FFF;
skb_vaddr = virt_to_bus(skb->data); skb_vaddr = virt_to_bus(skb->data);
dma_unmap_single(ndev->dev.parent, skb_vaddr, length, dma_unmap_single(ndev->dev.parent, skb_vaddr, length,
...@@ -938,6 +938,9 @@ static int __devexit temac_of_remove(struct of_device *op) ...@@ -938,6 +938,9 @@ static int __devexit temac_of_remove(struct of_device *op)
static struct of_device_id temac_of_match[] __devinitdata = { static struct of_device_id temac_of_match[] __devinitdata = {
{ .compatible = "xlnx,xps-ll-temac-1.01.b", }, { .compatible = "xlnx,xps-ll-temac-1.01.b", },
{ .compatible = "xlnx,xps-ll-temac-2.00.a", },
{ .compatible = "xlnx,xps-ll-temac-2.02.a", },
{ .compatible = "xlnx,xps-ll-temac-2.03.a", },
{}, {},
}; };
MODULE_DEVICE_TABLE(of, temac_of_match); MODULE_DEVICE_TABLE(of, temac_of_match);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册