From c43e40ca09a20c1af5706fbe629442138a6dbede Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 15 Nov 2010 13:36:08 -0800 Subject: Restore IRQ affinity when device is renabled Bug 5698 When interface transistions back to online, the driver may have reacquired IRQ's and the irq affinity script will need to be rerun. --- templates/interfaces/ethernet/node.tag/disable/node.def | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/templates/interfaces/ethernet/node.tag/disable/node.def b/templates/interfaces/ethernet/node.tag/disable/node.def index 92f150dd..c3f9a9a0 100644 --- a/templates/interfaces/ethernet/node.tag/disable/node.def +++ b/templates/interfaces/ethernet/node.tag/disable/node.def @@ -1,12 +1,16 @@ help: Disable interface + create: /etc/netplug/linkdown.d/dhclient $VAR(../@) if ! ip link set $VAR(../@) down 2>/dev/null; then - echo "Error disabling dev $VAR(../@)" - /etc/netplug/linkup.d/dhclient $VAR(../@) - exit 1 + echo "Error disabling dev $VAR(../@)" + /etc/netplug/linkup.d/dhclient $VAR(../@) + exit 1 fi + delete: [ -d /sys/class/net/$VAR(../@) ] || exit 0 if ! ip link set $VAR(../@) up; then echo "Error enabling dev $VAR(../@)" exit 1 fi + affinity=$VAR(../smp_affinity/@) + sudo /opt/vyatta/sbin/irq-affinity.pl $VAR(../@) ${affinity:-auto} -- cgit v1.2.3