diff options
author | Bruno Randolf <br1@einfach.org> | 2010-05-19 10:18:16 +0900 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-07-05 11:22:10 -0700 |
commit | 379dafdf83d6cc936980bad4bfb463a1558f7522 (patch) | |
tree | 6680f9849c5642bf0873c51b67b95628a2b86a48 /drivers/scsi/libsas | |
parent | 0775d3fb7c0be643f0bf50421d3ab471619e4dd4 (diff) |
ath5k: consistently use rx_bufsize for RX DMA
commit b5eae9ff5ba6d76de19286dd6429acd7cde3f79d upstream.
We should use the same buffer size we set up for DMA also in the hardware
descriptor. Previously we used common->rx_bufsize for setting up the DMA
mapping, but used skb_tailroom(skb) for the size we tell to the hardware in the
descriptor itself. The problem is that skb_tailroom(skb) can give us a larger
value than the size we set up for DMA before. This allows the hardware to write
into memory locations not set up for DMA. In practice this should rarely happen
because all packets should be smaller than the maximum 802.11 packet size.
On the tested platform rx_bufsize is 2528, and we allocated an skb of 2559
bytes length (including padding for cache alignment) but sbk_tailroom() was
2592. Just consistently use rx_bufsize for all RX DMA memory sizes.
Also use the return value of the descriptor setup function.
Signed-off-by: Bruno Randolf <br1@einfach.org>
Reviewed-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/scsi/libsas')
0 files changed, 0 insertions, 0 deletions