Date: Mon, 26 Jun 2023 12:08:54 GMT From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 50b27a0771b1 - stable/13 - LinuxKPI: pci: update struct msi_desc Message-ID: <202306261208.35QC8sO6083427@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=50b27a0771b112bba2b52ed137903c49947e884d commit 50b27a0771b112bba2b52ed137903c49947e884d Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2023-05-20 00:48:28 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2023-06-26 09:19:50 +0000 LinuxKPI: pci: update struct msi_desc It seems struct msi_desc is setup differently (or was changed) compared to how we added it a while ago. Catch up in order to keep drivers directly accessing fields compiling. Sponsored by: The FreeBSD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D40175 (cherry picked from commit 17bde9cbc6fc3ac219aa11243c0b75025786f628) --- sys/compat/linuxkpi/common/include/linux/pci.h | 8 ++++++-- sys/compat/linuxkpi/common/src/linux_pci.c | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index c2643a27b910..9cc56237482c 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -312,13 +312,17 @@ struct msi_msg { uint32_t data; }; -struct msi_desc { - struct msi_msg msg; +struct pci_msi_desc { struct { bool is_64; } msi_attrib; }; +struct msi_desc { + struct msi_msg msg; + struct pci_msi_desc pci; +}; + /* * If we find drivers accessing this from multiple KPIs we may have to * refcount objects of this structure. diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c index 88a6b749a043..4ee3e3dc5838 100644 --- a/sys/compat/linuxkpi/common/src/linux_pci.c +++ b/sys/compat/linuxkpi/common/src/linux_pci.c @@ -1016,7 +1016,7 @@ lkpi_pci_msi_desc_alloc(int irq) desc = malloc(sizeof(*desc), M_DEVBUF, M_WAITOK | M_ZERO); - desc->msi_attrib.is_64 = + desc->pci.msi_attrib.is_64 = (msi->msi_ctrl & PCIM_MSICTRL_64BIT) ? true : false; desc->msg.data = msi->msi_data;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202306261208.35QC8sO6083427>