From 51b649b5a5f1cdb715a4dbfc7d671eb81203d4cb Mon Sep 17 00:00:00 2001 From: kettenis Date: Fri, 3 Aug 2018 22:40:05 +0000 Subject: [PATCH] Pass PCIe requester ID as sideband data here as well. --- sys/arch/arm64/dev/acpipci.c | 4 +++- sys/arch/arm64/dev/pciecam.c | 4 +++- sys/dev/fdt/dwpcie.c | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/sys/arch/arm64/dev/acpipci.c b/sys/arch/arm64/dev/acpipci.c index b0877656bb6..b6f992d6bad 100644 --- a/sys/arch/arm64/dev/acpipci.c +++ b/sys/arch/arm64/dev/acpipci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpipci.c,v 1.3 2018/07/28 13:59:08 kettenis Exp $ */ +/* $OpenBSD: acpipci.c,v 1.4 2018/08/03 22:40:05 kettenis Exp $ */ /* * Copyright (c) 2018 Mark Kettenis * @@ -453,6 +453,8 @@ acpipci_intr_establish(void *v, pci_intr_handle_t ihp, int level, pcireg_t reg; int off; + /* Assume hardware passes Requester ID as sideband data. */ + data = pci_requester_id(ih->ih_pc, ih->ih_tag); cookie = ic->ic_establish_msi(ic->ic_cookie, &addr, &data, level, func, arg, name); if (cookie == NULL) diff --git a/sys/arch/arm64/dev/pciecam.c b/sys/arch/arm64/dev/pciecam.c index 65eaacfc9ea..74ae9a10ffd 100644 --- a/sys/arch/arm64/dev/pciecam.c +++ b/sys/arch/arm64/dev/pciecam.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pciecam.c,v 1.4 2018/07/28 13:59:08 kettenis Exp $ */ +/* $OpenBSD: pciecam.c,v 1.5 2018/08/03 22:40:05 kettenis Exp $ */ /* * Copyright (c) 2013,2017 Patrick Wildt * @@ -381,6 +381,8 @@ pciecam_intr_establish(void *self, pci_intr_handle_t ihp, int level, pcireg_t reg; int off; + /* Assume hardware passes Requester ID as sideband data. */ + data = pci_requester_id(ih->ih_pc, ih->ih_tag); cookie = arm_intr_establish_fdt_msi(sc->sc_node, &addr, &data, level, func, arg, (void *)name); if (cookie == NULL) diff --git a/sys/dev/fdt/dwpcie.c b/sys/dev/fdt/dwpcie.c index f56857ca208..0a338ccb37d 100644 --- a/sys/dev/fdt/dwpcie.c +++ b/sys/dev/fdt/dwpcie.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dwpcie.c,v 1.7 2018/07/28 13:59:08 kettenis Exp $ */ +/* $OpenBSD: dwpcie.c,v 1.8 2018/08/03 22:40:05 kettenis Exp $ */ /* * Copyright (c) 2018 Mark Kettenis * @@ -580,6 +580,8 @@ dwpcie_intr_establish(void *v, pci_intr_handle_t ihp, int level, pcireg_t reg; int off; + /* Assume hardware passes Requester ID as sideband data. */ + data = pci_requester_id(ih->ih_pc, ih->ih_tag); cookie = arm_intr_establish_fdt_msi(sc->sc_node, &addr, &data, level, func, arg, (void *)name); if (cookie == NULL) -- 2.20.1