Merge 6.5-rc4 into char-misc-next
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 31 Jul 2023 07:31:38 +0000 (09:31 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 31 Jul 2023 07:31:38 +0000 (09:31 +0200)
We need the char-misc fixes in here as well for testing.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
MAINTAINERS
arch/x86/kernel/apm_32.c
drivers/char/agp/uninorth-agp.c
drivers/char/bsr.c
drivers/firmware/stratix10-svc.c
drivers/misc/mei/bus-fixup.c
drivers/misc/mei/bus.c
drivers/misc/mei/gsc-me.c
drivers/misc/mei/init.c
drivers/misc/mei/mei_dev.h
drivers/misc/mei/pxp/mei_pxp.c

index 53b7ca8..0e6aa9f 100644 (file)
@@ -8771,6 +8771,15 @@ S:       Supported
 F:     Documentation/networking/device_drivers/ethernet/google/gve.rst
 F:     drivers/net/ethernet/google
 
+GOOGLE FIRMWARE DRIVERS
+M:     Tzung-Bi Shih <tzungbi@kernel.org>
+R:     Brian Norris <briannorris@chromium.org>
+R:     Julius Werner <jwerner@chromium.org>
+L:     chrome-platform@lists.linux.dev
+S:     Maintained
+T:     git git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux.git
+F:     drivers/firmware/google/
+
 GPD POCKET FAN DRIVER
 M:     Hans de Goede <hdegoede@redhat.com>
 L:     platform-driver-x86@vger.kernel.org
index c6c15ce..5934ee5 100644 (file)
@@ -239,12 +239,6 @@ extern int (*console_blank_hook)(int);
 #endif
 
 /*
- * The apm_bios device is one of the misc char devices.
- * This is its minor number.
- */
-#define        APM_MINOR_DEV   134
-
-/*
  * Various options can be changed at boot time as follows:
  * (We allow underscores for compatibility with the modules code)
  *     apm=on/off                      enable/disable APM
index 62de7f4..84411b1 100644 (file)
@@ -3,6 +3,7 @@
  * UniNorth AGPGART routines.
  */
 #include <linux/module.h>
+#include <linux/of.h>
 #include <linux/pci.h>
 #include <linux/slab.h>
 #include <linux/init.h>
index 1214385..70d31ae 100644 (file)
@@ -6,11 +6,10 @@
  * Author: Sonny Rao <sonnyrao@us.ibm.com>
  */
 
+#include <linux/device.h>
 #include <linux/kernel.h>
 #include <linux/of.h>
 #include <linux/of_address.h>
-#include <linux/of_device.h>
-#include <linux/of_platform.h>
 #include <linux/fs.h>
 #include <linux/module.h>
 #include <linux/cdev.h>
index 2d67412..cab11af 100644 (file)
@@ -756,7 +756,7 @@ svc_create_memory_pool(struct platform_device *pdev,
        paddr = begin;
        size = end - begin;
        va = devm_memremap(dev, paddr, size, MEMREMAP_WC);
-       if (!va) {
+       if (IS_ERR(va)) {
                dev_err(dev, "fail to remap shared memory\n");
                return ERR_PTR(-EINVAL);
        }
index b8b716f..2733070 100644 (file)
@@ -184,6 +184,7 @@ static int mei_fwver(struct mei_cl_device *cldev)
                cldev->bus->fw_ver[i].hotfix = fwver->ver[i].hotfix;
                cldev->bus->fw_ver[i].buildno = fwver->ver[i].buildno;
        }
+       cldev->bus->fw_ver_received = 1;
 
        return ret;
 }
@@ -237,8 +238,11 @@ static void mei_gsc_mkhi_ver(struct mei_cl_device *cldev)
 {
        int ret;
 
-       /* No need to enable the client if nothing is needed from it */
-       if (!cldev->bus->fw_f_fw_ver_supported)
+       /*
+        * No need to enable the client if nothing is needed from it.
+        * No need to fill in version if it is already filled in by the fix address client.
+        */
+       if (!cldev->bus->fw_f_fw_ver_supported || cldev->bus->fw_ver_received)
                return;
 
        ret = mei_cldev_enable(cldev);
@@ -555,8 +559,8 @@ static struct mei_fixup {
        MEI_FIXUP(MEI_UUID_NFC_HCI, mei_nfc),
        MEI_FIXUP(MEI_UUID_WD, mei_wd),
        MEI_FIXUP(MEI_UUID_MKHIF_FIX, mei_mkhi_fix),
-       MEI_FIXUP(MEI_UUID_IGSC_MKHI, mei_gsc_mkhi_ver),
        MEI_FIXUP(MEI_UUID_IGSC_MKHI_FIX, mei_gsc_mkhi_fix_ver),
+       MEI_FIXUP(MEI_UUID_IGSC_MKHI, mei_gsc_mkhi_ver),
        MEI_FIXUP(MEI_UUID_HDCP, whitelist),
        MEI_FIXUP(MEI_UUID_ANY, vt_support),
        MEI_FIXUP(MEI_UUID_PAVP, pxp_is_ready),
index 33ec642..2e65ce6 100644 (file)
@@ -1329,6 +1329,7 @@ static struct mei_cl_device *mei_cl_bus_dev_alloc(struct mei_device *bus,
        mei_cl_bus_set_name(cldev);
        cldev->is_added   = 0;
        INIT_LIST_HEAD(&cldev->bus_list);
+       device_enable_async_suspend(&cldev->dev);
 
        return cldev;
 }
index e63cabd..6be8f1c 100644 (file)
@@ -312,4 +312,5 @@ module_auxiliary_driver(mei_gsc_driver);
 MODULE_AUTHOR("Intel Corporation");
 MODULE_ALIAS("auxiliary:i915.mei-gsc");
 MODULE_ALIAS("auxiliary:i915.mei-gscfi");
+MODULE_DESCRIPTION("Intel(R) Graphics System Controller");
 MODULE_LICENSE("GPL");
index bac8852..c35e005 100644 (file)
@@ -142,6 +142,9 @@ int mei_reset(struct mei_device *dev)
 
        mei_hbm_reset(dev);
 
+       /* clean stale FW version */
+       dev->fw_ver_received = 0;
+
        memset(dev->rd_msg_hdr, 0, sizeof(dev->rd_msg_hdr));
 
        if (ret) {
@@ -157,7 +160,10 @@ int mei_reset(struct mei_device *dev)
 
        ret = mei_hw_start(dev);
        if (ret) {
-               dev_err(dev->dev, "hw_start failed ret = %d\n", ret);
+               char fw_sts_str[MEI_FW_STATUS_STR_SZ];
+
+               mei_fw_status_str(dev, fw_sts_str, MEI_FW_STATUS_STR_SZ);
+               dev_err(dev->dev, "hw_start failed ret = %d fw status = %s\n", ret, fw_sts_str);
                return ret;
        }
 
index 895011b..cdf8a2e 100644 (file)
@@ -512,6 +512,7 @@ struct mei_dev_timeouts {
  * @fw_ver : FW versions
  *
  * @fw_f_fw_ver_supported : fw feature: fw version supported
+ * @fw_ver_received : fw version received
  *
  * @me_clients_rwsem: rw lock over me_clients list
  * @me_clients  : list of FW clients
@@ -604,6 +605,7 @@ struct mei_device {
        struct mei_fw_version fw_ver[MEI_MAX_FW_VER_BLOCKS];
 
        unsigned int fw_f_fw_ver_supported:1;
+       unsigned int fw_ver_received:1;
 
        struct rw_semaphore me_clients_rwsem;
        struct list_head me_clients;
index 3bf560b..2dcb916 100644 (file)
@@ -40,8 +40,7 @@ mei_pxp_send_message(struct device *dev, const void *message, size_t size)
 
        cldev = to_mei_cl_device(dev);
 
-       /* temporary drop const qualifier till the API is fixed */
-       byte = mei_cldev_send(cldev, (u8 *)message, size);
+       byte = mei_cldev_send(cldev, message, size);
        if (byte < 0) {
                dev_dbg(dev, "mei_cldev_send failed. %zd\n", byte);
                return byte;