netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: nsujir@broadcom.com
Cc: netdev@vger.kernel.org, hirofumi@mail.parknet.co.jp,
	stable@vger.kernel.org, mchan@broadcom.com
Subject: Re: [PATCH net] tg3: Update link_up flag for phylib devices
Date: Fri, 08 Mar 2013 13:15:42 -0500 (EST)	[thread overview]
Message-ID: <20130308.131542.1894554320106573944.davem@davemloft.net> (raw)
In-Reply-To: <1362765684-5265-1-git-send-email-nsujir@broadcom.com>

From: "Nithin Nayak Sujir" <nsujir@broadcom.com>
Date: Fri, 8 Mar 2013 10:01:24 -0800

> Commit f4a46d1f46a8fece34edd2023e054072b02e110d introduced a bug where
> the ifconfig stats would remain 0 for phylib devices. This is due to
> tp->link_up flag never becoming true causing tg3_periodic_fetch_stats()
> to return.
> 
> The link_up flag was being updated in tg3_test_and_report_link_chg()
> after setting up the phy. This function however, is not called for
> phylib devices since the driver does not do the phy setup.
> 
> This patch moves the link_up flag update into the common
> tg3_link_report() function that gets called for phylib devices as well
> for non phylib devices when the link state changes.
> 
> To avoid updating link_up twice, we replace tg3_carrier_...() calls that
> are followed by tg3_link_report(), with netif_carrier_...(). We can then
> remove the unused tg3_carrier_on() function.
> 
> CC: <stable@vger.kernel.org>
> Reported-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
> Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com>
> Signed-off-by: Michael Chan <mchan@broadcom.com>

Applied, thanks.

      reply	other threads:[~2013-03-08 18:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-08 18:01 [PATCH net] tg3: Update link_up flag for phylib devices Nithin Nayak Sujir
2013-03-08 18:15 ` David Miller [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=20130308.131542.1894554320106573944.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=mchan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=nsujir@broadcom.com \
    --cc=stable@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).