summaryrefslogtreecommitdiffstats
path: root/drivers/net/igbvf
diff options
context:
space:
mode:
authorInaky Perez-Gonzalez <inaky@linux.intel.com>2009-05-21 02:40:35 +0200
committerInaky Perez-Gonzalez <inaky@linux.intel.com>2009-06-11 12:30:21 +0200
commit2971a5bac8cab3cb56f19e9c494ecb3b120c5199 (patch)
treeaa01c08f44f337304984fac35d60cd940c112a45 /drivers/net/igbvf
parentwimax/i2400m: fix panic/warnings caused by missed check on empty TX message (diff)
downloadlinux-2971a5bac8cab3cb56f19e9c494ecb3b120c5199.tar.xz
linux-2971a5bac8cab3cb56f19e9c494ecb3b120c5199.zip
wimax/i2400m: fix panic due to missed corner cases on tail_room calculation
i2400m_tx_skip_tail() needs to handle the special case of being called when the tail room that is left over in the FIFO is zero. This happens when a TX message header was opened at the very end of the FIFO (without payloads). The i2400m_tx_close() code already marked said TX message (header) to be skipped and this function should be doing nothing. It is called anyway because it is part of a common "corner case" path handling which takes care of more cases than only this one. The tail room computation was also improved to take care of the case when tx_in is at the end of the buffer boundary; tail_room has to be modded (%) to the buffer size. To do that in a single well-documented place, __i2400m_tx_tail_room() is introduced and used. Treat i2400m->tx_in == 0 as a corner case and handle it accordingly. Found and diagnosed by Cindy H. Kao. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Diffstat (limited to 'drivers/net/igbvf')
0 files changed, 0 insertions, 0 deletions