From mboxrd@z Thu Jan 1 00:00:00 1970 From: Raul Rangel Subject: Re: [PATCH v2] mmc: core: Verify SD bus width Date: Wed, 24 Apr 2019 09:56:59 -0600 Message-ID: <20190424155659.GA193321@google.com> References: <20190416185705.256369-1-rrangel@chromium.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org 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 List-Id: linux-mmc@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