Skip to content

Commit

Permalink
ibmveth: lost IRQ while closing/opening device leads to service loss
Browse files Browse the repository at this point in the history
The order of freeing the IRQ and freeing the device in firmware
in ibmveth_close can cause the adapter to become unusable after a
subsequent ibmveth_open.  Only a reboot of the OS will make the
network device usable again. This is seen when cycling the adapter
up and down while there is network activity.

There is a window where an IRQ will be left unserviced (H_EOI will not
be called).  The solution is to make a VIO_IRQ_DISABLE h_call, free the
device with firmware, and then call free_irq.

Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Robert Jennings authored and David S. Miller committed Jul 16, 2010
1 parent 0f6142f commit ee2e611
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/ibmveth.c
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ static int ibmveth_close(struct net_device *netdev)
if (!adapter->pool_config)
netif_stop_queue(netdev);

free_irq(netdev->irq, netdev);
h_vio_signal(adapter->vdev->unit_address, VIO_IRQ_DISABLE);

do {
lpar_rc = h_free_logical_lan(adapter->vdev->unit_address);
Expand All @@ -689,6 +689,8 @@ static int ibmveth_close(struct net_device *netdev)
lpar_rc);
}

free_irq(netdev->irq, netdev);

adapter->rx_no_buffer = *(u64*)(((char*)adapter->buffer_list_addr) + 4096 - 8);

ibmveth_cleanup(adapter);
Expand Down

0 comments on commit ee2e611

Please sign in to comment.