From: David Vrabel <david.vrabel@citrix.com>
To: Nithin Nayak Sujir <nsujir@broadcom.com>
Cc: <netdev@vger.kernel.org>, Michael Chan <mchan@broadcom.com>
Subject: Re: [PATCHv1 net] tg3: fix deadlock in tg3_change_mtu()
Date: Thu, 6 Feb 2014 10:43:49 +0000 [thread overview]
Message-ID: <52F36765.6050403@citrix.com> (raw)
In-Reply-To: <52F2B6B2.1020901@broadcom.com>
On 05/02/14 22:09, Nithin Nayak Sujir wrote:
>
> David,
> Rather than doing it this way, I think it's sufficient to move the call
> to tg3_set_mtu() between tg3_netif_stop() and tg3_full_lock().
>
> Before tg3 started using set_bit() for flags, tg3_set_mtu() needed to be
> under a lock, but that's not the case anymore.
>
> Can you try this patch?
That looks better.
Tested-by: David Vrabel <david.vrabel@citrix.com>
Thanks.
David
> diff --git a/drivers/net/ethernet/broadcom/tg3.c
> b/drivers/net/ethernet/broadcom/tg3.c
> index e2ca03e..0bb79b8 100644
> --- a/drivers/net/ethernet/broadcom/tg3.c
> +++ b/drivers/net/ethernet/broadcom/tg3.c
> @@ -14113,12 +14113,12 @@ static int tg3_change_mtu(struct net_device
> *dev, int new_mtu)
>
> tg3_netif_stop(tp);
>
> + tg3_set_mtu(dev, tp, new_mtu);
> +
> tg3_full_lock(tp, 1);
>
> tg3_halt(tp, RESET_KIND_SHUTDOWN, 1);
>
> - tg3_set_mtu(dev, tp, new_mtu);
> -
> /* Reset PHY, otherwise the read DMA engine will be in a mode that
> * breaks all requests to 256 bytes.
> */
>
> Nithin.
prev parent reply other threads:[~2014-02-06 10:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-04 19:01 [PATCHv1 net] tg3: fix deadlock in tg3_change_mtu() David Vrabel
2014-02-05 22:09 ` Nithin Nayak Sujir
2014-02-06 10:43 ` David Vrabel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52F36765.6050403@citrix.com \
--to=david.vrabel@citrix.com \
--cc=mchan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=nsujir@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).