Linux Input/HID development
 help / color / mirror / Atom feed
From: Nikolas Koesling <nikolas@koesling.info>
To: Jiri Kosina <jikos@kernel.org>,
	Benjamin Tissoires <bentiss@kernel.org>,
	linux-input@vger.kernel.org, Aaron Ma <mapengyu@gmail.com>
Subject: Re: [PATCH 2/3] HID: pulsar: resume device for raw command execution
Date: Mon, 23 Nov 2026 20:50:30 +0100	[thread overview]
Message-ID: <3ssTmVAPSp6OcQzpLtff0Q@koesling.info> (raw)
In-Reply-To: <20261123141542.8128-2-mapengyu@gmail.com>

Hi Aaron,

> usbhid drops its runtime PM reference after open, allowing the USB
> device to autosuspend while idle. When suspended, hid_hw_raw_request()
> fails with -EHOSTUNREACH (-113), causing battery status reads to fail.

thanks, good catch. I could reproduce it with power/control=auto on the
receiver: once it autosuspends, battery reads fail with -EHOSTUNREACH.
With this patch applied they succeed.

> +	ret = hid_hw_power(hdev, PM_HINT_FULLON);
> +	if (ret < 0)
> +		goto out_unlock;

> +out_power:
> +	hid_hw_power(hdev, PM_HINT_NORMAL);

A failed hid_hw_power() is returned silently, while a failed send is
logged. Please add a hid_err() there in v2.

With that change:

Tested-by: Nikolas Koesling <nikolas@koesling.info>
Reviewed-by: Nikolas Koesling <nikolas@koesling.info>

Thanks,
Nikolas





  reply	other threads:[~2026-11-23 19:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-23 14:15 [PATCH 1/3] HID: pulsar: keep battery online across RF standby Aaron Ma
2026-11-23 14:15 ` [PATCH 2/3] HID: pulsar: resume device for raw command execution Aaron Ma
2026-11-23 19:50   ` Nikolas Koesling [this message]
2026-11-23 14:15 ` [PATCH 3/3] HID: pulsar: add support for Akko Gaming Mouse Aaron Ma
2026-11-23 19:53   ` Nikolas Koesling
2026-11-23 19:40 ` [PATCH 1/3] HID: pulsar: keep battery online across RF standby Nikolas Koesling

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3ssTmVAPSp6OcQzpLtff0Q@koesling.info \
    --to=nikolas@koesling.info \
    --cc=bentiss@kernel.org \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=mapengyu@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox