From patchwork Mon Jan 30 13:26:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 92861 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1435474qgi; Mon, 30 Jan 2017 05:35:26 -0800 (PST) X-Received: by 10.99.113.18 with SMTP id m18mr24076097pgc.115.1485783326913; Mon, 30 Jan 2017 05:35:26 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k9si12615444pln.16.2017.01.30.05.35.26; Mon, 30 Jan 2017 05:35:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753457AbdA3NfT (ORCPT + 5 others); Mon, 30 Jan 2017 08:35:19 -0500 Received: from mail-lf0-f52.google.com ([209.85.215.52]:32995 "EHLO mail-lf0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752783AbdA3NfO (ORCPT ); Mon, 30 Jan 2017 08:35:14 -0500 Received: by mail-lf0-f52.google.com with SMTP id x1so107723119lff.0 for ; Mon, 30 Jan 2017 05:34:54 -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=X+gHSNbP0jghtWDWWyjkNt4RziuwFmuzxEBXOr3kznk=; b=hH0zLpRPr5JaJzuRNhgFkhbZqIj15WDhB4KPkKZcG4q7PwUaQ0mFzZsJjmDDCClMqd 0DO6NVM8MzZk92GGw796CdhueHtcT5jCQbYWK6Vc6xd+IY7IJtAEC4OJElVNkynt3D0Z 9VRi7tsE0UcZK/p0Vs3gIB489V2Rb4TpTq3sY= 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=X+gHSNbP0jghtWDWWyjkNt4RziuwFmuzxEBXOr3kznk=; b=gkqN9A0XeSS/0sLQ3Ulao3gz5HVbt0AgNacKfLg0t+d9sYD7qNREtNxDRN2M+MCDE0 YLeiMftb0us8INQVODIHSmWaM6O4VwWkSSWaKLZF7U8Pw6W09+75HcjVLseRgw34SvxH X05IIltr9jllg/KkUTFCxm8KTn8EZ/5wQL/LoOWtFq4HFecjGNPtYh2jof/qmKhHNFxa PFanzHwXSOzmyWVRa4xwZUZxwUZUS9elg9X6JOLb5yrd1h6E9qI5TfxD6vaE2K3YoZNt kvdIyUwGN478IrnI2WF+pZAJcbuDfkBqlvoK+BgDZOq5g211Jmq+xF8IjmOD3mr5Y7Bk cItg== X-Gm-Message-State: AIkVDXLEMN+VwnsPRKhppndVa6imEcqkPjmIwpyjpOrzt6S0gxN9wXbpXDjGlvFOCzAfaJjD X-Received: by 10.25.76.196 with SMTP id z187mr6976740lfa.60.1485782792388; Mon, 30 Jan 2017 05:26:32 -0800 (PST) Received: from gnarp.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id v18sm3720918lja.31.2017.01.30.05.26.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Jan 2017 05:26:30 -0800 (PST) From: Linus Walleij To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: Chunyan Zhang , Baolin Wang , Linus Walleij , Maxime Ripard Subject: [PATCH] RFT: mmc: block: restore NULL check when retrying Date: Mon, 30 Jan 2017 14:26:25 +0100 Message-Id: <20170130132625.18296-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.9.3 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org When retrying to send a request, we used to have a NULL check on the request we try to resend. It was removed in commit c659b878689c ("mmc: block: inline command abortions") but maybe that was not such a good idea. Maybe it can actually be NULL? This might be causeing regressions in errorpath behaviour seen in kernelci boot tests on the sunxi. I'm not sure because this state machine has so many entrances and exits that I can't wrap my head around it. Cc: Maxime Ripard Reported-by: Ulf Hansson Signed-off-by: Linus Walleij --- drivers/mmc/core/block.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.9.3 -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c index ede759dda395..6c8be1a80551 100644 --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c @@ -1606,6 +1606,9 @@ static void mmc_blk_rw_cmd_abort(struct mmc_card *card, struct request *req) static void mmc_blk_rw_start_new(struct mmc_queue *mq, struct mmc_card *card, struct request *req) { + if (!req) + return; + if (mmc_card_removed(card)) { req->rq_flags |= RQF_QUIET; blk_end_request_all(req, -EIO);