alistair23-linux/drivers/net/ethernet/broadcom
Nithin Sujir 84421b99ce tg3: Update link_up flag for phylib devices
Commit f4a46d1f46 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>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-03-08 13:14:58 -05:00
..
bnx2x bnx2x: Fix SFP+ misconfiguration in iSCSI boot scenario 2013-03-08 00:35:44 -05:00
b44.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into mips-for-linux-next 2013-02-22 10:07:30 +01:00
b44.h b44: add 64 bit stats 2012-07-18 09:29:43 -07:00
bcm63xx_enet.c ethernet: Remove unnecessary alloc/OOM messages, alloc cleanups 2013-02-04 13:22:33 -05:00
bcm63xx_enet.h MIPS: BCM63XX: Move DMA descriptor definition into common header file 2012-08-30 20:15:52 +02:00
bgmac.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-03-05 18:42:29 -08:00
bgmac.h bgmac: return error on failed PHY write 2013-02-13 13:58:18 -05:00
bnx2.c remove init of dev->perm_addr in drivers 2013-01-08 18:00:48 -08:00
bnx2.h cnic, bnx2x, bnx2: Simplify cnic probing. 2012-12-07 12:44:02 -05:00
bnx2_fw.h
cnic.c ethernet: Remove unnecessary alloc/OOM messages, alloc cleanups 2013-02-04 13:22:33 -05:00
cnic.h cnic: Include bnx2x.h 2012-12-07 12:44:02 -05:00
cnic_defs.h bnx2x,cnic: use FW 7.8.2 2012-10-01 16:43:17 -04:00
cnic_if.h cnic, bnx2x: Add CNIC_DRV_STATE_HANDLES_IRQ to ethdev->drv_state 2013-01-23 13:58:29 -05:00
Kconfig bgmac: driver for GBit MAC core on BCMA bus 2013-01-09 23:37:03 -08:00
Makefile bgmac: driver for GBit MAC core on BCMA bus 2013-01-09 23:37:03 -08:00
sb1250-mac.c net: phy: remove flags argument from phy_{attach, connect, connect_direct} 2013-01-14 15:11:50 -05:00
tg3.c tg3: Update link_up flag for phylib devices 2013-03-08 13:14:58 -05:00
tg3.h tg3: Use different macros for pci_chip_rev_id accesses 2013-02-18 12:45:53 -05:00