From: yzhu1 <Yanjun.Zhu@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] This change is based on a similar change made to e1000e support in commit bb9e44d0d0f4 ("e1000e: prevent oops when adapter is being closed and reset simultaneously"). The same issue has also been observed on the older e1000 cards.
Date: Mon, 25 Nov 2013 10:53:00 +0800 [thread overview]
Message-ID: <5292BB8C.2060001@windriver.com> (raw)
In-Reply-To: <1385347388-5859-1-git-send-email-yanjun.zhu@windriver.com>
Please ignore this mail since the title is wrong.
Thanks a lot.
Zhu Yanjun
On 11/25/2013 10:43 AM, yzhu1 wrote:
> Here, we have increased the RESET_COUNT value to 50 because there are too
> many accesses to e1000 nic on stress tests to e1000 nic, it is not enough
> to set RESET_COUT 25. Experimentation has shown that it is enough to set
> RESET_COUNT 50.
> ---
> drivers/net/ethernet/intel/e1000/e1000.h | 5 +++++
> drivers/net/ethernet/intel/e1000/e1000_main.c | 7 +++++++
> 2 files changed, 12 insertions(+)
>
> diff --git a/drivers/net/ethernet/intel/e1000/e1000.h b/drivers/net/ethernet/intel/e1000/e1000.h
> index 26d9cd5..5c2a1b1 100644
> --- a/drivers/net/ethernet/intel/e1000/e1000.h
> +++ b/drivers/net/ethernet/intel/e1000/e1000.h
> @@ -83,6 +83,11 @@ struct e1000_adapter;
>
> #define E1000_MAX_INTR 10
>
> +/*
> + * Count for polling __E1000_RESET condition every 10-20msec.
> + */
> +#define E1000_CHECK_RESET_COUNT 50
> +
> /* TX/RX descriptor defines */
> #define E1000_DEFAULT_TXD 256
> #define E1000_MAX_TXD 256
> diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c
> index 59ad007..69c55ed 100644
> --- a/drivers/net/ethernet/intel/e1000/e1000_main.c
> +++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
> @@ -1445,7 +1445,10 @@ static int e1000_close(struct net_device *netdev)
> {
> struct e1000_adapter *adapter = netdev_priv(netdev);
> struct e1000_hw *hw = &adapter->hw;
> + int count = E1000_CHECK_RESET_COUNT;
>
> + while (test_bit(__E1000_RESETTING, &adapter->flags) && count--)
> + usleep_range(10000, 20000);
> WARN_ON(test_bit(__E1000_RESETTING, &adapter->flags));
> e1000_down(adapter);
> e1000_power_down_phy(adapter);
> @@ -4969,6 +4972,10 @@ static int __e1000_shutdown(struct pci_dev *pdev, bool *enable_wake)
> netif_device_detach(netdev);
>
> if (netif_running(netdev)) {
> + int count = E1000_CHECK_RESET_COUNT;
> + while (test_bit(__E1000_RESETTING, &adapter->flags) && count--)
> + usleep_range(10000, 20000);
> +
> WARN_ON(test_bit(__E1000_RESETTING, &adapter->flags));
> e1000_down(adapter);
> }
prev parent reply other threads:[~2013-11-25 2:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-25 2:43 [PATCH] This change is based on a similar change made to e1000e support in commit bb9e44d0d0f4 ("e1000e: prevent oops when adapter is being closed and reset simultaneously"). The same issue has also been observed on the older e1000 cards yzhu1
2013-11-25 2:53 ` yzhu1 [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=5292BB8C.2060001@windriver.com \
--to=yanjun.zhu@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
/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