WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Fail more nicely when request_irq fail.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Fail more nicely when request_irq fail.
From: Xen patchbot -2.0-testing <patchbot-2.0-testing@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 27 Dec 2005 15:16:08 +0000
Delivery-date: Tue, 27 Dec 2005 15:20:10 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User vhanquez@xxxxxxxxxxxxxxxxxxxxxxx
# Node ID 013eab60cb78455fb602d99866e0cba8846bc244
# Parent  9d3927f57bb21707d4b6f04ff2d8a4addc6f7d71
Fail more nicely when request_irq fail.

Signed-off-by: Vincent Hanquez <vincent@xxxxxxxxxxxxx>

diff -r 9d3927f57bb2 -r 013eab60cb78 
linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c
--- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c      Sun Aug 28 
02:43:33 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c      Tue Dec 27 
10:18:42 2005
@@ -918,11 +918,20 @@
 vif_connect(struct net_private *np, netif_fe_interface_status_t *status)
 {
     struct net_device *dev = np->dev;
+    int err;
+    
     memcpy(dev->dev_addr, status->mac, ETH_ALEN);
     network_connect(dev, status);
     np->evtchn = status->evtchn;
     np->irq = bind_evtchn_to_irq(np->evtchn);
-    (void)request_irq(np->irq, netif_int, SA_SAMPLE_RANDOM, dev->name, dev);
+
+    err = request_irq(np->irq, netif_int, SA_SAMPLE_RANDOM, dev->name, dev);
+    if (err)
+    {
+        WPRINTK("request_irq failed (err=%d)\n", err);
+        unbind_evtchn_from_irq(np->evtchn);
+        return;
+    }
     netctrl_connected_count();
     (void)send_fake_arp(dev);
     vif_show(np);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Fail more nicely when request_irq fail., Xen patchbot -2 . 0-testing <=