Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3474105yba; Mon, 29 Apr 2019 03:04:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqxOc6zsRJIwGcH2TVJ29Xq8FuK+MEoaRYModkI2HO7IVFmxfrxFDgk2PQw5hJLndTiluJdk X-Received: by 2002:a63:bf0d:: with SMTP id v13mr35185297pgf.186.1556532270149; Mon, 29 Apr 2019 03:04:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556532270; cv=none; d=google.com; s=arc-20160816; b=de6yieuESSReJ85ex7T/DrYkUEJPunkt0K8SXiMsetgTJ95zHJukBDkdZRH4q8oFmp GNIdYGWa3Qn/TvgcZ7+t3kQslmiJguUssOBKGocFiHWIIJU0Ervez6Nk6HVbrz934evM CRLaWBDPSsnXpw4SLWtDk/UEoLuydhU4zEFfw641dq/KIgDiEgck6UeEJqexQv0BJsgn Lo4OEcByruQX5iGF3/WZyfJD57P7Os0f99rUkgNPhO/TSPP+XUPCQ8zKWQgvR7ZTQ3fm 7SXcuQ/8z7Xbq+6JTNnQezQ2HUNAMZ8mrqfCzHmYsm6FQNHIaQPcTfzGI2yuMZlrupIn u5Iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=wu8vgvBuJ0ba1a1wtubjAQOiFEAHkL9wdKCwmj/BeCo=; b=RnikyzPcd0+SJU3ZlwaB2PVFRtJUfXtBkwYixg3llzy23o9T1S9AHZneK5vYxqPj1T cabrjv+WXIPKcl9CcMrlxOiu9d5Xuac4dduQAJb3rNvZplBYooGj3nbM4J5ZzBXtvaoi AZJ/WHF2UKWJslN9krpdl23HqUT9KbQS20SjNuDXM8yCdCsjnEnd5+uYTICKckiXpT2v pZi9YKaQaoDjSyNE6uX/cTKwUAtHri33TuddT/WyxgQP27SHAFHGsqLvj9w4BbFqzOxF IhumISYKWzUpoYK8lJKVcZ33p6tE5yvuzH0/i3pN0/ugZ6zpG3Z75qPPfnR3uoLBPb6u snSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zNwGC9WU; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l62si33839039pfc.65.2019.04.29.03.04.09; Mon, 29 Apr 2019 03:04:30 -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=@linaro.org header.s=google header.b=zNwGC9WU; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727718AbfD2KBV (ORCPT + 99 others); Mon, 29 Apr 2019 06:01:21 -0400 Received: from mail-vs1-f65.google.com ([209.85.217.65]:41581 "EHLO mail-vs1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727658AbfD2KBV (ORCPT ); Mon, 29 Apr 2019 06:01:21 -0400 Received: by mail-vs1-f65.google.com with SMTP id g187so5524572vsc.8 for ; Mon, 29 Apr 2019 03:01:20 -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=wu8vgvBuJ0ba1a1wtubjAQOiFEAHkL9wdKCwmj/BeCo=; b=zNwGC9WUEItvbivjH1HnlPfR2Xw8BjgG21df7sQOOm+CmS8MGiuqxkOd+mkg4GeKeI gB+yEpX5Ektbw0vL2PfnJn9i+5op0GXZ8oC+H+LZkWKP73H765lzZzxXpWLP/9so3u2Q 1JgRtBL6bFJaCXAbs15cTKLRLbeFA9k5Lh6zEx2nVqN2TSXTV4OgvAozToeirly2+fjm w44XH8ZnRveeNH7iYAMMuzDNACL7g28RErEwv5l7JMjM7A0dNR3OMwl/i9bTI2jLg2as G5hQV8E4Kc08/X83lFii4XceCxNNyrfHyfh76us1WGO4AKfzusgtv8cExnfqEQ31foyr 5frw== 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=wu8vgvBuJ0ba1a1wtubjAQOiFEAHkL9wdKCwmj/BeCo=; b=PQoJGMGVSrNR2eBwKH2VIq+E0asj1L9Jz46wREMG0epmQFqZKNWyYfmO1n+mX/eHS7 1q9z7iCh61Gsf6Ly3odBmYDPPXyJighfYV9dPpfSHoO56bU9HGrr2jfoEfSDjLsFUlW/ dMjoKBOLV/A/5uS36BWi2FFMyuWdml15Fo0yQHFI+tHiVTKjfZu7MDIrDMs43r51+Tll xMsPany0y8NBu5yRk2HQZpxy0LqV2ZaostQLvLZ7pcUDSHOA3L4MdJASxv4AJKNJy3Cq lnCTjOQhWYbyoAJxi/hfnG+ybVsuaO5DwU/dSMrC+oemFwNCcYifQYN4emw6rPseQsMw e6DQ== X-Gm-Message-State: APjAAAWt25zSBXoZuNbuX6RvKpm5MIa1cVggdjVFF/4wA2EzQtuaLwvi 4/I0wrmghb0lXcD9ItxFBO/R2SGyL8kWUMnBrQLX3Q== X-Received: by 2002:a67:8155:: with SMTP id c82mr2470478vsd.200.1556532079983; Mon, 29 Apr 2019 03:01:19 -0700 (PDT) MIME-Version: 1.0 References: <20190416185705.256369-1-rrangel@chromium.org> <20190424155659.GA193321@google.com> In-Reply-To: <20190424155659.GA193321@google.com> From: Ulf Hansson Date: Mon, 29 Apr 2019 12:00:43 +0200 Message-ID: Subject: Re: [PATCH v2] mmc: core: Verify SD bus width To: Raul Rangel Cc: Avri Altman , "linux-mmc@vger.kernel.org" , "djkurtz@chromium.org" , "zwisler@chromium.org" , hongjiefang , "linux-kernel@vger.kernel.org" , Shawn Lin , Kyle Roeschley Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 24 Apr 2019 at 17:57, Raul Rangel wrote: > > 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? Yes, please do! Kind regards Uffe