[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



# 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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.