diff options
author | Bjoern A. Zeeb <bz@FreeBSD.org> | 2023-05-20 00:48:28 +0000 |
---|---|---|
committer | Bjoern A. Zeeb <bz@FreeBSD.org> | 2023-06-08 18:04:35 +0000 |
commit | 17bde9cbc6fc3ac219aa11243c0b75025786f628 (patch) | |
tree | e64b90e5fe4313e2318204fb5199255988f1354d | |
parent | 7d7d12ba7765902f51dabb259a186ca3b1a2d351 (diff) | |
download | src-17bde9cbc6fc3ac219aa11243c0b75025786f628.tar.gz src-17bde9cbc6fc3ac219aa11243c0b75025786f628.zip |
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
MFC after: 10 days
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D40175
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/pci.h | 8 | ||||
-rw-r--r-- | 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 263dc41377cc..6891f8878534 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -295,13 +295,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 0d9b2827365f..5f4ce077a011 100644 --- a/sys/compat/linuxkpi/common/src/linux_pci.c +++ b/sys/compat/linuxkpi/common/src/linux_pci.c @@ -1009,7 +1009,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; |