diff options
author | Rob Herring <rob.herring@calxeda.com> | 2013-08-30 23:49:20 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-09-04 04:21:15 +0200 |
commit | ef07387faf33a95e011993200902d490b605407d (patch) | |
tree | ef3c78022eb35852b3ddea32c0a6bcd6cffb56c7 /drivers/net/ethernet/calxeda | |
parent | net: calxedaxgmac: remove NETIF_F_FRAGLIST setting (diff) | |
download | linux-ef07387faf33a95e011993200902d490b605407d.tar.xz linux-ef07387faf33a95e011993200902d490b605407d.zip |
net: calxedaxgmac: read correct field in xgmac_desc_get_buf_len
xgmac_desc_get_buf_len appears to have a copy/paste error. flags is the
wrong field to read. We should be reading buf_size field. cpu_to_le32
should also be le32_to_cpu. This never really mattered as this function
is only used for DMA mapping calls which happen to be nops with coherent
DMA.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/calxeda')
-rw-r--r-- | drivers/net/ethernet/calxeda/xgmac.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/calxeda/xgmac.c b/drivers/net/ethernet/calxeda/xgmac.c index 71f67206ba3a..d41af68ccb63 100644 --- a/drivers/net/ethernet/calxeda/xgmac.c +++ b/drivers/net/ethernet/calxeda/xgmac.c @@ -421,7 +421,7 @@ static inline void desc_set_buf_len(struct xgmac_dma_desc *p, u32 buf_sz) static inline int desc_get_buf_len(struct xgmac_dma_desc *p) { - u32 len = cpu_to_le32(p->flags); + u32 len = le32_to_cpu(p->buf_size); return (len & DESC_BUFFER1_SZ_MASK) + ((len & DESC_BUFFER2_SZ_MASK) >> DESC_BUFFER2_SZ_OFFSET); } |