netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: shahed.shaikh@qlogic.com
Cc: netdev@vger.kernel.org, Dept_NX_Linux_NIC_Driver@qlogic.com,
	sony.chacko@qlogic.com
Subject: Re: [PATCH net 5/8] qlcnic: Fix reset recovery after transmit timeout
Date: Wed, 08 May 2013 12:06:58 -0700 (PDT)	[thread overview]
Message-ID: <20130508.120658.318501645917412400.davem@davemloft.net> (raw)
In-Reply-To: <1367956506-3290-6-git-send-email-shahed.shaikh@qlogic.com>

From: Shahed Shaikh <shahed.shaikh@qlogic.com>
Date: Tue, 7 May 2013 15:55:03 -0400

> @@ -435,10 +435,7 @@ static void qlcnic_83xx_idc_attach_driver(struct qlcnic_adapter *adapter)
>  	}
>  done:
>  	netif_device_attach(netdev);
> -	if (netif_running(netdev)) {
> -		netif_carrier_on(netdev);
> -		netif_wake_queue(netdev);
> -	}
> +	adapter->netdev->trans_start = jiffies;
>  }
>  
>  static int qlcnic_83xx_idc_enter_failed_state(struct qlcnic_adapter *adapter,

This is not right.

Multiqueue aware drivers should never access netdev->trans_start
directly, and I see several such writes in this driver.

Anything you write here will be totally ignored by the rest of the
kernel, because this value is overwritten by every call to dev_trans_start()
which is the only valid method by which to determine this value.

dev_trans_start() walks all of the transmit queues, recording the most
recent txq->trans_start timestamp in netdev->trans_start.

So if you write netdev->trans_start in your driver, it does nothing,
because even the dev_watchdog() time is going to inspect the per-queue
txq->trans_start values and ignore the netdev->trans_start value for
devices whose driver suppports multiqueue as qlcnic does.

  reply	other threads:[~2013-05-08 19:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-07 19:54 [PATCH net 0/8] qlcnic: Bug fixes Shahed Shaikh
2013-05-07 19:54 ` [PATCH net 1/8] qlcnic: Fix setting MAC address Shahed Shaikh
2013-05-07 19:55 ` [PATCH net 2/8] qlcnic: Fix ethtool strings Shahed Shaikh
2013-05-07 19:55 ` [PATCH net 3/8] qlcnic: Fix missing bracket in module parameter Shahed Shaikh
2013-05-07 19:55 ` [PATCH net 4/8] qlcnic: Fix ethtool Supported port status for 83xx Shahed Shaikh
2013-05-07 19:55 ` [PATCH net 5/8] qlcnic: Fix reset recovery after transmit timeout Shahed Shaikh
2013-05-08 19:06   ` David Miller [this message]
2013-05-09  6:21     ` Shahed Shaikh
2013-05-07 19:55 ` [PATCH net 6/8] qlcnic: Fix bug in diagnostics test reset recovery path Shahed Shaikh
2013-05-07 19:55 ` [PATCH net 7/8] qlcnic: Fix mailbox response handling Shahed Shaikh
2013-05-07 19:55 ` [PATCH net 8/8] qlcnic: Fix validation of link event command Shahed Shaikh

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=20130508.120658.318501645917412400.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=Dept_NX_Linux_NIC_Driver@qlogic.com \
    --cc=netdev@vger.kernel.org \
    --cc=shahed.shaikh@qlogic.com \
    --cc=sony.chacko@qlogic.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).