From patchwork Sun Mar 5 16:45:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Icenowy Zheng X-Patchwork-Id: 9604699 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 632BB60414 for ; Sun, 5 Mar 2017 16:46:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 33C0E2793A for ; Sun, 5 Mar 2017 16:46:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 24D8627F93; Sun, 5 Mar 2017 16:46: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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5330127F4B for ; Sun, 5 Mar 2017 16:46:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=TUqxotnviIptVr0P7eY3mSwTX6PyOTm0v+rhyPmtyl8=; b=ReE QJ4kW3sc8rP0So+yf3hpKchg3rfNceUyBgh532QMIWun9mo1+iV6YQxFW9/ILQtX04Y5M1isfhg0V XCkEDUJ3+7PDU4YlcrakBLkOgwDV0XFvZVyjX4E7epksoepemD3yWAj0drAJMKAiybTz3sb1d/+7/ N4KntuOpXaw8DfIfGmHyQ+UOWqiG2OAvFp65Dli2+1zRpiymmEfb06XPTfrDtmXn9y41ITE3J7dxd 3i9qeIkxX7IK4KsF1/vhVgd4jBaPsOH36BjuG2SHst+zSNkquaAKiRZG/wo5c2NteTe955SBraGpS fl5wsPwlQaCzG3XnntDGwjOFK8clDEw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1ckZJ5-00054Q-J6; Sun, 05 Mar 2017 16:46:51 +0000 Received: from forward10j.cmail.yandex.net ([2a02:6b8:0:1630::185]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1ckZIy-00053N-RS for linux-arm-kernel@lists.infradead.org; Sun, 05 Mar 2017 16:46:49 +0000 Received: from smtp2p.mail.yandex.net (smtp2p.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b6:7]) by forward10j.cmail.yandex.net (Yandex) with ESMTP id 3C6FF2105D; Sun, 5 Mar 2017 19:46:16 +0300 (MSK) Received: from smtp2p.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp2p.mail.yandex.net (Yandex) with ESMTP id 848071A80001; Sun, 5 Mar 2017 19:46:10 +0300 (MSK) Received: by smtp2p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 67WrtdE9P8-k5GecEdp; Sun, 05 Mar 2017 19:46:09 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aosc.xyz; s=mail; t=1488732369; bh=gqa37iFobOLrCdHGdDWIQmB4dFugeSZpETRdDJZ3FKk=; h=From:To:Cc:Subject:Date:Message-Id; b=LXNtu8cMrfZQLlF89NHfQ7PhcUdV/oMFymXJd1qyGk+fYYf60F3rJxpsFnHS3InMk DNbYecORUsWe/vn/koX/DsC4mrrZHmYvZ7usHCVDA/400t/UktHKCBqJ9e4p9oBQJG qsRBtkXQIYPJIJNq04x+x1NOJLtd+T0ZBeH+j0ck= Authentication-Results: smtp2p.mail.yandex.net; dkim=pass header.i=@aosc.xyz X-Yandex-ForeignMX: US X-Yandex-Suid-Status: 1 0,1 0,1 0,1 0,1 0,1 0,1 0,1 1130000036118848 From: Icenowy Zheng To: Ulf Hansson , Maxime Ripard , Chen-Yu Tsai , Hans de Goede Subject: [PATCH] mmc: sunxi: mask all Response Timeout error messages Date: Mon, 6 Mar 2017 00:45:35 +0800 Message-Id: <20170305164535.36259-1-icenowy@aosc.xyz> X-Mailer: git-send-email 2.11.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170305_084645_283041_E6F2AFC0 X-CRM114-Status: UNSURE ( 9.50 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Icenowy Zheng MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Response Timeout is very usual: it will happen when trying to run some commands that do not belong to the card; it will happen when some SDIO card transfer beyond its SDIO bandwidth; and when the MMC controller is set to poll the card with "broken-cd" property (the Lichee Pi series of boards do this), it will flood to the console and make the console unusable. Mask all response-timeout-only error messages, only show it when another error happens. Signed-off-by: Icenowy Zheng --- drivers/mmc/host/sunxi-mmc.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c index 6ffcd2838272..7828e1f57cf0 100644 --- a/drivers/mmc/host/sunxi-mmc.c +++ b/drivers/mmc/host/sunxi-mmc.c @@ -483,10 +483,15 @@ static void sunxi_mmc_dump_errinfo(struct sunxi_mmc_host *host) struct mmc_command *cmd = host->mrq->cmd; struct mmc_data *data = host->mrq->data; - /* For some cmds timeout is normal with sd/mmc cards */ - if ((host->int_sum & SDXC_INTERRUPT_ERROR_BIT) == - SDXC_RESP_TIMEOUT && (cmd->opcode == SD_IO_SEND_OP_COND || - cmd->opcode == SD_IO_RW_DIRECT)) + /* + * Reading timeout is usually normal, especially when doing + * card-polling with "broken-cd" in device tree. + * If do not mask it, the RTO error message will flood the console + * and even hide useful error messages. + * + * Some SDIO commands will also normally timeout with non-SDIO cards. + */ + if ((host->int_sum & SDXC_INTERRUPT_ERROR_BIT) == SDXC_RESP_TIMEOUT) return; dev_err(mmc_dev(host->mmc),