mlx4: allow device removal by fixing dma unmap size
authorThadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Mon, 6 Feb 2012 08:39:49 +0000 (08:39 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 6 Feb 2012 19:42:28 +0000 (14:42 -0500)
After opening the network interface, Mellanox ConnectX device cannot be
removed by hotplug because it has not properly unmapped all DMA memory.

It happens that mlx4_en_activate_rx_rings overrides the variable that
keeps the size of the memory mapped.

This is fixed by passing to mlx4_en_destroy_rx_ring the same size that is
given to mlx4_en_create_rx_ring.

After applying this patch, hot unplugging the device works after opening
the interface.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

No differences found