From patchwork Mon Oct 15 19:16:33 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Cochran X-Patchwork-Id: 1595311 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 3031FDFB34 for ; Mon, 15 Oct 2012 19:19:08 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TNqAJ-0000F3-6F; Mon, 15 Oct 2012 19:17:27 +0000 Received: from mail-wg0-f49.google.com ([74.125.82.49]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TNq9r-00009J-Gl for linux-arm-kernel@lists.infradead.org; Mon, 15 Oct 2012 19:17:00 +0000 Received: by mail-wg0-f49.google.com with SMTP id gg4so3223108wgb.18 for ; Mon, 15 Oct 2012 12:16:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :in-reply-to:references; bh=LV90NaOCsn5BVDTy5OEBs+MP6zd+1rsHyjF2erhQYQg=; b=TgAT/Hzq2AdrCyb5x4MBclnytoPA5SUfhGsJZUuUKaMUWE3H5T5KAL4bqljkNc+8iT wOGhIecH/q53n5ND3SyX+z8l7UuAW64DfcaBaS+dRKMiKOxQyLh6gneRxmHwWUz16VCj j0isjZtKPY3Gbl14/GeM2IHXekr/Pqw/7w/HTyubh/eVWArSwyGUUSqq5ahWaLWuJlk8 39EM8CqKtaLtZyA/D69Gzo5lyVE62GE+f4r+I+eFB5k65auO9eiFy0jomGU7c9rsobZ9 HpX9JNd84civao3luy+F7UdylQOma1rOqpX9ICOhQ4XMAJtU0DGmZKKKLvwJqR9WPzys W5qg== Received: by 10.180.82.35 with SMTP id f3mr25976500wiy.6.1350328618436; Mon, 15 Oct 2012 12:16:58 -0700 (PDT) Received: from localhost.localdomain (089144206171.atnat0015.highway.a1.net. [89.144.206.171]) by mx.google.com with ESMTPS id hv8sm15625117wib.0.2012.10.15.12.16.55 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 15 Oct 2012 12:16:57 -0700 (PDT) From: Richard Cochran To: Subject: [PATCH 3/5] net: davinci_mdio: Fix type mistake in calling runtime-pm api Date: Mon, 15 Oct 2012 21:16:33 +0200 Message-Id: <62191bdcb85ab48f5ea16fe69c2f92aa9e9a0a8b.1350327325.git.richardcochran@gmail.com> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: References: In-Reply-To: References: X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.82.49 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (richardcochran[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Mugunthan V N , Russell King , Arnd Bergmann , Vaibhav Hiremath , David Miller , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Vaibhav Hiremath By mistake (most likely a copy-paste), instead of pm_runtime_get_sync() api, driver is calling pm_runtime_put_sync() api in resume callback function. The bug was introduced by commit id (ae2c07aaf74: davinci_mdio: runtime PM support). Now, the reason why it didn't impact functionality is, the patch has been tested on AM335x-EVM and BeagleBone platform while submitting; and in case of AM335x the MDIO driver doesn't control the module enable/disable part, which is handled by CPSW driver. Signed-off-by: Vaibhav Hiremath Cc: Mugunthan V N --- drivers/net/ethernet/ti/davinci_mdio.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/ethernet/ti/davinci_mdio.c b/drivers/net/ethernet/ti/davinci_mdio.c index 51a96db..ae74280 100644 --- a/drivers/net/ethernet/ti/davinci_mdio.c +++ b/drivers/net/ethernet/ti/davinci_mdio.c @@ -465,7 +465,7 @@ static int davinci_mdio_resume(struct device *dev) u32 ctrl; spin_lock(&data->lock); - pm_runtime_put_sync(data->dev); + pm_runtime_get_sync(data->dev); /* restart the scan state machine */ ctrl = __raw_readl(&data->regs->control);