diff options
author | Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> | 2011-11-23 17:10:42 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-11-24 04:10:00 +0400 |
commit | 782428535e0819b5b7c9825cd3faa2ad37032a70 (patch) | |
tree | 62f3df3b898b1b84ddefa21d91d7273539d8a3d8 /drivers/net/ethernet/ibm | |
parent | 1d125bd52e1e1b9810a2d5a32a76147912fa4133 (diff) | |
download | linux-782428535e0819b5b7c9825cd3faa2ad37032a70.tar.xz |
qlge: fix size of external list for TX address descriptors
When transmiting a fragmented skb, qlge fills a descriptor with the
fragment addresses, after DMA-mapping them. If there are more than eight
fragments, it will use the eighth descriptor as a pointer to an external
list. After mapping this external list, called OAL to a structure
containing more descriptors, it fills it with the extra fragments.
However, considering that systems with pages larger than 8KiB would have
less than 8 fragments, which was true before commit a715dea3c8e, it
defined a macro for the OAL size as 0 in those cases.
Now, if a skb with more than 8 fragments (counting skb->data as one
fragment), this would start overwriting the list of addresses already
mapped and would make the driver fail to properly unmap the right
addresses on architectures with pages larger than 8KiB.
Besides that, the list of mappings was one size too small, since it must
have a mapping for the maxinum number of skb fragments plus one for
skb->data and another for the OAL. So, even on architectures with page
sizes 4KiB and 8KiB, a skb with the maximum number of fragments would
make the driver overwrite its counter for the number of mappings, which,
again, would make it fail to unmap the mapped DMA addresses.
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ibm')
0 files changed, 0 insertions, 0 deletions