RE: [PATCH net-next] bnx2x: Resolving a possible dead-lock situation

Vladislav Zolotarov
2010-11-23T16:36:28Z

>
> That seems strange. Even if performance penalty is not minimal, it
> should be avoided.
>
> If problem comes from ethtool, why not preventing BH in ethtool itself
> ?

Looks good. Let me run a few checks before u submit a patch to Dave. Or do u prefer
me to push it on your behalf?

Thanks,
vlad

>
> diff --git a/drivers/net/bnx2x/bnx2x_ethtool.c
> b/drivers/net/bnx2x/bnx2x_ethtool.c
> index d02ffbd..1f7d4e6 100644
> --- a/drivers/net/bnx2x/bnx2x_ethtool.c
> +++ b/drivers/net/bnx2x/bnx2x_ethtool.c
> @@ -1499,9 +1499,11 @@ static int bnx2x_run_loopback(struct bnx2x *bp,
> int loopback_mode, u8 link_up)
> * updates that have been performed while interrupts were
> * disabled.
> */
> - if (bp->common.int_block == INT_BLOCK_IGU)
> + if (bp->common.int_block == INT_BLOCK_IGU) {
> + local_bh_disable();
> bnx2x_tx_int(fp_tx);
> -
> + local_bh_enable();
> + }
> rx_idx = le16_to_cpu(*fp_rx->rx_cons_sb);
> if (rx_idx != rx_start_idx + num_pkts)
> goto test_loopback_exit;
>
>