Re: [PATCH] mmc: add a short delay in mmc_power_off

2011-09-16 Thread Daniel Drake
On Fri, Sep 16, 2011 at 5:47 PM, Ohad Ben-Cohen wrote: > Maybe. I was wondering why nobody cared so far about putting delays at > the power down path then, but I guess no one was really powering down > their controllers ? I know Marvell did, using some out-of-tree code, > but IIUC Marvell utilizes

Re: [PATCH] mmc: add a short delay in mmc_power_off

2011-09-16 Thread Ohad Ben-Cohen
On Fri, Sep 16, 2011 at 6:33 PM, Daniel Drake wrote: > Do you know the source of that info? No, not more than what the comments say. It also seems that the first delay was originally 1ms and at some point it was increased to 2ms (commit f9996aee36921e8f1d499de1b2ea380855cf6d97 "mmc: increase pow

Re: [PATCH] mmc: add a short delay in mmc_power_off

2011-09-16 Thread Daniel Drake
On Wed, Sep 7, 2011 at 8:12 PM, Ohad Ben-Cohen wrote: > I wouldn't call them random - they're pretty much explained. Do you know the source of that info? It probably also justifies what we need here. If short delays are needed when messing with power in the powerup path (i.e. "we just touched po

Re: [PATCH] mmc: add a short delay in mmc_power_off

2011-09-07 Thread Ohad Ben-Cohen
On Wed, Sep 7, 2011 at 10:03 PM, Daniel Drake wrote: > On Wed, Sep 7, 2011 at 12:44 PM, Ohad Ben-Cohen wrote: >> No, I wouldn't write a driver for this... >> >> I suggest first to understand exactly what's the bug, and that really >> involves using a scope here. > > I'll see what can be done, but

Re: [PATCH] mmc: add a short delay in mmc_power_off

2011-09-07 Thread Ohad Ben-Cohen
On Wed, Sep 7, 2011 at 10:03 PM, Daniel Drake wrote: >> Adding random sleeps without understanding what exactly do they solve >> generally feels wrong... > > Well, if you remove the existing sleeps from mmc_power_up do things > keep working for you? I wouldn't call them random - they're pretty mu

Re: [PATCH] mmc: add a short delay in mmc_power_off

2011-09-07 Thread Daniel Drake
On Wed, Sep 7, 2011 at 12:44 PM, Ohad Ben-Cohen wrote: > No, I wouldn't write a driver for this... > > I suggest first to understand exactly what's the bug, and that really > involves using a scope here. I'll see what can be done, but no promises. > Adding random sleeps without understanding wha

[PATCH] mmc: add a short delay in mmc_power_off

2011-09-07 Thread Daniel Drake
Stress-testing the runtime power management of libertas_sdio through a rmmod/insmod loop revealed that it is quite easy to cause an ETIMEDOUT failure in mmc_sdio_power_restore() leading to: libertas_sdio: probe of mmc1:0001:1 failed with error -16 Experimentation shows that a very short delay (