From patchwork Mon Dec 10 16:52:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 10721765 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 19D5A15A6 for ; Mon, 10 Dec 2018 16:52:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 085982A810 for ; Mon, 10 Dec 2018 16:52:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F06142A827; Mon, 10 Dec 2018 16:52:46 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 8BD652A810 for ; Mon, 10 Dec 2018 16:52:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726872AbeLJQwq (ORCPT ); Mon, 10 Dec 2018 11:52:46 -0500 Received: from mail-lf1-f65.google.com ([209.85.167.65]:35853 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726720AbeLJQwp (ORCPT ); Mon, 10 Dec 2018 11:52:45 -0500 Received: by mail-lf1-f65.google.com with SMTP id a16so8530319lfg.3 for ; Mon, 10 Dec 2018 08:52:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=bGsmbTB+nZy0eVMBiGyBFstTvyDAI0702gdkSvUdMM0=; b=GMcKnLEopHrk4ALLwbeqoYEE0LJZLauq+NHTG7ZJANtuow3l17AgyF/72osFzUuIOb QN7CW9NBIZWaxZffK0RB1MQW1sOa3JBrWese1r1ZgRcUOEXtpGH+l7wA0Zm9Is3kQ+kk 1FFLKoGb6b/72XswOHjgjHKC3jIbOk2VxxvCA= 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=bGsmbTB+nZy0eVMBiGyBFstTvyDAI0702gdkSvUdMM0=; b=T3GW3i5qtgJ73PcF9UgpHVa8I3ScsIoN2oZTbPwPBr6GGgjA/Era7Ow5z4/Nkd+FMy fNhdF3bgy9o/Q4g/dc7+GhvLIzkIh9lIK6A57MxRWcfmHGwlkXpLxoJvmPxSnrf7A06n 4LAG6FPI3wQ2G5rnOEnunzrI0hsBjOw25zOV49FbD6OMLGH4lk+3saXGdEg31LTtm2tL 2bmldUWhodDDZ2MgH54jli2Vq8EYqv1+zgEnDQZ1teo5fDbBDJh++2G8xRKmuhB2YdnU a0DG5O2TcJM/8NmfQthk0kHwM2vrIdm/DRv7eCt6CW9CH85kJ3UxmleXWt7gU4/467EC qL9g== X-Gm-Message-State: AA+aEWZTi2jxLv+OApr7TJSJl7cM25C7ZCZSybasDPf/9jkbm4y6DnBq pNuvQQhMO4nxMURd1b5GrBzD9hNvu7rGOA== X-Google-Smtp-Source: AFSGD/W8IbA7XSyrqv1mlk96tn9WPmT3ecVQ69wc0+Jxf6w8RNlakOl6Cho8ZUqZq4mgsQEBgHHdIg== X-Received: by 2002:a19:24c6:: with SMTP id k189mr7699619lfk.77.1544460763401; Mon, 10 Dec 2018 08:52:43 -0800 (PST) Received: from localhost.localdomain (h-158-174-22-210.NA.cust.bahnhof.se. [158.174.22.210]) by smtp.gmail.com with ESMTPSA id w9sm2194574lfc.66.2018.12.10.08.52.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Dec 2018 08:52:42 -0800 (PST) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: Wolfram Sang , Adrian Hunter , Sjoerd Simons , Faiz Abbas , Jaehoon Chung , Shawn Lin Subject: [PATCH 0/5] mmc: core: Fix and cleanup HPI/CACHE/BKOPS code Date: Mon, 10 Dec 2018 17:52:35 +0100 Message-Id: <20181210165240.23101-1-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.17.1 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From a couple of different discussions/reports on the mmc mailing lists, I realized that there we have a few bugs to the HPI/CACHE/BKOPS support. The problems should be fixed in this series, but I also took the opportunity to do a few cleanups for the related code on top. Reviews and tests are highly appreciated! Kind regards Uffe Ulf Hansson (5): mmc: core: Reset HPI enabled state during re-init and in case of errors mmc: core: Allow BKOPS and CACHE ctrl even if no HPI support mmc: core: Use a minimum 1600ms timeout when enabling CACHE ctrl mmc: core: Drop redundant check in mmc_send_hpi_cmd() mmc: core: Cleanup BKOPS support drivers/mmc/core/block.c | 2 +- drivers/mmc/core/card.h | 6 +-- drivers/mmc/core/mmc.c | 30 ++++++------ drivers/mmc/core/mmc_ops.c | 93 ++++++++------------------------------ drivers/mmc/core/mmc_ops.h | 3 +- 5 files changed, 36 insertions(+), 98 deletions(-)