From patchwork Tue May 29 10:06:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: 0v3rdr0n3@gmail.com X-Patchwork-Id: 10435571 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B29E0604D4 for ; Tue, 29 May 2018 14:09:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9FC17287A0 for ; Tue, 29 May 2018 14:09:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9E8D2287C9; Tue, 29 May 2018 14:09:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00, DATE_IN_PAST_03_06, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C6CDF287A0 for ; Tue, 29 May 2018 14:06:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934250AbeE2OGo (ORCPT ); Tue, 29 May 2018 10:06:44 -0400 Received: from mail-io0-f193.google.com ([209.85.223.193]:40787 "EHLO mail-io0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751572AbeE2OGn (ORCPT ); Tue, 29 May 2018 10:06:43 -0400 Received: by mail-io0-f193.google.com with SMTP id g14-v6so17725840ioc.7; Tue, 29 May 2018 07:06:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=1Zkl+GnXdcj7/11R4LO4KcbQob1H1peS5RR5OMxM81Q=; b=QXSUWcVbDUh6cjmW/kKKhAag7t5XsHPp9L+tVxXtuWDzqW4QOLbRG+5RdO5uQykLqS w1OgJeCbt5KxIje8x26w/Sp+n4sS28zfoLoduEfr8xjMkv5rSF6YSgrPuuvtrhUmN/PA GmtwMpgmJLiHHopHMx+aAxPiMnb5Kt6I3D9nngbc2lIdo1dLaaRjdShS4Uw7r5AkZ+vn zJVVqSaKhRbKQ8IBS99hDoiTOr/ml8jA02R6m168zBaFet+dQx8bAq2WxZ5vqLhwX7EY Ys0CkmGhxDzY2prmrDFpr/yC4STb5v8WltwJPlU4kL/ffGkI/EULGFvrFg2a6PM6emdZ W8Kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=1Zkl+GnXdcj7/11R4LO4KcbQob1H1peS5RR5OMxM81Q=; b=Xhs+lHn9Ub+MpFyJxI3Rh5fs1TpaU9QVUssSaYqjkcL1BJb/3HFjqd4EAlC1heuO50 rthGTEzcezPwp6fkfyfXWJ9h72ZnKtRUEn7VtWbD5Q9yapEbEbm75KNvJXWKjEp6ujLB +QfXIJM0lFenLSlAuB3voVu+AcTdhDwfSoNEekUIiLq547SWCFUhJbmuZD/cMW50+6/K eM7v7KVS15y08ArMb4iq6/IYo+erUXeFC9Sgwgyn5p5DnfRx13vayrmp45EzFBwaQI+S c8Je3fFBe4TsDapPYOebGKk533KXtjfkqKxMo0rxh5N9HdeV5xa8YYj55P1cvVcCdqd+ d+1Q== X-Gm-Message-State: ALKqPwcJoNDj1H4FTAM4PP/jCke2vsyHjtSt30/SYYMMC8H15yA8Yd6C 5wusmwTrUSUZOARJvqyc+f6SSw== X-Google-Smtp-Source: ADUXVKIdYDgk6aSmb4ewPgHmJL28PCp/kC+xKPwZdoPqdWJiLX6VB7BK7c1nMT6rNAZQvtU1Ndisyw== X-Received: by 2002:a6b:998d:: with SMTP id b135-v6mr15820189ioe.122.1527602802314; Tue, 29 May 2018 07:06:42 -0700 (PDT) Received: from pride.cinci.rr.com (cpe-74-136-84-14.kya.res.rr.com. [74.136.84.14]) by smtp.gmail.com with ESMTPSA id e92-v6sm4209930iod.29.2018.05.29.07.06.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 May 2018 07:06:41 -0700 (PDT) From: 0v3rdr0n3@gmail.com To: linux-pm@vger.kernel.org, linux-ide@vger.kernel.org Cc: samorris@lexmark.com Subject: [PATCH v3 1/2] ata: ahci: rpm_put port on port_stop to match rpm_get in port_start Date: Tue, 29 May 2018 10:06:11 +0000 Message-Id: <20180529100612.3512-1-0v3rdr0n3@gmail.com> X-Mailer: git-send-email 2.17.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Samuel Morris 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 --- drivers/ata/libahci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c index e5d90977caec..ffc797994923 100644 --- a/drivers/ata/libahci.c +++ b/drivers/ata/libahci.c @@ -2436,6 +2436,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)