All of lore.kernel.org
 help / color / mirror / Atom feed
From: Akinobu Mita <akinobu.mita@gmail.com>
To: linux-scsi@vger.kernel.org
Cc: Akinobu Mita <akinobu.mita@gmail.com>,
	Vinayak Holikatti <vinholikatti@gmail.com>,
	"James E.J. Bottomley" <JBottomley@parallels.com>,
	Christoph Hellwig <hch@lst.de>,
	Dolev Raviv <draviv@codeaurora.org>,
	Sujit Reddy Thumma <sthumma@codeaurora.org>,
	Subhash Jadavani <subhashj@codeaurora.org>,
	Maya Erez <merez@codeaurora.org>,
	Sahitya Tummala <stummala@codeaurora.org>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Subject: [PATCH 2/3] scsi: ufs: fix unbalanced power.usage_count after reloading driver
Date: Sat, 28 Mar 2015 08:51:46 +0900	[thread overview]
Message-ID: <1427500307-5649-3-git-send-email-akinobu.mita@gmail.com> (raw)
In-Reply-To: <1427500307-5649-1-git-send-email-akinobu.mita@gmail.com>

On driver removal, pm_runtime_get_sync() is called, but
pm_runtime_put_sync() is missed.  So once the driver is reloaded, the
device's power.usage_count is unbalanced and the idle callback for the
device will never be called.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Vinayak Holikatti <vinholikatti@gmail.com>
Cc: "James E.J. Bottomley" <JBottomley@parallels.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Dolev Raviv <draviv@codeaurora.org>
Cc: Sujit Reddy Thumma <sthumma@codeaurora.org>
Cc: Subhash Jadavani <subhashj@codeaurora.org>
Cc: Maya Erez <merez@codeaurora.org>
Cc: Sahitya Tummala <stummala@codeaurora.org>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: linux-scsi@vger.kernel.org
---
 drivers/scsi/ufs/ufshcd-pltfrm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/ufs/ufshcd-pltfrm.c b/drivers/scsi/ufs/ufshcd-pltfrm.c
index 7db9564..4164108 100644
--- a/drivers/scsi/ufs/ufshcd-pltfrm.c
+++ b/drivers/scsi/ufs/ufshcd-pltfrm.c
@@ -368,6 +368,7 @@ static int ufshcd_pltfrm_remove(struct platform_device *pdev)
 
 	pm_runtime_get_sync(&(pdev)->dev);
 	ufshcd_remove(hba);
+	pm_runtime_put_sync(&pdev->dev);
 	return 0;
 }
 
-- 
1.9.1


  parent reply	other threads:[~2015-03-27 23:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-27 23:51 [PATCH 0/3] scsi: ufs: fix several issues caused by driver reloading Akinobu Mita
2015-03-27 23:51 ` [PATCH 1/3] scsi: ufs: avoid using hostdata after scsi_host_put() Akinobu Mita
2015-03-27 23:51 ` Akinobu Mita [this message]
2015-03-27 23:51 ` [PATCH 3/3] scsi: ufs: fix unbalanced power.disable_depth after reloading driver Akinobu Mita

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=1427500307-5649-3-git-send-email-akinobu.mita@gmail.com \
    --to=akinobu.mita@gmail.com \
    --cc=JBottomley@parallels.com \
    --cc=draviv@codeaurora.org \
    --cc=hch@lst.de \
    --cc=linux-scsi@vger.kernel.org \
    --cc=merez@codeaurora.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=sthumma@codeaurora.org \
    --cc=stummala@codeaurora.org \
    --cc=subhashj@codeaurora.org \
    --cc=vinholikatti@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.