Linux ATA/IDE development
 help / color / mirror / Atom feed
From: Damien Le Moal <dlemoal@kernel.org>
To: arina.kharlamova@mbzuai.ac.ae,
	"Niklas Cassel" <cassel@kernel.org>,
	"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Philipp Stanner" <phasta@kernel.org>
Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org,
	Weidong Wang <weidongw@illinois.edu>,
	linux-pci@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] ata: pata_macio: Do not disable the PCI device on suspend
Date: Wed, 2 Dec 2026 16:05:44 +0900	[thread overview]
Message-ID: <fe28bc08-5241-4107-9e9f-9b0a5ffced97@kernel.org> (raw)
In-Reply-To: <20261201-s2p-d104-v1-1-df4a9ef2b79d@mbzuai.ac.ae>

On 12/2/26 04:17, Arina Kharlamova via B4 Relay wrote:
> From: Arina Kharlamova <arina.kharlamova@mbzuai.ac.ae>
> 
> pata_macio_suspend() disables the PCI device with pci_disable_device(),
> and pata_macio_reset_hw() enables it again on resume with
> pcim_enable_device(). Since commit f748a07a0b64 ("PCI: Remove legacy
> pcim_release()") every pcim_enable_device() call adds a
> pcim_disable_device() devres action, so each suspend and resume leaves
> one more action behind. On unbind they all run, and every one after
> the first warns about disabling an already disabled device.
> 
> The device is enabled with pcim_enable_device() in probe and stays
> managed until unbind, so the driver should not disable and enable it by
> hand. On suspend, clear only the bus master bit, which is all that
> pci_disable_device() did on this hardware, and set it again on resume
> without enabling the device.
> 
> Fixes: f748a07a0b64 ("PCI: Remove legacy pcim_release()")
> Signed-off-by: Arina Kharlamova <arina.kharlamova@mbzuai.ac.ae>

This needs testing.

-- 
Damien Le Moal
Western Digital Research

      reply	other threads:[~2026-12-02  7:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01 19:17 [PATCH] ata: pata_macio: Do not disable the PCI device on suspend Arina Kharlamova via B4 Relay
2026-12-02  7:05 ` Damien Le Moal [this message]

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=fe28bc08-5241-4107-9e9f-9b0a5ffced97@kernel.org \
    --to=dlemoal@kernel.org \
    --cc=arina.kharlamova@mbzuai.ac.ae \
    --cc=bhelgaas@google.com \
    --cc=cassel@kernel.org \
    --cc=kwilczynski@kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=phasta@kernel.org \
    --cc=weidongw@illinois.edu \
    /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