Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2573727yba; Mon, 15 Apr 2019 14:49:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqxicCUC7F7xmvIM7wIEp6r+1nkRk4TsoseUtlqAhHZaEHW7FKYGlV9vVFKYlQvj+6ztNG3m X-Received: by 2002:a62:ab13:: with SMTP id p19mr79640060pff.131.1555364955367; Mon, 15 Apr 2019 14:49:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555364955; cv=none; d=google.com; s=arc-20160816; b=KSuJPwF+5cKqWHHgbVtIdkZHvZTKZ9JLOmwhiyIOKxKFeChNBoLE0GvugCWgG5A4de l+RWvvYlOGpoJOAqCjp9MZNSIRkHsJTEAWPD6fla5oJftTtI6pF9LefS9DxMzPd70JBv y6kjV4Bxq+NgmklVk/tyRC9Oif5CzwqS9tXouZ+kl8XJTCRmKgInVW6Ls8xl+1hHSKWx dlZB4vUYAJc/zXTh4lqWHuAAJ5/b6momI5Tk8rQhqsFoFB40ORgj7MP5Lww6kt8y0Sjg 2jh/k2asKGjn1iizUYpVY61FxJNpYn1AoeQKPDNkP6HbQx1tpqwkDkJlQ876gDs20aRD hXJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=kXaB8APZP4Hr/ATS21yOa7SVL8EJy4H7VT042/0iBhA=; b=NEE3md/UpmL+dyLW8k5VMGMxCAwTUXx6VKWwsT9ZD6Ux9PYk3nzs9T9SO+RjtjmRiC 64FgMpxnmZCwPMmywYXpu3YthOt+XS8YaiOS11xjQg8vBexGuzl28BhcB4VOY9iLC1vk PqKNIXiQkkBw0NGieRUSh/MysJMe3wLxf9VZr0xMtl4P+rKTOWuOXvtBzGRw40S6AY+2 6rs3+h9hkcvyn4hJacaa/FsY5DbRUD2EOi15ND7zqf122AmsYVkvMWpdoROCAKjpMULW 8Ja82kJGy6gw7EG2us/GsvF6R0+qXgapY512p/HcNbKFZ55IEjbgs0pUFEgz4Io1Tiva Heqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="bw6N/Ou7"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k62si14380641pgd.444.2019.04.15.14.48.59; Mon, 15 Apr 2019 14:49:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="bw6N/Ou7"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728101AbfDOVsO (ORCPT + 99 others); Mon, 15 Apr 2019 17:48:14 -0400 Received: from mail-it1-f196.google.com ([209.85.166.196]:54422 "EHLO mail-it1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725804AbfDOVsO (ORCPT ); Mon, 15 Apr 2019 17:48:14 -0400 Received: by mail-it1-f196.google.com with SMTP id a190so12980044ite.4 for ; Mon, 15 Apr 2019 14:48:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=kXaB8APZP4Hr/ATS21yOa7SVL8EJy4H7VT042/0iBhA=; b=bw6N/Ou7HzleTSIK2SdWsF4YgqeWxqz9ISWTMv5EuIkkmwc9jYEnMFqoj2Q1Qky1hA +Zx95zeoWEnU+h6VJ5ek8tqGl9o9rlPPol4Hs3GOdb064DWxkZKieQr47MrP5LG0M5Pv 0NY5ryq0GQjHs8KjsXwarObW8RRJjpFhoh6qIfCBw3lQMfFzLjqx6FofAkcTYhkVrlh/ Y+s0tyxxaq/JSdKzu2HpFrI8dCxwE1KOy5crKd4GrhSuferEqsuuZexQpjpiZma4edPA kttpxA5n4a6JgnMc4pBqV1pD7/LKRqlgV1lWx/FaquEu8ykq0LQRaDwOeZnD1x+FhuCy //lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=kXaB8APZP4Hr/ATS21yOa7SVL8EJy4H7VT042/0iBhA=; b=bzXvsuRtgUP/Q7eZblR/It1orutS4bomFvWeUN/MM2PBRUKmIxhgojbnaRRVL7lerj dCouBeZHLdYvCjqiA6fPJZd/ePgrB0onH/rvaMZgadUE0vWhmEngSZO0Lqo6i1Tlp6BX dHNcMKbtwHyxOu1j/trOatK7IhFy8SPkzvgtMXj1184VBJcmrC82XsCorg5iNbaOmilK I7SATKfG14B0KnT3xg/WSwIrvlDwiD2geYfqOzqu9nyhqACfaebIrM/ipAq6PccRnmVC krxSsD8T7b9EO6sV8p6NZZ2ednFlrH+JCsnP24wSW91/gMGnHkRwnwu1KBh2/J2m9YZL hSmw== X-Gm-Message-State: APjAAAWrLEpV+7qSUK+KS1dJQ2msbQ/jaFgR6Qb6GcU1KoGQ+HjDc1Em XDJlt8443FvTuDBij3l1XMCNjg== X-Received: by 2002:a24:ac56:: with SMTP id m22mr26954319iti.25.1555364893311; Mon, 15 Apr 2019 14:48:13 -0700 (PDT) Received: from google.com ([2620:15c:183:200:4f03:26b9:1e31:4fda]) by smtp.gmail.com with ESMTPSA id s3sm17486394ioo.65.2019.04.15.14.48.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 15 Apr 2019 14:48:12 -0700 (PDT) Date: Mon, 15 Apr 2019 15:48:10 -0600 From: Ross Zwisler To: Raul E Rangel Cc: linux-mmc@vger.kernel.org, djkurtz@chromium.org, zwisler@chromium.org, hongjiefang , Jennifer Dahm , linux-kernel@vger.kernel.org, Kyle Roeschley , Avri Altman , Ulf Hansson Subject: Re: [PATCH v1] mmc: core: Verify SD bus width Message-ID: <20190415214810.GA157394@google.com> References: <20190415210031.54062-1-rrangel@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190415210031.54062-1-rrangel@chromium.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 15, 2019 at 03:00:31PM -0600, Raul E Rangel wrote: > The SD Physical Layer Spec says the following: Since the SD Memory Card > shall support at least the two bus modes 1-bit or 4-bit width, then any SD > Card shall set at least bits 0 and 2 (SD_BUS_WIDTH="0101"). > > This change verifies the card has specified a bus width. > > verified it didn't mount. > > Signed-off-by: Raul E Rangel > --- > AMD SDHC Device 7806 can get into a bad state after a card disconnect > where anything transferred via the DATA lines will always result in a > zero filled buffer. Currently the driver will continue without error if > the HC is in this condition. A block device will be created, but reading > from it will result in a zero buffer. This makes it seem like the SD > device has been erased, when in actuality the data is never getting > copied from the DATA lines to the data buffer. > > SCR is the first command in the SD initialization sequence that uses the > DATA lines. By checking that the response was invalid, we can abort > mounting the card. > > Here is an example of a bad trace: https://pastebin.com/TY2cF9n0 > Look for sd_scr and sd_ssr. Personally I think that all the info you have here below the --- should be in the actual commit message. It provides context for the bug that the patch is fixing, what the old and new behaviors are and how you tested. The text below the --- is for ephemeral things that don't matter once the code is committed: what revision of the patch set you are on, noting that you've addressed someone's comments, etc.