lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <540F14A2.6000904@ti.com> Date: Tue, 9 Sep 2014 17:54:26 +0300 From: Roger Quadros <rogerq@...com> To: Nishanth Menon <nm@...com>, <wg@...ndegger.com>, <mkl@...gutronix.de> CC: <tony@...mide.com>, <tglx@...utronix.de>, <mugunthanvnm@...com>, <george.cherian@...com>, <balbi@...com>, <nsekhar@...com>, <sergei.shtylyov@...entembedded.com>, <linux-omap@...r.kernel.org>, <linux-can@...r.kernel.org>, <netdev@...r.kernel.org> Subject: Re: [PATCH v2 1/3] can: c_can_platform: Fix c_can_hw_raminit_ti() and add timeout On 09/09/2014 05:51 PM, Nishanth Menon wrote: > On 09/09/2014 09:45 AM, Roger Quadros wrote: > [...] >>>> /* We look only at the bits of our instance. */ >>>> val &= mask; >>>> - while ((readl(priv->raminit_ctrlreg) & mask) != val) >>>> + while ((readl(priv->raminit_ctrlreg) & mask) != val) { >>>> udelay(1); >>>> + timeout++; >>>> + >>>> + if (timeout == 1000) { >>> >>> How did we come up with this number? >> >> wild guess ;), that it should be set in a few microseconds and the delay is not too >> large. >> >> Till I don't hear from hardware guys, it will remain a guess. >> > > in cases like these, I suggest using emperical data as point -> > example doing some 10,000 iterations of the operation and picking up > the worse case number and double it. In my tests the bit was either set immediately or never at all. Not sure if we should increase it further. > > Either way, you need to document the same, else a few years down the > line, when that number is in question, no one will know what it's > basis was.. > OK. I'll add a comment there. cheers, -roger -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists