summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_ix.c
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2016-12-06 16:13:02 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2016-12-06 16:13:02 +0000
commit0deff51d04828b803fef1adbc264b4a7dee37c13 (patch)
tree794ed46eb1fdea5ba293078141c9864b50913649 /sys/dev/pci/if_ix.c
parent749c9c4adc018eceda23d07c5f8f42b245f8dd03 (diff)
Improve error handling and don't fail if SFP module is not present;
tested by Hrvoje Popovski, thanks!
Diffstat (limited to 'sys/dev/pci/if_ix.c')
-rw-r--r--sys/dev/pci/if_ix.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/dev/pci/if_ix.c b/sys/dev/pci/if_ix.c
index 703e8634224..4bc8bc8148f 100644
--- a/sys/dev/pci/if_ix.c
+++ b/sys/dev/pci/if_ix.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ix.c,v 1.146 2016/12/02 15:10:53 mikeb Exp $ */
+/* $OpenBSD: if_ix.c,v 1.147 2016/12/06 16:13:01 mikeb Exp $ */
/******************************************************************************
@@ -272,11 +272,8 @@ ixgbe_attach(struct device *parent, struct device *self, void *aux)
"with your hardware.\nIf you are experiencing problems "
"please contact your Intel or hardware representative "
"who provided you with this hardware.\n");
- } else if (error == IXGBE_ERR_SFP_NOT_SUPPORTED) {
- printf(": Unsupported SFP+ Module\n");
- }
-
- if (error) {
+ } else if (error && (error != IXGBE_ERR_SFP_NOT_PRESENT &&
+ error != IXGBE_ERR_SFP_NOT_SUPPORTED)) {
printf(": Hardware Initialization Failure\n");
goto err_late;
}