summaryrefslogtreecommitdiff
path: root/scripts/system/irq-affinity.pl
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2011-02-21 15:54:21 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2011-02-21 15:54:21 -0800
commit78d24daefeab6e91f282044abb8930678434ea8c (patch)
treebb72f37d647753428c00b5e040395845dfde14d1 /scripts/system/irq-affinity.pl
parentc8165a1a29572d7bf78d11c83afd18fff80a02f5 (diff)
downloadvyatta-cfg-system-78d24daefeab6e91f282044abb8930678434ea8c.tar.gz
vyatta-cfg-system-78d24daefeab6e91f282044abb8930678434ea8c.zip
Handle case of device with no active IRQ
Bug 6784 Disabled device has no IRQ, so don't change it.
Diffstat (limited to 'scripts/system/irq-affinity.pl')
-rwxr-xr-xscripts/system/irq-affinity.pl5
1 files changed, 2 insertions, 3 deletions
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"