diff mbox

[1/3] ata: ahci: rpm_put port on port_stop to match rpm_get in port_start

Message ID 20180716224103.7912-2-0v3rdr0n3@gmail.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

0v3rdr0n3@gmail.com July 16, 2018, 10:41 p.m. UTC
From: Samuel Morris <samorris@lexmark.com>

This change balances out the final ahci_port_resume in port_start to
ensure reference counts are correct after port stop.

Signed-off-by: Samuel Morris <samorris@lexmark.com>
---
 drivers/ata/libahci.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Samuel Morris July 18, 2018, 5:53 p.m. UTC | #1
Adding Hans de Goede...

On Mon, Jul 16, 2018 at 10:41 PM, Sam Morris <0v3rdr0n3@gmail.com> wrote:
> From: Samuel Morris <samorris@lexmark.com>
>
> This change balances out the final ahci_port_resume in port_start to
> ensure reference counts are correct after port stop.
>
> Signed-off-by: Samuel Morris <samorris@lexmark.com>
> ---
>  drivers/ata/libahci.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
> index 09620c2ffa0f..1d3834dec469 100644
> --- a/drivers/ata/libahci.c
> +++ b/drivers/ata/libahci.c
> @@ -2439,6 +2439,8 @@ static void ahci_port_stop(struct ata_port *ap)
>          * re-enabling INTx.
>          */
>         writel(1 << ap->port_no, host_mmio + HOST_IRQ_STAT);
> +
> +       ahci_rpm_put_port(ap);
>  }
>
>  void ahci_print_info(struct ata_host *host, const char *scc_s)
> --
> 2.17.0
>
diff mbox

Patch

diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
index 09620c2ffa0f..1d3834dec469 100644
--- a/drivers/ata/libahci.c
+++ b/drivers/ata/libahci.c
@@ -2439,6 +2439,8 @@  static void ahci_port_stop(struct ata_port *ap)
 	 * re-enabling INTx.
 	 */
 	writel(1 << ap->port_no, host_mmio + HOST_IRQ_STAT);
+
+	ahci_rpm_put_port(ap);
 }
 
 void ahci_print_info(struct ata_host *host, const char *scc_s)