From nobody Fri Jul 01 14:57:42 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A1C518A36F5; Fri, 1 Jul 2022 14:57:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LZJGG3hgNz4dl9; Fri, 1 Jul 2022 14:57:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656687462; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sZgp9Z84QKt0k0VWdbwpowBI7ktgFrzI40ChahORPKk=; b=wGpeZ1Xmi33KBoc2uGKHTGaj2dW67GakJUkg/zoyr4pN7Y82mS9Fb2EkZM0PjiVYxx6YA2 oyzMSGd/BxBj6h8/+/dzxbM3EzngLGzZkSw3Zh+oADxQZpm4fgjG7HY8Cqp45bKIZB4Bfl ULDSiJy4ZCyc2l+nBZWYDM9jMDzKBok1QX1q1jTsXa8VmVfUCiHTi0ZwRAAo1h94EQWYUR CKft0ro3MMAmPYwuW5qVP1t857jTIc5oEhrubqcIRoTMAG+GJbs6SulOMRJCn0jEJVqWQm hj7gLW+iO8nsRxSd9pRAulDw16VnwJYG3PjxiUHqUqBrawv+kyawjLTMOL+dWA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2245D1DA01; Fri, 1 Jul 2022 14:57:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 261EvgpI057840; Fri, 1 Jul 2022 14:57:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 261EvgCB057839; Fri, 1 Jul 2022 14:57:42 GMT (envelope-from git) Date: Fri, 1 Jul 2022 14:57:42 GMT Message-Id: <202207011457.261EvgCB057839@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: a478f4afd83a - stable/13 - LinuxKPI: move pm_message_t from kernel.h to pm.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a478f4afd83a11f8f11d9b4e594aed21691f63b0 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656687462; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sZgp9Z84QKt0k0VWdbwpowBI7ktgFrzI40ChahORPKk=; b=b+3GzpSNviSpEn5hXhQV9Xqq8orduYY5DxQAW7wdTFSSFNPx7QXpkzJR08fIrycA0XA+0o fVJfkDisX+MrFUiuEf7L7BC/MUcW44gr30v5exi8FlDE66hTQ62NhO0yHm84g4eMWa8f5C YBTh9YIz3V6H7pnuKKJbFZaGYzkaM3S0zSNOo91bXc0NcATbHbkyOQ0HEEczBL0Ws7RjMu IVsW2EfERVSpI6Dim6ZQgq7XBWLPJoaMPvfBlE93BRaX64VN63Hcnx9pUxr5XNQ5NWxp0U 4hXqIEPV3w/JmvB6MtAZmUj7l2zoteoE8hhqp24X/fJ98aG8QtN+yRXUl9wJnQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1656687462; a=rsa-sha256; cv=none; b=m1NjWBRuk1d7FgKZ7+HmU45mcB4G5oUHv0BRbAXxXN4OPSEpQ5e+KpGEf3UibWxVFXD7+o kbzhxZatPh6mCyqq8jy/kUmiFIeay+it8QmWxusN84UuJgeocAyJ1wftr2E3rsR9i4U2JR KiL4WTpe3Nm2aVpC+fNVKkjAjSKs4SXnu6fdHP4c38pZkuYG01zB2UbrNMZEd/UQPZaw4o k/32ynewIJflbwFmivvpXkBY9FjeLx/FkMtemz1B7mi2UAl087Ai4mLPMRIRCEGmUj5FuX barWI4Fesvztpr1AsymbkzZcrpkkCpDYzEjHLzpmmzqPv4ilYu+czCgszCwmQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=a478f4afd83a11f8f11d9b4e594aed21691f63b0 commit a478f4afd83a11f8f11d9b4e594aed21691f63b0 Author: Bjoern A. Zeeb AuthorDate: 2022-05-20 21:50:01 +0000 Commit: Bjoern A. Zeeb CommitDate: 2022-07-01 13:48:24 +0000 LinuxKPI: move pm_message_t from kernel.h to pm.h Move pm_message_t from kernel.h to pm.h and remove a private define in usb.h as well as adjust the implementation in linux_usb.c. This cleans up what I believe to be a historic shortcut and is needed for future wireless driver updates. Leave a note in UPDATING that drm-kmod users need to update to the latest version before re-compiling a new kernel to avoid errors (see PR). Sponsored by: The FreeBSD Foundation PR: 264449 (drm-kmod port update, thanks wulf) Obtained from: bz_git_iwlwifi (Dec 2020) (partly) Reviewed by: hselasky, imp Differential Revision: https://reviews.freebsd.org/D35276 (cherry picked from commit 0e981d79b19da8fc550ea0dbe46e8658be988db4) --- UPDATING | 4 ++++ sys/compat/linuxkpi/common/include/linux/kernel.h | 4 ---- sys/compat/linuxkpi/common/include/linux/pci.h | 1 + sys/compat/linuxkpi/common/include/linux/pm.h | 4 ++++ sys/compat/linuxkpi/common/include/linux/usb.h | 3 ++- sys/compat/linuxkpi/common/src/linux_usb.c | 7 +++++-- 6 files changed, 16 insertions(+), 7 deletions(-) diff --git a/UPDATING b/UPDATING index f70e396a1435..a96d4b38e240 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,10 @@ Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before updating system packages and/or ports. +20220701: + LinuxKPI pm.h changes require an update to the latest drm-kmod version + before re-compiling to avoid errors. + 20220327: Bump __FreeBSD_verion to 1301501 after merging LinuxKPI and net80211 changes in order to help out-of-tree consumers to deal diff --git a/sys/compat/linuxkpi/common/include/linux/kernel.h b/sys/compat/linuxkpi/common/include/linux/kernel.h index 51f2ffe01e15..4987c582f0f3 100644 --- a/sys/compat/linuxkpi/common/include/linux/kernel.h +++ b/sys/compat/linuxkpi/common/include/linux/kernel.h @@ -597,10 +597,6 @@ extern bool linux_cpu_has_clflush; #define cpu_has_clflush linux_cpu_has_clflush #endif -typedef struct pm_message { - int event; -} pm_message_t; - /* Swap values of a and b */ #define swap(a, b) do { \ typeof(a) _swap_tmp = a; \ diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index 95187a231e1f..c5aeabbf1791 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -59,6 +59,7 @@ #include #include #include +#include struct pci_device_id { uint32_t vendor; diff --git a/sys/compat/linuxkpi/common/include/linux/pm.h b/sys/compat/linuxkpi/common/include/linux/pm.h index 6b8a7e768a8c..255c9bf0ea8b 100644 --- a/sys/compat/linuxkpi/common/include/linux/pm.h +++ b/sys/compat/linuxkpi/common/include/linux/pm.h @@ -33,6 +33,10 @@ #ifndef _LINUXKPI_LINUX_PM_H #define _LINUXKPI_LINUX_PM_H +typedef struct pm_message { + int event; +} pm_message_t; + #ifdef CONFIG_PM_SLEEP #define SIMPLE_DEV_PM_OPS(_name, _suspendfunc, _resumefunc) \ const struct dev_pm_ops _name = { \ diff --git a/sys/compat/linuxkpi/common/include/linux/usb.h b/sys/compat/linuxkpi/common/include/linux/usb.h index 032c1e53a015..3b7c8a2cde78 100644 --- a/sys/compat/linuxkpi/common/include/linux/usb.h +++ b/sys/compat/linuxkpi/common/include/linux/usb.h @@ -37,12 +37,13 @@ #include #include +#include + struct usb_device; struct usb_interface; struct usb_driver; struct urb; -typedef void *pm_message_t; typedef void (usb_complete_t)(struct urb *); #define USB_MAX_FULL_SPEED_ISOC_FRAMES (60 * 1) diff --git a/sys/compat/linuxkpi/common/src/linux_usb.c b/sys/compat/linuxkpi/common/src/linux_usb.c index 05fb63b93142..39a9f29e51ee 100644 --- a/sys/compat/linuxkpi/common/src/linux_usb.c +++ b/sys/compat/linuxkpi/common/src/linux_usb.c @@ -341,11 +341,14 @@ usb_linux_suspend(device_t dev) { struct usb_linux_softc *sc = device_get_softc(dev); struct usb_driver *udrv = usb_linux_get_usb_driver(sc); + pm_message_t pm_msg; int err; err = 0; - if (udrv && udrv->suspend) - err = (udrv->suspend) (sc->sc_ui, 0); + if (udrv && udrv->suspend) { + pm_msg.event = 0; /* XXX */ + err = (udrv->suspend) (sc->sc_ui, pm_msg); + } return (-err); }