Re: [PATCH 1/1] mmc: Bad device can cause mmc driver to hang

2012-11-16 Thread Trey Ramsay
On 11/16/2012 06:37 PM, Chris Ball wrote: > Hi Trey, thanks for the analysis, > > On Fri, Nov 16 2012, Trey Ramsay wrote: >> Good question. In regards to the original problem were it was hung in >> mmc_blk_err_check, the new code path will timeout after 10 minutes, log

Re: [PATCH 1/1] mmc: Bad device can cause mmc driver to hang

2012-11-16 Thread Trey Ramsay
On 11/16/2012 09:37 AM, Chris Ball wrote: > Hi Trey, > > On Fri, Nov 16 2012, Trey Ramsay wrote: >> There are infinite loops in the mmc code that can be caused by bad hardware. >> The code will loop forever if the device never comes back from program mode, >> R1_STATE_P

Re: [PATCH 1/1] mmc: Bad device can cause mmc driver to hang

2012-11-16 Thread Trey Ramsay
On 11/16/2012 09:37 AM, Chris Ball wrote: > Hi Trey, > > On Fri, Nov 16 2012, Trey Ramsay wrote: >> There are infinite loops in the mmc code that can be caused by bad hardware. >> The code will loop forever if the device never comes back from program mode, >> R1_STATE_P

[PATCH 1/1] mmc: Bad device can cause mmc driver to hang

2012-11-16 Thread Trey Ramsay
timeout will occur if the device never comes back from program state or the device never becomes ready for data. Signed-off-by: Trey Ramsay --- drivers/mmc/card/block.c | 15 +++ drivers/mmc/core/core.c| 18 +- drivers/mmc/core/mmc_ops.c | 11 +++ 3

drivers/mmc/card/block.c infinite loop in mmc_blk_err_check waiting on R1_READY_FOR_DATA

2012-10-31 Thread Trey Ramsay
In the 3.7-rc3 kernel, there is an infinite loop in the mmc_blk_err_check() function in drivers/mmc/card/block.c that can be caused bad hardware. This loop has moved around a little, but appears to have been around in the kernel since v2.6.12. The code will loop forever on write if the card is