From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.178 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796343532; b=CBsxhHiZWYKq4NwO3HMSwx3V4bvJpoNUEcHnNFfXuslfGLgFWLhaw7CaqaML+bZn9ulp 9osGmji/CqK/AzPuQIAMIkmNWO1pRiwprN7G+zhB/XshpPOGhtYkk7Pwwi0/De4k3Vm7P y3rQsTYJi67jhb6IKZ/lRIAJ4WV5rrudlDQvvCQl4eKaC7c89Rl83iXvvrqL08KAp3+gu AAEN0HUakv5i6/1Jvp8jlxpC4D4NnPHjQzUg+zMK1lpmf9kbSSoXkjlLYY4PKOwMRiFzR eqnnO3czLK0shLBxXZtf3RCvc6eKMfyla9Czm8k5u7lApFLoxH5iFFYsg3AJUSzghew== 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-Forwarded-Encrypted: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=1258ovsTGDZru70MKCMSxIn9EkA6L1MZA+mQdhvdFY3/MWdfVzutgeyMqglBfjabjIt1 /Vxxl7Bfz2L5p5oczExkkJydrbI6Vor88Eqp0VVsqb8s+iIskfCU1OtZvPbDc6ifZzkkT bzILl4fav8YlNmQ1ZLq69aGH1rOog2mkb2Zv6XkuGxf5Yu6HICQanpaBpeAz3qe5JncTe b8r8/qDTZxYk6tyT/JjgTxXoddbNv/nFOkhZWHHv3hzPlMg3Htov5D6ot52YF6tCEhEyJ clJDq0jMFcwhqYTAn+ZeQVv6Yuj7XsDRlr5xeD/V70DzeEcQlK4XiRas9i5xChLixzw== 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.178 Received: from mail-dy1-f178.google.com (mail-dy1-f178.google.com [74.125.82.178]) (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 9467E606A337 for ; Fri, 4 Dec 2026 00:18:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 9467E606A337 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-f178.google.com with SMTP id 5a478bee46e88-387504e1934so361931eec.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=0iWM/lxHSF6nwNaURCVgYVnBV2VtFTGmRn5k5/4fprUQjiLN7pKbeU+h/5gWHKT1Ye USbbUwIPEv/SxQ2TK9geD22sHiq69OZS32EyDOBHW3rqGzhG3bheidTxRBqq/O+tEDMz 5l4Ynql5roBHogHy5TAdpdnhYy11n0uomAieEtaR3s30fMm0svICe5mvA5CKZoPVJNnx Jnfh7KMWXpIHU361H1vBLsmSmddG1+rgTZgjiA1zx/w4LMd9/dBqFq9icNY4wTQXb1dO uGUKbuQnSPx10gyozEAUybOGjjxgDKEmpwVRQ/6554LTqHUJickA6ZFZCFcHIXLactZu J5Bg== X-Forwarded-Encrypted: i=1; AL+hErH39meLlkUZ0cC5WMCuIragLutrKXWCucSJJLi/EfDrxshi5SArBc1isdqEFkjMkQrsTVvBARo/3F8=@vger.kernel.org X-Gm-Message-State: APuU4Z+ncGDqjh/bsMD227tES1+smwen4OkjylrVN9zoUzqH95fVSAk0 MQWOaYY1cbORJMRD+MEMQWaGgPp314X7vWqZ8ErEtH53wFQR6mCprzw3 X-Gm-Gg: AZFdTZffjTaottQsCwtxGCF1BQ1c7wgdK7QdMlkRqQVwvQsTL3qV5o6pYhcaD1WIL7g lS+iUb5HAli/f6VxpzEWHLJZWFlBpPGdoRoNgBLCYCccVmhvlkbFT6bOtj1pphOiVKJAfSYp9jY mDArgT1pXiGyrtx+so6jGkfK5DrBemysJCSvw2C7fCkTk+Pl0nCz0LNzFC3LA/XCObjPTDiXa9e H9z7v/C4HT0dxXk3cN+4nO6KxrVChyQwhPb2GFzGpofVunYNvZF1mtAzl85GGRQS9wJlWt0v81w d++5STzrTAuyxnE6BO/j5+VKGw3Ppk2qo6m05ZYQCgt1zB7BEezOFoQv0zN+WAssNc90VpnZrY8 C9GlxAgBMLV7DxCRXftGDceVlzjqe6ktgFE+2g1B3AlvF0NQABs+aZGR0JFKHSf/f4fkYlZpqMG 8u3EKUnK3freV573LqOPlPG9jWWUNHzm2+N8GP8eHZUgE/G/DvZeR/FBkrCdDNZCBWvOCDF2p+8 TPoY+TtG0Csjjc5PgfYmZQNkYrviewnNzwB6QdkNrnLfCNWyGuniGrFSZtTbUDJClEvwUEUCOAm ihoC5wUInxgbRci92zDRxoYxj9zznGxcNEifIH6rK7bKkTLXeGB0ZgrNw1Oo6UnMH2lked1Ucmc EzT2nUkxXbRT9frCRDPf4bcA5KmCJ0nRBSSZDaKBcyukc2ECVjMg= 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-usb@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