From a5676f5260ba053a582e1ba87cc08900b6b8136e Mon Sep 17 00:00:00 2001 From: jsg Date: Mon, 10 Apr 2017 02:15:54 +0000 Subject: [PATCH] Attempt to map msk(4) interrupt via MSI. The device tree that ships with the overdrive 1000 has an interrupt-map property that is known to be wrong. Using MSI on msk makes the builtin Ethernet on the overdrive 1000 work. Tested on arm64 with "Marvell Yukon 88E8059" rev 0x00, Yukon-2 Optima (0x1) and i386 with "Marvell Yukon 88E8072" rev 0x10, Yukon-2 Extreme rev. B0 (0x2) Committing this early in the release cycle to try find cases where using MSI doesn't work. Based on part of an earlier patch from jmatthew@ ok jmatthew@ kettenis@ --- sys/dev/pci/if_msk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/pci/if_msk.c b/sys/dev/pci/if_msk.c index 7d2f4c549d4..1855fa36592 100644 --- a/sys/dev/pci/if_msk.c +++ b/sys/dev/pci/if_msk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_msk.c,v 1.126 2017/04/08 03:36:50 jmatthew Exp $ */ +/* $OpenBSD: if_msk.c,v 1.127 2017/04/10 02:15:54 jsg Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -1164,7 +1164,7 @@ mskc_attach(struct device *parent, struct device *self, void *aux) DPRINTFN(2, ("mskc_attach: allocate interrupt\n")); /* Allocate interrupt */ - if (pci_intr_map(pa, &ih)) { + if (pci_intr_map_msi(pa, &ih) != 0 && pci_intr_map(pa, &ih) != 0) { printf(": couldn't map interrupt\n"); goto fail_1; } -- 2.20.1