Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1088298yba; Wed, 24 Apr 2019 14:55:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqxWqbs6Ht+x2maA3eGJKOxGmvXYgMbebWN2iz88eici1K0AGF7v8rFrOR58oow9C1rZLzsG X-Received: by 2002:a63:41c4:: with SMTP id o187mr32171793pga.73.1556142902180; Wed, 24 Apr 2019 14:55:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556142902; cv=none; d=google.com; s=arc-20160816; b=0ZYfH/TS3e+lLa2glOqsc5cnllc+xM+GGh1wJAuFclu8L6OSRSnJHi4mWMH9ZtEM6/ hbuO0zC0P0e2PReruHwXqxEIejV0J+ITz1WxMSnyXVuGJSvMsJixCEDzyYtLZSg4J24q qiHaKCwuu9kkICj0Zqj6R3P/1en4hCeE++VKTr/28qxUlc3/Q0QNp7mm5avHdGGEaj8J Xnv+lYUPXQtb4EdSSsdrq1d3m7a2bkYwI128qi8BNojEcLOTxRn9RnnOIciJhEgz1BcE DF3JydmjUsfMIibn77aldo87LoR8zmZPS/JpIVnvX6hX8IMMwyCplK6IZhaJ/5IXzONn RaeA== 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; bh=cIId6kCcVcx1AyE55PTDF4Z6iHjQ4rDpUrHBXio3Vqc=; b=unos5r2YHOPLq04mcoKvIJ1GtUWh9FLZqMHriSj0s5bOJmadmYVtWIRClNrmxQIYis t132LKSZ4ZywVKqWzQQeTUsIXVeAIRPfm1HN2nrXQFv8Y9w6V9kCRfPiyzEgvAaSKTt9 JlkPDmaYFLITnsYYiW5vbOvr4Kgs29UXgCog7va+0+ambkmtI6v3vLJ0y1DCcvEN0NYt 7F4epgUgw7fqZCQr/mcNpSKqKzHIL247TozIQlB216fGdWqoG9f0kgnmAVLpx7eJztYQ DHXNi4EA4bJziSB7f8NHHBbSrBUWmLoklkUepONFrd5uH96daDPAqDnNakwS3eYm//KU nSAw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e3si18728715pgs.37.2019.04.24.14.54.47; Wed, 24 Apr 2019 14:55:02 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732006AbfDXP5H (ORCPT + 99 others); Wed, 24 Apr 2019 11:57:07 -0400 Received: from mail-it1-f196.google.com ([209.85.166.196]:36506 "EHLO mail-it1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731990AbfDXP5G (ORCPT ); Wed, 24 Apr 2019 11:57:06 -0400 Received: by mail-it1-f196.google.com with SMTP id y10so7072465itc.1 for ; Wed, 24 Apr 2019 08:57:06 -0700 (PDT) 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=cIId6kCcVcx1AyE55PTDF4Z6iHjQ4rDpUrHBXio3Vqc=; b=QAldvC1jwdwaKozQBa5HURtfhNcBoE9Dy5JysgzJicz77F44En28c93nmiKGXT281i DAEOzYcofEJCd2u9UGXIQYOuhz8l9kk7+wg09pjXiWj3wyxM1FKvmgTvP/+8tIPsO+Ig V4Dd7RKH46swD1wNKVsX9t/tInzUR636FHye5ym1oQjqZHcYCDEoy2+TWxtaLxNx3obp zkcqrGiqE1/uOEr9GMdFKVdwG/BXIqR++vZKr+A0aQO+U2yyY+C823VvHX/t0c30pkvX k11rI0tEGNXDdwaYbmf8Iv+OU7x1Yyw6+DL8W6gSHilv2rSRcNJCnyqT4txoN7MZSUdY k+vQ== X-Gm-Message-State: APjAAAUep+9FSnbn+lGN3pHUOjd6zJYeVxHYM3TVgYNm3MGqJ2uqFuT+ H66V0lnGJIqC3wjtizIyMbObSA== X-Received: by 2002:a24:d003:: with SMTP id m3mr6698926itg.132.1556121425498; Wed, 24 Apr 2019 08:57:05 -0700 (PDT) Received: from google.com ([2620:15c:183:0:20b8:dee7:5447:d05]) by smtp.gmail.com with ESMTPSA id m137sm9135010itb.27.2019.04.24.08.57.03 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 24 Apr 2019 08:57:04 -0700 (PDT) Date: Wed, 24 Apr 2019 09:56:59 -0600 From: Raul Rangel To: Avri Altman Cc: "linux-mmc@vger.kernel.org" , "djkurtz@chromium.org" , "zwisler@chromium.org" , hongjiefang , "linux-kernel@vger.kernel.org" , Shawn Lin , Kyle Roeschley , Ulf Hansson , Raul Rangel Subject: Re: [PATCH v2] mmc: core: Verify SD bus width Message-ID: <20190424155659.GA193321@google.com> References: <20190416185705.256369-1-rrangel@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Thu, Apr 18, 2019 at 06:20:26AM +0000, Avri Altman 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. > > > > 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. > > > > Acked-by: Avri Altman > > > > Signed-off-by: Raul E Rangel > Reviewed-by: Avri Altman > > Thanks, > Avri Thanks for the review. Should I rebase this on master so it applies cleanly without the MMC trace patches? Raul