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 <[EMAIL PROTECTED]>
>
> 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 [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html