From patchwork Mon Oct 13 13:49:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 38649 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3825A2039B for ; Mon, 13 Oct 2014 13:50:26 +0000 (UTC) Received: by mail-lb0-f197.google.com with SMTP id p9sf4218950lbv.4 for ; Mon, 13 Oct 2014 06:50:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=CMU9uXpJvbgcFI6l2dmgxwZv36btP5YF7B5VgsWZMxo=; b=kxJlcyNCAD4D0dur3OzKTxVnZgLpw60hm/MMEKrosvKtwonVEEmgNOF0CsuarnlCF7 2TRj1gFznwwlqUCqTPw8ipwj2/jLkorevtavB76fJd6hxZ07fPXfEHxBikh5BN+PJQSR wDjPtXLgWmKVr+C0tI2UUBfI2RD34ELa+b4OP2T7wg2at8xZE09lEjMWKI2kV9wpn82I 1paFLx1IladBLsJPBGdW2IrrnZqY3DuQTrP0tx9k5rByQD9uJuMO297POPWtjGfBdSL5 +PyTacH84zikMNWjn+ItYOaiDN+ynslWdMBdxu5vTL/6LDIFQ8j61V5ebZ/dLNwjcgYn Oh3w== X-Gm-Message-State: ALoCoQnxKnbkIwv8a15VszOuVdyKNKrnyOhuKO1SMwYRIpv7oUFtCH7iZh1kEkGuhXPW4EMWDosc X-Received: by 10.112.205.70 with SMTP id le6mr4076680lbc.4.1413208224966; Mon, 13 Oct 2014 06:50:24 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.7.132 with SMTP id dc4ls463062lad.64.gmail; Mon, 13 Oct 2014 06:50:24 -0700 (PDT) X-Received: by 10.152.21.226 with SMTP id y2mr24458835lae.34.1413208224860; Mon, 13 Oct 2014 06:50:24 -0700 (PDT) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com [209.85.215.43]) by mx.google.com with ESMTPS id q5si22335372laq.60.2014.10.13.06.50.24 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 13 Oct 2014 06:50:24 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by mail-la0-f43.google.com with SMTP id mc6so6687239lab.2 for ; Mon, 13 Oct 2014 06:50:24 -0700 (PDT) X-Received: by 10.152.19.195 with SMTP id h3mr24224801lae.71.1413208224749; Mon, 13 Oct 2014 06:50:24 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.84.229 with SMTP id c5csp217458lbz; Mon, 13 Oct 2014 06:50:22 -0700 (PDT) X-Received: by 10.66.90.162 with SMTP id bx2mr23809899pab.39.1413208217661; Mon, 13 Oct 2014 06:50:17 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i13si10368565pat.185.2014.10.13.06.50.17 for ; Mon, 13 Oct 2014 06:50:17 -0700 (PDT) Received-SPF: none (google.com: stable-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754681AbaJMNuO (ORCPT + 1 other); Mon, 13 Oct 2014 09:50:14 -0400 Received: from ip4-83-240-67-251.cust.nbox.cz ([83.240.67.251]:57218 "EHLO ip4-83-240-18-248.cust.nbox.cz" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754689AbaJMNuF (ORCPT ); Mon, 13 Oct 2014 09:50:05 -0400 Received: from ku by ip4-83-240-18-248.cust.nbox.cz with local (Exim 4.83) (envelope-from ) id 1Xdg0g-0003uZ-GO; Mon, 13 Oct 2014 15:50:02 +0200 From: Jiri Slaby To: stable@vger.kernel.org Cc: Mark Brown , Jiri Slaby Subject: [patch added to the 3.12 stable tree] regmap: Don't attempt block writes when syncing cache on single_rw devices Date: Mon, 13 Oct 2014 15:49:41 +0200 Message-Id: <1413208201-14602-70-git-send-email-jslaby@suse.cz> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1413208201-14602-1-git-send-email-jslaby@suse.cz> References: <1413208201-14602-1-git-send-email-jslaby@suse.cz> Sender: stable-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: stable@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: patch@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Mark Brown This patch has been added to the 3.12 stable tree. If you have any objections, please let us know. =============== commit 5c1ebe7f73f9166893c3459915db8a09d6d1d715 upstream. If the device can't support block writes then don't attempt to use raw syncing which will automatically generate block writes for adjacent registers, use the existing _single() block syncing implementation. Reported-by: Jarkko Nikula Tested-by: Jarkko Nikula Signed-off-by: Mark Brown Signed-off-by: Jiri Slaby --- drivers/base/regmap/regcache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c index d6c2d691b6e8..8560dca42aea 100644 --- a/drivers/base/regmap/regcache.c +++ b/drivers/base/regmap/regcache.c @@ -690,7 +690,7 @@ int regcache_sync_block(struct regmap *map, void *block, unsigned int block_base, unsigned int start, unsigned int end) { - if (regmap_can_raw_write(map)) + if (regmap_can_raw_write(map) && !map->use_single_rw) return regcache_sync_block_raw(map, block, cache_present, block_base, start, end); else