Re: [RFC PATCH 1/2] mmc: sdhci: Manually check card status after reset

2019-08-05 Thread Adrian Hunter
On 5/08/19 7:49 PM, Raul Rangel wrote: > On Fri, Aug 02, 2019 at 07:58:20AM +0300, Adrian Hunter wrote: >> >> You seem not to have answered to my suggestion for a change to >> sdhci_reinit() here: >> >> >> https://lore.kernel.org/lkml/fcdf6cc4-2729-abe2-85c8-b0d04901c...@intel.com/ >> > I th

Re: [RFC PATCH 1/2] mmc: sdhci: Manually check card status after reset

2019-08-05 Thread Raul Rangel
On Fri, Aug 02, 2019 at 07:58:20AM +0300, Adrian Hunter wrote: > > You seem not to have answered to my suggestion for a change to sdhci_reinit() > here: > > > https://lore.kernel.org/lkml/fcdf6cc4-2729-abe2-85c8-b0d04901c...@intel.com/ > I thought I answered it here: https://lore.kernel

Re: [RFC PATCH 1/2] mmc: sdhci: Manually check card status after reset

2019-08-01 Thread Adrian Hunter
On 1/08/19 6:16 PM, Raul Rangel wrote: > On Wed, Jun 19, 2019 at 08:56:25AM -0600, Raul Rangel wrote: >> Your patch looks good. I tried it out and got over 57k insertion/removal >> iterations. Do you want me to send out your patch, or do you want to do >> it? >> >> Just to recap, the patch you prop

Re: [RFC PATCH 1/2] mmc: sdhci: Manually check card status after reset

2019-08-01 Thread Raul Rangel
On Wed, Jun 19, 2019 at 08:56:25AM -0600, Raul Rangel wrote: > Your patch looks good. I tried it out and got over 57k insertion/removal > iterations. Do you want me to send out your patch, or do you want to do > it? > > Just to recap, the patch you proposed + the AMD SDHCI specific patch fix > the

Re: [RFC PATCH 1/2] mmc: sdhci: Manually check card status after reset

2019-06-19 Thread Raul Rangel
On Tue, Jun 11, 2019 at 01:30:55PM +0300, Adrian Hunter wrote: > Does the following work? > > > diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c > index 0cd5f2ce98df..f672171246b0 100644 > --- a/drivers/mmc/host/sdhci.c > +++ b/drivers/mmc/host/sdhci.c > @@ -341,8 +341,19 @@ stati

Re: [RFC PATCH 1/2] mmc: sdhci: Manually check card status after reset

2019-06-11 Thread Adrian Hunter
On 10/06/19 7:32 PM, Raul Rangel wrote: > On Mon, Jun 10, 2019 at 06:17:31PM +0200, Ulf Hansson wrote: >> + Adrian >> >> On Fri, 7 Jun 2019 at 18:05, Raul Rangel wrote: >>> >>> On Tue, May 28, 2019 at 09:38:20AM +0200, Ulf Hansson wrote: On Wed, 1 May 2019 at 19:55, Raul E Rangel wrote: >>>

Re: [RFC PATCH 1/2] mmc: sdhci: Manually check card status after reset

2019-06-10 Thread Raul Rangel
On Mon, Jun 10, 2019 at 06:17:31PM +0200, Ulf Hansson wrote: > + Adrian > > On Fri, 7 Jun 2019 at 18:05, Raul Rangel wrote: > > > > On Tue, May 28, 2019 at 09:38:20AM +0200, Ulf Hansson wrote: > > > On Wed, 1 May 2019 at 19:55, Raul E Rangel wrote: > > > > First off, thanks for the review. > > >

Re: [RFC PATCH 1/2] mmc: sdhci: Manually check card status after reset

2019-06-10 Thread Ulf Hansson
+ Adrian On Fri, 7 Jun 2019 at 18:05, Raul Rangel wrote: > > On Tue, May 28, 2019 at 09:38:20AM +0200, Ulf Hansson wrote: > > On Wed, 1 May 2019 at 19:55, Raul E Rangel wrote: > > First off, thanks for the review. > > > > > > > There is a race condition between resetting the SDHCI controller and

Re: [RFC PATCH 1/2] mmc: sdhci: Manually check card status after reset

2019-06-07 Thread Raul Rangel
On Tue, May 28, 2019 at 09:38:20AM +0200, Ulf Hansson wrote: > On Wed, 1 May 2019 at 19:55, Raul E Rangel wrote: First off, thanks for the review. > > > > There is a race condition between resetting the SDHCI controller and > > disconnecting the card. > > > > For example: > > 0) Card is connecte

Re: [RFC PATCH 1/2] mmc: sdhci: Manually check card status after reset

2019-05-28 Thread Ulf Hansson
On Wed, 1 May 2019 at 19:55, Raul E Rangel wrote: > > There is a race condition between resetting the SDHCI controller and > disconnecting the card. > > For example: > 0) Card is connected and transferring data > 1) mmc_sd_reset is called to reset the controller due to a data error I assume you r

Re: [RFC PATCH 1/2] mmc: sdhci: Manually check card status after reset

2019-05-08 Thread Raul Rangel
On Fri, May 03, 2019 at 09:12:24AM -0600, Raul Rangel wrote: > On Wed, May 01, 2019 at 11:54:56AM -0600, Raul E Rangel wrote: > > I am running into a kernel panic. A task gets stuck for more than 120 > > seconds. I keep seeing blkdev_close in the stack trace, so maybe I'm not > > calling something

Re: [RFC PATCH 1/2] mmc: sdhci: Manually check card status after reset

2019-05-03 Thread Raul Rangel
On Wed, May 01, 2019 at 11:54:56AM -0600, Raul E Rangel wrote: > I am running into a kernel panic. A task gets stuck for more than 120 > seconds. I keep seeing blkdev_close in the stack trace, so maybe I'm not > calling something correctly? > > Here is the panic: > https://privatebin.net/?8ec48c1

[RFC PATCH 1/2] mmc: sdhci: Manually check card status after reset

2019-05-01 Thread Raul E Rangel
There is a race condition between resetting the SDHCI controller and disconnecting the card. For example: 0) Card is connected and transferring data 1) mmc_sd_reset is called to reset the controller due to a data error 2) sdhci_set_ios calls sdhci_do_reset 3) SOFT_RESET_ALL is toggled which clears