From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796195148; b=XsjAKdNL30aJkzHJurnF4ArhZG10ppGGmOnmTA5PEVyLrmpzRLLJdLLl3WjrEx1oSbb+ LpZ2wNi+R8GJspGz+ppSkGa8QvvcA/1O5xjt4sxfs4+WwNDmK2GIDbtVYflje5QIviyGz lQlvY7klNb5Tr4cu9ofOvuEzCACCJ+3eGzQ9ZTn5Zhs6mP4kvurG5yx/G2Cz3emsIzGRt O9WlLLvQvHavCrpGoTL3km5/1tzMtVf/nzEzk2lIv3vXpcOop+f44+DgakJIc8bhcVGXr fDNXJt/jnvRMwhXokcbDRFBWpGaJJ4IOJwGrInR70FEFlixJ6fK31u5TUAnFWboPDaA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796195148; h=Received:DKIM-Signature:Message-ID:Date:MIME-Version:User-Agent: Subject:To:Cc:References:Content-Language:From:Organization: In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=QqtUFpavqdpkDr0uNWppEREbVnXyeFDG48C6I3SFfhY=; b=iNFghtFdcebCC1US+kss/lSPmCPjLizvZ3oy4L1+mU5+IwpkVA3pz2c7+HXVRW7h2/Mh bMWRY06zTPrUQpqqGW3ieH+jjXRwF2BdzaQ+fcA3X+U/30VTkGzZchGYbrZYUKnjyKpCy hxS79wTzaT2Y2eOgdqzhBjpvbmIIU5lXJouGeB72AZgjtmxeWHQ+rWCycEkfSfsyC4fVr rdK82vVd2jKOgOQgUazaTxlkMzIZwDazLkKGozQ8LEuChJxmGGdEr87fBHTaYEHCPUuAZ XNF7Tb7PaiVvWrrwskC6KmzAEQpnCkGsh0O1wOUAhYw4KZOcPtil53P4OsfDnXnSgMQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=RZxZtzf0; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 69459606A33F; Wed, 2 Dec 2026 07:05:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=RZxZtzf0 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5F44E1F000C1; Wed, 2 Dec 2026 07:05:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796195147; bh=QqtUFpavqdpkDr0uNWppEREbVnXyeFDG48C6I3SFfhY=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=RZxZtzf0h5AUoR5lxvbgzAQWrhDyGTae+nC/RcQwZ02LrVjqBz5KyJFgCytz5zXso Ybe8t0d/TfJenP7Vj4OeKWv+f2Lby6+ZS0mJCK+N/5rMGS3fCxbt83rn5BkNiZYHtl Z4ydtL8S4+XhsnrX3AP6DF5jt7lw69sWxgYH8VfswylGW/IYd2BekwmIwTxZl7IQZy qFpa/MVgSguPncTmq9hVcQjCLEKave63HQuMOmL47auik2n4j25ROgRNapZus9mrs9 U8Y0EzU9ebWewhS+ms4VAM6zu2L41lf94QZL0blOZgKvg0C9SRsR1zbbTx2QynU7MJ cMSASfUPga86w== Message-ID: Date: Wed, 2 Dec 2026 16:05:44 +0900 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] ata: pata_macio: Do not disable the PCI device on suspend To: arina.kharlamova@mbzuai.ac.ae, Niklas Cassel , =?UTF-8?Q?Krzysztof_Wilczy=C5=84ski?= , Bjorn Helgaas , Philipp Stanner Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, Weidong Wang , linux-pci@vger.kernel.org, linuxppc-dev@lists.ozlabs.org References: <20261201-s2p-d104-v1-1-df4a9ef2b79d@mbzuai.ac.ae> Content-Language: en-US From: Damien Le Moal Organization: Western Digital Research In-Reply-To: <20261201-s2p-d104-v1-1-df4a9ef2b79d@mbzuai.ac.ae> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 12/2/26 04:17, Arina Kharlamova via B4 Relay wrote: > From: Arina Kharlamova > > 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 This needs testing. -- Damien Le Moal Western Digital Research