From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5EA9C11F66 for ; Wed, 30 Jun 2021 22:33:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BFE396147D for ; Wed, 30 Jun 2021 22:33:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232514AbhF3Wfz (ORCPT ); Wed, 30 Jun 2021 18:35:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231864AbhF3Wfz (ORCPT ); Wed, 30 Jun 2021 18:35:55 -0400 Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7AE1C061756 for ; Wed, 30 Jun 2021 15:33:24 -0700 (PDT) Received: by mail-lj1-x22a.google.com with SMTP id p24so5540163ljj.1 for ; Wed, 30 Jun 2021 15:33:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NmMtEYQ6S0dKzm7scFp5Sxf68YROktjdsnzfUYcQBhk=; b=kfMdn/+DiE/hYKtQAkcx10sknZqEoddTeQ2TYjIAmWwdYV1r1lE103QPLEZnYF8SDf u9K5Jjbm+bgxTRuEMiquhCkdWq7aR+JrLOsrY9tdiEKg06+Z6iHlBRzS38qiD+79xmfl 1JhbpZ4AWGS+P1xRVIKzQVHmw4L5hllgkxHJUBzpEQWODX7SoxUxEhi45Fv1pp5wKf8w JXjz1wcacRYaCcyTkGHlt7xbm3xjZtApsWJRHC1nMnkx5BbIn38NssvV3hW7cTLstB0j OgK+MEjEPY8+G8QK4fMYlZO+UYGpi6ZahR8BX68caD0ZPw68IKT6/uolOPrZSkXHLExJ 7HWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NmMtEYQ6S0dKzm7scFp5Sxf68YROktjdsnzfUYcQBhk=; b=k6kdkWKkGAWqubr2/Dlm6q+CO8B20BnYLRlJPew6WYltW5Z5fNn/fBdAOdI3o7ByJ4 r1rW210p4uittgo8YW4qqJir9zY1fgM6NfhHojHeBWREzYI6467AfuDST7K6cjbTVZ88 qhhuhBEgtchUsO64I5aY2jfnvXGQlpWAUS5b4rb60cuYIgKMAywJGlQg8RabtevfIETM K50xtj3It9aK+OhONP6EFTBJCp16r6E6hDYCJHfr7Y0V5GABUwa2Aw0az/mtEZQBw0YG xxzmoTIGsn8tBWyYRJ3X0NrZfuhsmV7yMIyXqMIZcj6qugietTK1NBHYUa644QnwA3P0 dkbQ== X-Gm-Message-State: AOAM533UT8bb3uW3UoGDvMuVPSeNP/+wniLOePw9yn6vLN8sJoL5LmWa 9/rufjU8IrPfO6lsoI2QniIDQkRGsnOm6FzSvIiAdg== X-Google-Smtp-Source: ABdhPJwaxyd1gEtex9L2Kwb+jljmlXTOSQeK34Yv94mrI1exRNPetLvXTw6m43nkszAjt8moy6LAYWiXdENRPig41ok= X-Received: by 2002:a05:651c:603:: with SMTP id k3mr9455826lje.368.1625092402941; Wed, 30 Jun 2021 15:33:22 -0700 (PDT) MIME-Version: 1.0 References: <20210628232955.3327484-1-linus.walleij@linaro.org> In-Reply-To: From: Linus Walleij Date: Thu, 1 Jul 2021 00:33:11 +0200 Message-ID: Subject: Re: [PATCH] mmc: core: Add a card quirk for broken boot partitions To: Ulf Hansson Cc: linux-mmc , phone-devel@vger.kernel.org, Stephan Gerhold , newbyte@disroot.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: phone-devel@vger.kernel.org On Wed, Jun 30, 2021 at 5:28 PM Ulf Hansson wrote: > > /* Handle busy detection on DAT0 if the variant supports it. */ > > if (busy_resp && host->variant->busy_detect) > > if (!host->ops->busy_complete(host, status, err_msk)) > > return; > > > > These seemed to be especially problematic to me. > > Yes, exactly. The IRQ based busy detection code gets disabled with my > debug patch. > > It looks like there are some race conditions in the HW busy detection > path for mmci, which gets triggered by this eMMC card. (...) > Although, it's more optimal to receive an IRQ when busy on DAT0 is > de-asserted, rather than polling with ->card_busy(). Hence we also > have MMC_CAP_WAIT_WHILE_BUSY. Hmmmmm it kind of assumes that DAT0 will be de-asserted *before* we get a command response, never after. I think that is what the card is doing. If that is out-of-spec then we need to have a quirk like this but if it is legal behaviour, we rather need to fix the mmci driver. Yours, Linus Walleij