]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/net/xen-netfront.c
xen/pvhvm: If xen_platform_pci=0 is set don't blow up (v4).
[mirror_ubuntu-bionic-kernel.git] / drivers / net / xen-netfront.c
index d85e66979711cbe62a168d9012f1a40ed2d5c405..2ab82fe75edeeb6192c5088408082c8f0318e10f 100644 (file)
@@ -277,12 +277,13 @@ static void xennet_alloc_rx_buffers(struct net_device *dev)
                if (!page) {
                        kfree_skb(skb);
 no_skb:
-                       /* Any skbuffs queued for refill? Force them out. */
-                       if (i != 0)
-                               goto refill;
                        /* Could not allocate any skbuffs. Try again later. */
                        mod_timer(&np->rx_refill_timer,
                                  jiffies + (HZ/10));
+
+                       /* Any skbuffs queued for refill? Force them out. */
+                       if (i != 0)
+                               goto refill;
                        break;
                }
 
@@ -2114,7 +2115,7 @@ static int __init netif_init(void)
        if (!xen_domain())
                return -ENODEV;
 
-       if (xen_hvm_domain() && !xen_platform_pci_unplug)
+       if (!xen_has_pv_nic_devices())
                return -ENODEV;
 
        pr_info("Initialising Xen virtual ethernet driver\n");