Commit 2d8a9d3f authored by Jeff Garzik's avatar Jeff Garzik

Merge new tg3 version 0.96 gigabit ethernet driver.

parent ae0f9f56
Documents about softnet driver issues in general can be found
at:
http://www.firstfloor.org/~andi/softnet/
Transmit path guidelines:
1) The hard_start_xmit method must never return '1' under any
normal circumstances. It is considered a hard error unless
there is no way your device can tell ahead of time when it's
transmit function will become busy.
Instead it must maintain the queue properly. For example,
for a driver implementing scatter-gather this means:
static int drv_hard_start_xmit(struct sk_buff *skb,
struct net_device *dev)
{
struct drv *dp = dev->priv;
lock_tx(dp);
...
/* This is a hard error log it. */
if (TX_BUFFS_AVAIL(dp) <= (skb_shinfo(skb)->nr_frags + 1)) {
netif_stop_queue(dev);
unlock_tx(dp);
printk(KERN_ERR PFX "%s: BUG! Tx Ring full when queue awake!\n",
dev->name);
return 1;
}
... queue packet to card ...
... update tx consumer index ...
if (TX_BUFFS_AVAIL(dp) <= (MAX_SKB_FRAGS + 1))
netif_stop_queue(dev);
...
unlock_tx(dp);
...
}
And then at the end of your TX reclaimation event handling:
if (netif_queue_stopped(dp->dev) &&
TX_BUFFS_AVAIL(dp) > (MAX_SKB_FRAGS + 1))
netif_wake_queue(dp->dev);
For a non-scatter-gather supporting card, the three tests simply become:
/* This is a hard error log it. */
if (TX_BUFFS_AVAIL(dp) <= 0)
and:
if (TX_BUFFS_AVAIL(dp) == 0)
and:
if (netif_queue_stopped(dp->dev) &&
TX_BUFFS_AVAIL(dp) > 0)
netif_wake_queue(dp->dev);
2) Do not forget to update netdev->trans_start to jiffies after
each new tx packet is given to the hardware.
3) Do not forget that once you return 0 from your hard_start_xmit
method, it is your driver's responsibility to free up the SKB
and in some finite amount of time.
For example, this means that it is not allowed for your TX
mitigation scheme to let TX packets "hang out" in the TX
ring unreclaimed forever if no new TX packets are sent.
This error can deadlock sockets waiting for send buffer room
to be freed up.
If you return 1 from the hard_start_xmit method, you must not keep
any reference to that SKB and you must not attempt to free it up.
Probing guidelines:
1) Any hardware layer address you obtain for your device should
be verified. For example, for ethernet check it with
linux/etherdevice.h:is_valid_ether_addr()
......@@ -797,6 +797,14 @@ CONFIG_SUNGEM
Support for the Sun GEM chip, aka Sun GigabitEthernet/P 2.0. See also
<http://www.sun.com/products-n-solutions/hardware/docs/pdf/806-3985-10.pdf>.
CONFIG_TIGON3
This driver supports Broadcom Tigon3 based gigabit Ethernet cards.
If you want to compile this driver as a module ( = code which can be
inserted in and removed from the running kernel whenever you want),
say M here and read <file:Documentation/modules.txt>. This is
recommended. The module will be called tg3.o.
CONFIG_MYRI_SBUS
This driver supports MyriCOM Sbus gigabit Ethernet cards.
......
......@@ -237,6 +237,7 @@ dep_tristate 'National Semiconduct DP83820 support' CONFIG_NS83820 $CONFIG_PCI
dep_tristate 'Packet Engines Hamachi GNIC-II support' CONFIG_HAMACHI $CONFIG_PCI
dep_tristate 'Packet Engines Yellowfin Gigabit-NIC support (EXPERIMENTAL)' CONFIG_YELLOWFIN $CONFIG_PCI $CONFIG_EXPERIMENTAL
dep_tristate 'SysKonnect SK-98xx support' CONFIG_SK98LIN $CONFIG_PCI
dep_tristate 'Broadcom Tigon3 support' CONFIG_TIGON3 $CONFIG_PCI
endmenu
......
......@@ -82,6 +82,7 @@ obj-$(CONFIG_NATSEMI) += natsemi.o
obj-$(CONFIG_NS83820) += ns83820.o
obj-$(CONFIG_STNIC) += stnic.o 8390.o
obj-$(CONFIG_FEALNX) += fealnx.o mii.o
obj-$(CONFIG_TIGON3) += tg3.o
ifeq ($(CONFIG_SK98LIN),y)
obj-y += sk98lin/sk98lin.o
......
This diff is collapsed.
This diff is collapsed.
......@@ -4183,12 +4183,18 @@
14e3 AMTELCO
14e4 BROADCOM Corporation
1644 NetXtreme BCM5700 Gigabit Ethernet
1014 0277 Broadcom Vigil B5700 1000Base-T
1028 00d1 Broadcom BCM5700
1028 0106 Broadcom BCM5700
1028 0109 Broadcom BCM5700
1028 010a Broadcom BCM5700
10b7 1000 3C996-T 1000BaseTX
10b7 1001 3C996B-T 1000BaseTX
10b7 1002 3C996C-T 1000BaseTX
10b7 1003 3C997-T 1000BaseTX
10b7 1004 3C996-SX 1000BaseSX
10b7 1005 3C997-SX 1000BaseSX
10b7 1008 3C942 Gigabit LOM (31X31)
14e4 0002 NetXtreme 1000BaseSX
14e4 0003 NetXtreme 1000BaseSX
14e4 0004 NetXtreme 1000BaseTX
......@@ -4197,6 +4203,7 @@
0e11 007c NC7770 1000BaseTX
0e11 007d NC6770 1000BaseSX
0e11 0085 NC7780 1000BaseTX
1028 0121 Broadcom BCM5701
10b7 1004 3C996-SX 1000BaseSX
10b7 1006 3C996B-T 1000BaseTX
10b7 1007 3C1000-T 1000BaseTX
......@@ -4207,7 +4214,16 @@
14e4 0007 NetXtreme BCM5701 1000BaseSX
14e4 0008 NetXtreme BCM5701 1000BaseTX
14e4 8008 NetXtreme BCM5701 1000BaseTX
1646 NetXtreme BCM5702 Gigabit Ethernet
14e4 8009 Broadcom BCM5702
1647 NetXtreme BCM5703 Gigabit Ethernet
0e11 009a NC7770
0e11 0099 NC7780
14e4 0009 Broadcom BCM5703
14e4 8009 Broadcom BCM5703
164d NetXtreme BCM5702FE Gigabit Ethernet
16a6 NetXtreme BCM5702X Gigabit Ethernet
16a7 NetXtreme BCM5703X Gigabit Ethernet
5820 BCM5820 Crypto Accelerator
14e5 Pixelfusion Ltd
14e6 SHINING Technology Inc
......@@ -4647,6 +4663,8 @@
0400 FarSync T2P (2 port X.21/V.35/V.24)
0440 FarSync T4P (4 port X.21/V.35/V.24)
1668 Action Tec Electronics Inc
173b Altima (nee BroadCom)
03e8 AC1000 Gigabit Ethernet
1813 Ambient Technologies Inc
1a08 Sierra semiconductor
0000 SC15064
......
......@@ -1494,7 +1494,11 @@
#define PCI_VENDOR_ID_BROADCOM 0x14e4
#define PCI_DEVICE_ID_TIGON3_5700 0x1644
#define PCI_DEVICE_ID_TIGON3_5701 0x1645
#define PCI_DEVICE_ID_TIGON3_5702 0x1646
#define PCI_DEVICE_ID_TIGON3_5703 0x1647
#define PCI_DEVICE_ID_TIGON3_5702FE 0x164d
#define PCI_DEVICE_ID_TIGON3_5702X 0x16a6
#define PCI_DEVICE_ID_TIGON3_5703X 0x16a7
#define PCI_VENDOR_ID_SYBA 0x1592
#define PCI_DEVICE_ID_SYBA_2P_EPP 0x0782
......@@ -1517,6 +1521,9 @@
#define PCI_DEVICE_ID_MACROLINK_MCCR8 0x2000
#define PCI_DEVICE_ID_MACROLINK_MCCR 0x2001
#define PCI_VENDOR_ID_ALTIMA 0x173b
#define PCI_DEVICE_ID_ALTIMA_AC1000 0x03e8
#define PCI_VENDOR_ID_SYMPHONY 0x1c1c
#define PCI_DEVICE_ID_SYMPHONY_101 0x0001
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment