aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorandrea.merello2014-02-05 22:38:05 +0100
committerJohn W. Linville2014-02-06 14:35:45 -0500
commit2b4db05e7e2f1efc71e36a9dc1adf5ba164a2330 (patch)
tree19570147e57de17c75cdc7039c77f8c42cfee3a0 /tools
parent199160bbc9271b9351c062a477699fea72b29e3a (diff)
rtl8180: Add error check for pci_map_single return value in RX path
In original code the old RX DMA buffer is unmapped and processed and at the end of the isr a new buffer is mapped with pci_map_single and attached to the RX descriptor. If pci_map_single fails then the RX descriptor remains with no valid DMA buffer attached. In this condition the DMA will target where it shouldn't with obvious evil consequences. Simply avoiding re-arming the descriptor will prevent buggy DMA but it will result soon in RX stuck. This patch move the DMA mapping of the new buffer at the beginning of the ISR (and it adds error check for pci_map_single success/fail). If the DMA mapping fails then we do not unmap the old buffer and we re-arm the descriptor without processing it, with the old DMA buffer still attached. In this way we lose the currently RX-ed packet, but whenever next calls to pci_map_single will succeed again,then the RX process will go on without stuck. Signed-off-by: andrea merello <andrea.merello@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions