diff options
author | Steven J. Magnani <steve@digidescorp.com> | 2010-02-17 02:14:20 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-17 16:35:36 -0500 |
commit | c3b7c12cd78d5c8264c87c29dcd9a8f1819f8313 (patch) | |
tree | 6439e72069890253f9d6140d984eeece6fc7dda8 /drivers/net/ll_temac_main.c | |
parent | e1d444771e0895c7706bc99857d69e4f2a58a531 (diff) |
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: Steven J. Magnani <steve@digidescorp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ll_temac_main.c')
-rw-r--r-- | drivers/net/ll_temac_main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ll_temac_main.c b/drivers/net/ll_temac_main.c index 8442c47e93e8..d7eb24cc2648 100644 --- a/drivers/net/ll_temac_main.c +++ b/drivers/net/ll_temac_main.c | |||
@@ -615,7 +615,7 @@ static void ll_temac_recv(struct net_device *ndev) | |||
615 | while ((bdstat & STS_CTRL_APP0_CMPLT)) { | 615 | while ((bdstat & STS_CTRL_APP0_CMPLT)) { |
616 | 616 | ||
617 | skb = lp->rx_skb[lp->rx_bd_ci]; | 617 | skb = lp->rx_skb[lp->rx_bd_ci]; |
618 | length = cur_p->app4; | 618 | length = cur_p->app4 & 0x3FFF; |
619 | 619 | ||
620 | skb_vaddr = virt_to_bus(skb->data); | 620 | skb_vaddr = virt_to_bus(skb->data); |
621 | dma_unmap_single(ndev->dev.parent, skb_vaddr, length, | 621 | dma_unmap_single(ndev->dev.parent, skb_vaddr, length, |
@@ -938,6 +938,9 @@ static int __devexit temac_of_remove(struct of_device *op) | |||
938 | 938 | ||
939 | static struct of_device_id temac_of_match[] __devinitdata = { | 939 | static struct of_device_id temac_of_match[] __devinitdata = { |
940 | { .compatible = "xlnx,xps-ll-temac-1.01.b", }, | 940 | { .compatible = "xlnx,xps-ll-temac-1.01.b", }, |
941 | { .compatible = "xlnx,xps-ll-temac-2.00.a", }, | ||
942 | { .compatible = "xlnx,xps-ll-temac-2.02.a", }, | ||
943 | { .compatible = "xlnx,xps-ll-temac-2.03.a", }, | ||
941 | {}, | 944 | {}, |
942 | }; | 945 | }; |
943 | MODULE_DEVICE_TABLE(of, temac_of_match); | 946 | MODULE_DEVICE_TABLE(of, temac_of_match); |