From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.179 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796343532; b=0wpRqg16M7KZepRPompxUqh6KT6pV2s2pBHZVkS9g3poqoQLcTUzHnZURYw8AATWMjCY 7agQ0t43JxoS5S4BqOvvBA8dnHgvScPYbd/gJNT36ITKE9pTbzectZRH2nyxsZlWHzSSA E4eGL7C/uYlETCooZ2cWnKOpV3YuPmm2tOoq9S41Bt48dMCG6ib4wPr8HeAF0kVldmZZE Yma8XKVOUpft8QWXVfh+qCRyq40RQZwECdBhydBPUP4E6km66Ceg+R3qxCOuPUasw2dO6 74xnDjAIy0g5G0uc55L3y4bJVo9GbsxqABDfVnhtjzs4AqwjamuMda5flLSwdgwBYTg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796343532; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject: Date:Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; bh=k52lANsL1FWBpQmyhTXpqLk8bquuLgJ5n1jDzwt9Vlw=; b=lcSXSyfBT+Vm2Z2bGDfKYYSTnnaLbrehKcf4WYBDSk5JQJR8c/60r29EnYEnyUCZ4cDN TNyK85ryVSbXQDX/85lBn2Szlvg4QE2DT0pYsdfvjS1yDu5r45w84ELiANzmUFruBLLDy wyqJgYO3VPuCnS+JyEdGzFakFBykCb7L29sMdC2aifYM7kf8xQaiSwICOrLbu2O0ooePn fv0+iISsjeByxzQN5oSa0KskGvGGdZ5S93pAcfT2BhiyMhnXN2V5pYMPKE8FD9Lom+mgr RBctz04t7WxpOp3JpwJoAHKbqgB3T2MiKvdPD4lrnenujs8N9X71IpDmo1helhJezZQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=r8MF9+Oy; arc=none smtp.remote-ip=74.125.82.179 Received: from mail-dy1-f179.google.com (mail-dy1-f179.google.com [74.125.82.179]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9982A606A338 for ; Fri, 4 Dec 2026 00:18:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 9982A606A338 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=r8MF9+Oy Received: by mail-dy1-f179.google.com with SMTP id 5a478bee46e88-387504e1934so361930eec.1 for ; Thu, 03 Dec 2026 16:18:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796343531; x=1796948331; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=k52lANsL1FWBpQmyhTXpqLk8bquuLgJ5n1jDzwt9Vlw=; b=r8MF9+Oyr67cSDDaL9jh97aXzbxzIzs/pvTNmg4z2cdsr//edT+dfmD2j9dURwG9Vh 1/p8KIwtBa5rN52ZEvVLV284nmv2fo+W8HEtS+MOIMDTGge4D7uIXscjW4LpLiW16gEC u69Y1pqf7aTW6UVzI8Wye/coR5MShY/OhKJCrjN+Al3fguDgdCk5umKJgBT+9i8SYnVm 6qydFDPI4ir3djX1lkvNn4Z4lwds35Qcw2D/sR3TP0Q3APYXjXDJcp8xXJMUm587irJl pn2Cmf/bntQBUFw1RdfJmvrQLRu0dC1Itpl9IYJ1LQqriuA39RvWIACBN5x492NDhG43 BehQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796343531; x=1796948331; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=k52lANsL1FWBpQmyhTXpqLk8bquuLgJ5n1jDzwt9Vlw=; b=WXEHJvHAMWqCEYxJFOCwymecUe3KMN21CMGwKvKilTsReaVgESXUqpLGfKLS7B9pxR ky7uAO78MeFpD3DKRttvXPv8nXiGwOEwt1YilS9ZoWLSV0chsN+RoNA6/yv8apU9fcNP FKEebJwmBXqDaS+4hsdz/Iw8VF7P4UYc40ukax7MNUFyh8TqXFpnntj+EChNysfYSi4e cSxe4h5FP+Lm9qJAsqcyJRKFTdhVjo2UZliseKpPi+wd3oUPND6XtK5kOIe48FbH0wWd VfhPOCuABMlb9yeaGg1RO8qQcz63bBivj047F10YuUVhwxfBAENqTMLIEkILKUxDNnWa sSJQ== X-Gm-Message-State: APuU4Z+ocveE7e0YryLYYcJbwoqKCIGFKeH2aORNIg6cGKJpOjLcJ1z0 C9Siw2q667Aow5qXyZdttpOVpJhS1W0QDsK7W2Ubg5gq7rxxv5KZQWEu X-Gm-Gg: AZFdTZdhWIVnrb9vw3ylT6BegQ2hXe7NRoBoxht2H6qlmN7bv1tTgTbl5LYJ0O4o8Aw r8QbF+a1OrDzXti1+DueEXcRHn0JH1cVNBOjEh0S82P9YYYyATBEylqtwxxuRPv7UXz9/mPiyQ5 +euDQcq1zlsWP3vWUTRbQIWSpOwDRPF5W4kHtDy7HWPuTjUEhnQmXNXgFBEdEre+AM85ih7esHi nK8XP7Tr6v80+opsaxVfa7xtbR/YIm9KNFwRj0sEDaY5ApD1Dp3jVnfgrq0VDEAgjB8ne0JPmJo L9wA0rBEWc/tubRiC6WsADqGgPZBorRLvpsmf4UhjvONHNai+8HXsMb5X/POpnIRS4jR2Ts8DYh 3MHcZ+CSL4Q1ONrRIt50dBWbxKRDPKBcov0vOe2Z3XxP1aKsMxxxomzgU7sEokfyIlBvdTESxRr EkMhEI4CPZccr/o5I+UxYVS91mWsXN7FW85O3P/DryN9OXXq4ATlO+7dT6Ncrt5wBpzUdnbR9QV BEmqkxJ2wD53ZOl8MzA3/12/3TwgFcu0JpAuY5q3X7iZF7DdVHHmI/bITipf83s6QppP1WOqjv+ V+rnnMfefxibC+lZBNyRnx4/oWhz3wgpHR9ZzfbAdvcOnvU+k/cdtGq96lfWOReAllm2QRAX17P JSoM2Oq9zEFK5MEAjXoJvlqsp5f99XHksuB8rdfxaSsA4f8IhTHE= X-Received: by 2002:a05:7301:f23:b0:386:d310:4c1c with SMTP id 5a478bee46e88-3875216e25dmr435445eec.21.1796343530617; Thu, 03 Dec 2026 16:18:50 -0800 (PST) Received: from lappy.taila8a9bd.ts.net (108-228-232-20.lightspeed.sndgca.sbcglobal.net. [108.228.232.20]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-387521bdedbsm1130836eec.12.2026.12.03.16.18.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Dec 2026 16:18:50 -0800 (PST) From: "Derek J. Clark" To: jikos@kernel.org, bentiss@kernel.org Cc: linux-input@vger.kernel.org, kernel@lists.opengamingcollective.org, gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, pgriffais@valvesoftware.com, derekjohn.clark@gmail.com Subject: [PATCH 1/8] HID: hid-msi: Queue the RGB work item on system_dfl_wq Date: Thu, 3 Dec 2026 16:18:39 -0800 Message-ID: <20261204001846.3801336-2-derekjohn.clark@gmail.com> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261204001846.3801336-1-derekjohn.clark@gmail.com> References: <20261204001846.3801336-1-derekjohn.clark@gmail.com> X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit system_wq is deprecated. Queuing work on it warns: workqueue: work func claw_rgb_queue_fn [hid_msi] enqueued on deprecated workqueue. Use system_{percpu|dfl}_wq instead. The RGB work item writes up to eight HID reports to the MCU and blocks waiting for each reply, so move it to system_dfl_wq. That is the unbound system workqueue, and other HID drivers queue comparable MCU transactions there. The ordering comments name system_wq as the workqueue the paired stores run on. The configuration work is queued with schedule_delayed_work(), which now uses system_percpu_wq, so rename the workqueue to the one those pairs now run on. Fixes: f27e2e3c80ed ("HID: hid-msi: Add RGB control interface") Signed-off-by: Derek J. Clark --- drivers/hid/hid-msi.c | 54 +++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/drivers/hid/hid-msi.c b/drivers/hid/hid-msi.c index 23d731f700c9..d4128955e463 100644 --- a/drivers/hid/hid-msi.c +++ b/drivers/hid/hid-msi.c @@ -685,7 +685,7 @@ static ssize_t gamepad_mode_store(struct device *dev, struct device_attribute *a int i, ret = -EINVAL; scoped_guard(spinlock_irqsave, &drvdata->registration_lock) { - /* Pairs with smp_store_release from cfg_setup_fn in system_wq context */ + /* Pairs with smp_store_release from cfg_setup_fn in system_percpu_wq context */ if (!smp_load_acquire(&drvdata->gp_registered)) return -ENODEV; } @@ -714,7 +714,7 @@ static ssize_t gamepad_mode_show(struct device *dev, int ret, i; scoped_guard(spinlock_irqsave, &drvdata->registration_lock) { - /* Pairs with smp_store_release from cfg_setup_fn in system_wq context */ + /* Pairs with smp_store_release from cfg_setup_fn in system_percpu_wq context */ if (!smp_load_acquire(&drvdata->gp_registered)) return -ENODEV; } @@ -760,7 +760,7 @@ static ssize_t mkeys_function_store(struct device *dev, struct device_attribute int i, ret = -EINVAL; scoped_guard(spinlock_irqsave, &drvdata->registration_lock) { - /* Pairs with smp_store_release from cfg_setup_fn in system_wq context */ + /* Pairs with smp_store_release from cfg_setup_fn in system_percpu_wq context */ if (!smp_load_acquire(&drvdata->gp_registered)) return -ENODEV; } @@ -789,7 +789,7 @@ static ssize_t mkeys_function_show(struct device *dev, struct device_attribute * int ret, i; scoped_guard(spinlock_irqsave, &drvdata->registration_lock) { - /* Pairs with smp_store_release from cfg_setup_fn in system_wq context */ + /* Pairs with smp_store_release from cfg_setup_fn in system_percpu_wq context */ if (!smp_load_acquire(&drvdata->gp_registered)) return -ENODEV; } @@ -832,7 +832,7 @@ static ssize_t reset_store(struct device *dev, struct device_attribute *attr, int ret; scoped_guard(spinlock_irqsave, &drvdata->registration_lock) { - /* Pairs with smp_store_release from cfg_setup_fn in system_wq context */ + /* Pairs with smp_store_release from cfg_setup_fn in system_percpu_wq context */ if (!smp_load_acquire(&drvdata->gp_registered)) return -ENODEV; } @@ -889,7 +889,7 @@ static int claw_mkey_store(struct device *dev, const char *buf, u8 mkey) int ret, key_count, i; scoped_guard(spinlock_irqsave, &drvdata->registration_lock) { - /* Pairs with smp_store_release from cfg_setup_fn in system_wq context */ + /* Pairs with smp_store_release from cfg_setup_fn in system_percpu_wq context */ if (!smp_load_acquire(&drvdata->gp_registered)) return -ENODEV; } @@ -939,7 +939,7 @@ static int claw_mkey_show(struct device *dev, char *buf, enum claw_key_index m_k u8 *codes; scoped_guard(spinlock_irqsave, &drvdata->registration_lock) { - /* Pairs with smp_store_release from cfg_setup_fn in system_wq context */ + /* Pairs with smp_store_release from cfg_setup_fn in system_percpu_wq context */ if (!smp_load_acquire(&drvdata->gp_registered)) return -ENODEV; } @@ -1034,7 +1034,7 @@ static ssize_t rumble_intensity_left_store(struct device *dev, int ret; scoped_guard(spinlock_irqsave, &drvdata->registration_lock) { - /* Pairs with smp_store_release from cfg_setup_fn in system_wq context */ + /* Pairs with smp_store_release from cfg_setup_fn in system_percpu_wq context */ if (!smp_load_acquire(&drvdata->gp_registered)) return -ENODEV; } @@ -1077,7 +1077,7 @@ static ssize_t rumble_intensity_left_show(struct device *dev, u8 val; scoped_guard(spinlock_irqsave, &drvdata->registration_lock) { - /* Pairs with smp_store_release from cfg_setup_fn in system_wq context */ + /* Pairs with smp_store_release from cfg_setup_fn in system_percpu_wq context */ if (!smp_load_acquire(&drvdata->gp_registered)) return -ENODEV; } @@ -1108,7 +1108,7 @@ static ssize_t rumble_intensity_right_store(struct device *dev, int ret; scoped_guard(spinlock_irqsave, &drvdata->registration_lock) { - /* Pairs with smp_store_release from cfg_setup_fn in system_wq context */ + /* Pairs with smp_store_release from cfg_setup_fn in system_percpu_wq context */ if (!smp_load_acquire(&drvdata->gp_registered)) return -ENODEV; } @@ -1151,7 +1151,7 @@ static ssize_t rumble_intensity_right_show(struct device *dev, u8 val; scoped_guard(spinlock_irqsave, &drvdata->registration_lock) { - /* Pairs with smp_store_release from cfg_setup_fn in system_wq context */ + /* Pairs with smp_store_release from cfg_setup_fn in system_percpu_wq context */ if (!smp_load_acquire(&drvdata->gp_registered)) return -ENODEV; } @@ -1472,7 +1472,7 @@ static void claw_rgb_queue_fn(struct work_struct *work) return; scoped_guard(spinlock_irqsave, &drvdata->registration_lock) { - /* Pairs with smp_store_release from cfg_setup_fn in system_wq context */ + /* Pairs with smp_store_release from cfg_setup_fn in system_percpu_wq context */ if (!smp_load_acquire(&drvdata->rgb_registered)) return; } @@ -1492,7 +1492,7 @@ static ssize_t effect_store(struct device *dev, int ret; scoped_guard(spinlock_irqsave, &drvdata->registration_lock) { - /* Pairs with smp_store_release from cfg_setup_fn in system_wq context */ + /* Pairs with smp_store_release from cfg_setup_fn in system_percpu_wq context */ if (!smp_load_acquire(&drvdata->rgb_registered)) return -ENODEV; } @@ -1504,7 +1504,7 @@ static ssize_t effect_store(struct device *dev, scoped_guard(spinlock_irqsave, &drvdata->profile_lock) drvdata->rgb_effect = ret; - mod_delayed_work(system_wq, &drvdata->rgb_queue, msecs_to_jiffies(50)); + mod_delayed_work(system_dfl_wq, &drvdata->rgb_queue, msecs_to_jiffies(50)); return count; } @@ -1517,7 +1517,7 @@ static ssize_t effect_show(struct device *dev, struct claw_drvdata *drvdata = container_of(led_mc, struct claw_drvdata, led_mc); scoped_guard(spinlock_irqsave, &drvdata->registration_lock) { - /* Pairs with smp_store_release from cfg_setup_fn in system_wq context */ + /* Pairs with smp_store_release from cfg_setup_fn in system_percpu_wq context */ if (!smp_load_acquire(&drvdata->rgb_registered)) return -ENODEV; } @@ -1556,7 +1556,7 @@ static ssize_t enabled_store(struct device *dev, int ret; scoped_guard(spinlock_irqsave, &drvdata->registration_lock) { - /* Pairs with smp_store_release from cfg_setup_fn in system_wq context */ + /* Pairs with smp_store_release from cfg_setup_fn in system_percpu_wq context */ if (!smp_load_acquire(&drvdata->rgb_registered)) return -ENODEV; } @@ -1568,7 +1568,7 @@ static ssize_t enabled_store(struct device *dev, scoped_guard(spinlock_irqsave, &drvdata->profile_lock) drvdata->rgb_enabled = val; - mod_delayed_work(system_wq, &drvdata->rgb_queue, msecs_to_jiffies(50)); + mod_delayed_work(system_dfl_wq, &drvdata->rgb_queue, msecs_to_jiffies(50)); return count; } @@ -1581,7 +1581,7 @@ static ssize_t enabled_show(struct device *dev, struct claw_drvdata *drvdata = container_of(led_mc, struct claw_drvdata, led_mc); scoped_guard(spinlock_irqsave, &drvdata->registration_lock) { - /* Pairs with smp_store_release from cfg_setup_fn in system_wq context */ + /* Pairs with smp_store_release from cfg_setup_fn in system_percpu_wq context */ if (!smp_load_acquire(&drvdata->rgb_registered)) return -ENODEV; } @@ -1607,7 +1607,7 @@ static ssize_t speed_store(struct device *dev, struct device_attribute *attr, int ret; scoped_guard(spinlock_irqsave, &drvdata->registration_lock) { - /* Pairs with smp_store_release from cfg_setup_fn in system_wq context */ + /* Pairs with smp_store_release from cfg_setup_fn in system_percpu_wq context */ if (!smp_load_acquire(&drvdata->rgb_registered)) return -ENODEV; } @@ -1625,7 +1625,7 @@ static ssize_t speed_store(struct device *dev, struct device_attribute *attr, scoped_guard(spinlock_irqsave, &drvdata->profile_lock) drvdata->rgb_speed = speed; - mod_delayed_work(system_wq, &drvdata->rgb_queue, msecs_to_jiffies(50)); + mod_delayed_work(system_dfl_wq, &drvdata->rgb_queue, msecs_to_jiffies(50)); return count; } @@ -1639,7 +1639,7 @@ static ssize_t speed_show(struct device *dev, struct device_attribute *attr, u8 speed = 20 - drvdata->rgb_speed; scoped_guard(spinlock_irqsave, &drvdata->registration_lock) { - /* Pairs with smp_store_release from cfg_setup_fn in system_wq context */ + /* Pairs with smp_store_release from cfg_setup_fn in system_percpu_wq context */ if (!smp_load_acquire(&drvdata->rgb_registered)) return -ENODEV; } @@ -1662,12 +1662,12 @@ static void claw_led_brightness_set(struct led_classdev *led_cdev, struct claw_drvdata *drvdata = container_of(led_mc, struct claw_drvdata, led_mc); scoped_guard(spinlock_irqsave, &drvdata->registration_lock) { - /* Pairs with smp_store_release from cfg_setup_fn in system_wq context */ + /* Pairs with smp_store_release from cfg_setup_fn in system_percpu_wq context */ if (!smp_load_acquire(&drvdata->rgb_registered)) return; } - mod_delayed_work(system_wq, &drvdata->rgb_queue, msecs_to_jiffies(50)); + mod_delayed_work(system_dfl_wq, &drvdata->rgb_queue, msecs_to_jiffies(50)); } static struct attribute *claw_rgb_attrs[] = { @@ -1786,9 +1786,9 @@ static void cfg_resume_fn(struct work_struct *work) struct claw_drvdata *drvdata = container_of(dwork, struct claw_drvdata, cfg_resume); guard(spinlock_irqsave)(&drvdata->registration_lock); - /* Pairs with smp_store_release from cfg_setup_fn in system_wq context */ + /* Pairs with smp_store_release from cfg_setup_fn in system_percpu_wq context */ if (!smp_load_acquire(&drvdata->gp_registered) || - /* Pairs with smp_store_release from cfg_setup_fn in system_wq context */ + /* Pairs with smp_store_release from cfg_setup_fn in system_percpu_wq context */ !smp_load_acquire(&drvdata->rgb_registered)) schedule_delayed_work(&drvdata->cfg_setup, msecs_to_jiffies(500)); } @@ -1936,11 +1936,11 @@ static void claw_remove(struct hid_device *hdev) cancel_delayed_work_sync(&drvdata->cfg_setup); scoped_guard(spinlock_irqsave, &drvdata->registration_lock) { - /* Pairs with smp_store_release from cfg_setup_fn in system_wq context */ + /* Pairs with smp_store_release from cfg_setup_fn in system_percpu_wq context */ gp_registered = smp_load_acquire(&drvdata->gp_registered); /* Pairs with smp_load_acquire in attribute show/store functions */ smp_store_release(&drvdata->gp_registered, false); - /* Pairs with smp_store_release from cfg_setup_fn in system_wq context */ + /* Pairs with smp_store_release from cfg_setup_fn in system_percpu_wq context */ rgb_registered = smp_load_acquire(&drvdata->rgb_registered); /* Pairs with smp_load_acquire in attribute show/store functions */ smp_store_release(&drvdata->rgb_registered, false); -- 2.56.0