From 78d24daefeab6e91f282044abb8930678434ea8c Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 21 Feb 2011 15:54:21 -0800 Subject: Handle case of device with no active IRQ Bug 6784 Disabled device has no IRQ, so don't change it. --- scripts/system/irq-affinity.pl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'scripts/system/irq-affinity.pl') diff --git a/scripts/system/irq-affinity.pl b/scripts/system/irq-affinity.pl index cf68c0d1..e334f4aa 100755 --- a/scripts/system/irq-affinity.pl +++ b/scripts/system/irq-affinity.pl @@ -280,12 +280,11 @@ sub affinity_auto { # Figure out what style of irq naming is being used my $numirq = grep { /$ifname/ } @irqnames; - if ( $numirq <= 1 ) { + if ( $numirq == 1 ) { my $irq = get_irq($ifname); assign_single( $ifname, $irq) if $irq; - } else { + } elsif ($numirq > 1) { my $nq = grep { /$ifname-rx-/ } @irqnames; - if ( $nq > 0 ) { my $ntx = grep { /$ifname-tx-/ } @irqnames; die "$ifname: rx queues $nq != tx queues $ntx" -- cgit v1.2.3