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: <20070604233940.GB31462@havoc.gtf.org> Date: Mon, 4 Jun 2007 19:39:40 -0400 From: Jeff Garzik <jeff@...zik.org> To: Michael Chan <mchan@...adcom.com> Cc: davem@...emloft.net, andy@...yhouse.net, netdev@...r.kernel.org Subject: Re: [2/5][BNX2]: Add missing wait in bnx2_init_5709_context(). On Mon, Jun 04, 2007 at 05:00:35PM -0700, Michael Chan wrote: > [BNX2]: Add missing wait in bnx2_init_5709_context(). > > For correctness, we need to wait for the MEM_INIT bit to be cleared > in the BNX2_CTX_COMMAND register before proceeding. > > Signed-off-by: Michael Chan <mchan@...adcom.com> > > diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c > index 5d69e5b..daa62d9 100644 > --- a/drivers/net/bnx2.c > +++ b/drivers/net/bnx2.c > @@ -1778,6 +1778,12 @@ bnx2_init_5709_context(struct bnx2 *bp) > val = BNX2_CTX_COMMAND_ENABLED | BNX2_CTX_COMMAND_MEM_INIT | (1 << 12); > val |= (BCM_PAGE_BITS - 8) << 16; > REG_WR(bp, BNX2_CTX_COMMAND, val); > + for (i = 0; i < 10; i++) { > + val = REG_RD(bp, BNX2_CTX_COMMAND); > + if (!(val & BNX2_CTX_COMMAND_MEM_INIT)) > + break; > + udelay(2); > + } > for (i = 0; i < bp->ctx_pages; i++) { > int j; If the bit does not clear after 10 loops, it seems to me you should complain or somehow otherwise make note of the failure. Jeff - 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