Module Name: src
Committed By: msaitoh
Date: Thu Dec 21 06:43:17 UTC 2017
Modified Files:
src/sys/dev/pci/ixgbe: ixv.c
Log Message:
Don't panic when resource shortage occured. Like ixgbe.c rev. 1.116.
- Move location of {ixgbe,ixv}_setup_interface() call at a position that
any error don't occur. One of the reason is that it should be. Another
reason is that it's hard to call ether_ifdetach() and if_detach() when
cold == 1 (because of pserialize_perform, xc_wait, timing of domaininit
and maybe more).
To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/sys/dev/pci/ixgbe/ixv.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/pci/ixgbe/ixv.c
diff -u src/sys/dev/pci/ixgbe/ixv.c:1.75 src/sys/dev/pci/ixgbe/ixv.c:1.76
--- src/sys/dev/pci/ixgbe/ixv.c:1.75 Wed Dec 6 04:08:50 2017
+++ src/sys/dev/pci/ixgbe/ixv.c Thu Dec 21 06:43:17 2017
@@ -1,4 +1,4 @@
-/*$NetBSD: ixv.c,v 1.75 2017/12/06 04:08:50 msaitoh Exp $*/
+/*$NetBSD: ixv.c,v 1.76 2017/12/21 06:43:17 msaitoh Exp $*/
/******************************************************************************
@@ -496,6 +496,12 @@ ixv_attach(device_t parent, device_t dev
/* hw.ix defaults init */
adapter->enable_aim = ixv_enable_aim;
+ error = ixv_allocate_msix(adapter, pa);
+ if (error) {
+ device_printf(dev, "ixv_allocate_msix() failed!\n");
+ goto err_late;
+ }
+
/* Setup OS specific network interface */
error = ixv_setup_interface(dev, adapter);
if (error != 0) {
@@ -503,12 +509,6 @@ ixv_attach(device_t parent, device_t dev
goto err_late;
}
- error = ixv_allocate_msix(adapter, pa);
- if (error) {
- device_printf(dev, "ixv_allocate_msix() failed!\n");
- goto err_late;
- }
-
/* Do the stats setup */
ixv_save_stats(adapter);
ixv_init_stats(adapter);