]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx4_en: Fix handling of dma_map failure
authorAmir Vadai <amirv@mellanox.com>
Wed, 21 Aug 2013 07:08:58 +0000 (10:08 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 21 Aug 2013 19:19:26 +0000 (12:19 -0700)
commit3119d9058718a2798e7bd913307938d9dd99feff
tree813670497a0922ae11c17bb23e05287b1ff12f39
parent7b9fb357d71539a0d05a4cd50e33659d4a4a2f07
net/mlx4_en: Fix handling of dma_map failure

Result of skb_frag_dma_map() and dma_map_single() wasn't checked.
Added a check and proper handling in case of failure.
Moved the mapping to the beginning of mlx4_en_xmit(), before updating
the ring data structure to make error handling easier.

Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/en_tx.c