From patchwork Sun Feb 12 11:12:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 9568337 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 F018860574 for ; Sun, 12 Feb 2017 11:12:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DF5C4284A7 for ; Sun, 12 Feb 2017 11:12:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D09EE284E9; Sun, 12 Feb 2017 11:12:40 +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=-6.9 required=2.0 tests=BAYES_00,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 8C0B9284A7 for ; Sun, 12 Feb 2017 11:12:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751149AbdBLLMh (ORCPT ); Sun, 12 Feb 2017 06:12:37 -0500 Received: from sauhun.de ([89.238.76.85]:50566 "EHLO pokefinder.org" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751159AbdBLLMg (ORCPT ); Sun, 12 Feb 2017 06:12:36 -0500 Received: from localhost (p54B33163.dip0.t-ipconnect.de [84.179.49.99]) by pokefinder.org (Postfix) with ESMTPSA id 8857631C0C7; Sun, 12 Feb 2017 12:12:34 +0100 (CET) From: Wolfram Sang To: linux-mmc@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, Yoshihiro Shimoda , Wolfram Sang Subject: [PATCH 3/4] mmc: host: tmio: don't BUG on unsupported stop commands Date: Sun, 12 Feb 2017 12:12:26 +0100 Message-Id: <20170212111227.1550-4-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170212111227.1550-1-wsa+renesas@sang-engineering.com> References: <20170212111227.1550-1-wsa+renesas@sang-engineering.com> 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 Halting the kernel on an unsupported stop command seems overkill, report the error and say what we already did (due to autocmd12) instead. Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman --- drivers/mmc/host/tmio_mmc_pio.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c index ad2840e1bfae51..b47dd9195fe3fe 100644 --- a/drivers/mmc/host/tmio_mmc_pio.c +++ b/drivers/mmc/host/tmio_mmc_pio.c @@ -553,10 +553,11 @@ void tmio_mmc_do_data_irq(struct tmio_mmc_host *host) } if (stop) { - if (stop->opcode == MMC_STOP_TRANSMISSION && !stop->arg) - sd_ctrl_write16(host, CTL_STOP_INTERNAL_ACTION, 0); - else - BUG(); + if (stop->opcode != MMC_STOP_TRANSMISSION || stop->arg) + dev_err(&host->pdev->dev, "unsupported stop: CMD%u,0x%x. We did CMD12,0\n", + stop->opcode, stop->arg); + + sd_ctrl_write16(host, CTL_STOP_INTERNAL_ACTION, 0); } schedule_work(&host->done);