aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-09-28 18:32:29 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-09-28 18:32:29 -0400
commitf100353ff5bfd83be00ae55e98b4d611d2eb5681 (patch)
tree95c46d1793231b9046676d19cff8b03d13e01eb5 /drivers
parent46d5c95b135f73051df7bc001e2d5c8e77e54cd6 (diff)
parentf4ec7f98714c2c0b7afa422c0cba6fb5c875c2c2 (diff)
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: e1000: Add device IDs of blade version of the 82571 quad port sky2: fix transmit state on resume sky2: FE+ vlan workaround sky2: sky2 FE+ receive status workaround
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/e1000/e1000_ethtool.c1
-rw-r--r--drivers/net/e1000/e1000_hw.c1
-rw-r--r--drivers/net/e1000/e1000_hw.h1
-rw-r--r--drivers/net/e1000/e1000_main.c2
-rw-r--r--drivers/net/sky2.c53
5 files changed, 44 insertions, 14 deletions
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c
index 4c3785c9d4b8..9ecc3adcf6c1 100644
--- a/drivers/net/e1000/e1000_ethtool.c
+++ b/drivers/net/e1000/e1000_ethtool.c
@@ -1726,6 +1726,7 @@ static int e1000_wol_exclusion(struct e1000_adapter *adapter, struct ethtool_wol
1726 case E1000_DEV_ID_82571EB_QUAD_COPPER: 1726 case E1000_DEV_ID_82571EB_QUAD_COPPER:
1727 case E1000_DEV_ID_82571EB_QUAD_FIBER: 1727 case E1000_DEV_ID_82571EB_QUAD_FIBER:
1728 case E1000_DEV_ID_82571EB_QUAD_COPPER_LOWPROFILE: 1728 case E1000_DEV_ID_82571EB_QUAD_COPPER_LOWPROFILE:
1729 case E1000_DEV_ID_82571PT_QUAD_COPPER:
1729 case E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3: 1730 case E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3:
1730 /* quad port adapters only support WoL on port A */ 1731 /* quad port adapters only support WoL on port A */
1731 if (!adapter->quad_port_a) { 1732 if (!adapter->quad_port_a) {
diff --git a/drivers/net/e1000/e1000_hw.c b/drivers/net/e1000/e1000_hw.c
index ba120f7fb0be..8604adbe351c 100644
--- a/drivers/net/e1000/e1000_hw.c
+++ b/drivers/net/e1000/e1000_hw.c
@@ -387,6 +387,7 @@ e1000_set_mac_type(struct e1000_hw *hw)
387 case E1000_DEV_ID_82571EB_SERDES_DUAL: 387 case E1000_DEV_ID_82571EB_SERDES_DUAL:
388 case E1000_DEV_ID_82571EB_SERDES_QUAD: 388 case E1000_DEV_ID_82571EB_SERDES_QUAD:
389 case E1000_DEV_ID_82571EB_QUAD_COPPER: 389 case E1000_DEV_ID_82571EB_QUAD_COPPER:
390 case E1000_DEV_ID_82571PT_QUAD_COPPER:
390 case E1000_DEV_ID_82571EB_QUAD_FIBER: 391 case E1000_DEV_ID_82571EB_QUAD_FIBER:
391 case E1000_DEV_ID_82571EB_QUAD_COPPER_LOWPROFILE: 392 case E1000_DEV_ID_82571EB_QUAD_COPPER_LOWPROFILE:
392 hw->mac_type = e1000_82571; 393 hw->mac_type = e1000_82571;
diff --git a/drivers/net/e1000/e1000_hw.h b/drivers/net/e1000/e1000_hw.h
index fe8714655c90..07f0ea73676e 100644
--- a/drivers/net/e1000/e1000_hw.h
+++ b/drivers/net/e1000/e1000_hw.h
@@ -475,6 +475,7 @@ int32_t e1000_check_phy_reset_block(struct e1000_hw *hw);
475#define E1000_DEV_ID_82571EB_FIBER 0x105F 475#define E1000_DEV_ID_82571EB_FIBER 0x105F
476#define E1000_DEV_ID_82571EB_SERDES 0x1060 476#define E1000_DEV_ID_82571EB_SERDES 0x1060
477#define E1000_DEV_ID_82571EB_QUAD_COPPER 0x10A4 477#define E1000_DEV_ID_82571EB_QUAD_COPPER 0x10A4
478#define E1000_DEV_ID_82571PT_QUAD_COPPER 0x10D5
478#define E1000_DEV_ID_82571EB_QUAD_FIBER 0x10A5 479#define E1000_DEV_ID_82571EB_QUAD_FIBER 0x10A5
479#define E1000_DEV_ID_82571EB_QUAD_COPPER_LOWPROFILE 0x10BC 480#define E1000_DEV_ID_82571EB_QUAD_COPPER_LOWPROFILE 0x10BC
480#define E1000_DEV_ID_82571EB_SERDES_DUAL 0x10D9 481#define E1000_DEV_ID_82571EB_SERDES_DUAL 0x10D9
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 4a225950fb43..e7c8951f47fa 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -108,6 +108,7 @@ static struct pci_device_id e1000_pci_tbl[] = {
108 INTEL_E1000_ETHERNET_DEVICE(0x10BC), 108 INTEL_E1000_ETHERNET_DEVICE(0x10BC),
109 INTEL_E1000_ETHERNET_DEVICE(0x10C4), 109 INTEL_E1000_ETHERNET_DEVICE(0x10C4),
110 INTEL_E1000_ETHERNET_DEVICE(0x10C5), 110 INTEL_E1000_ETHERNET_DEVICE(0x10C5),
111 INTEL_E1000_ETHERNET_DEVICE(0x10D5),
111 INTEL_E1000_ETHERNET_DEVICE(0x10D9), 112 INTEL_E1000_ETHERNET_DEVICE(0x10D9),
112 INTEL_E1000_ETHERNET_DEVICE(0x10DA), 113 INTEL_E1000_ETHERNET_DEVICE(0x10DA),
113 /* required last entry */ 114 /* required last entry */
@@ -1101,6 +1102,7 @@ e1000_probe(struct pci_dev *pdev,
1101 case E1000_DEV_ID_82571EB_QUAD_COPPER: 1102 case E1000_DEV_ID_82571EB_QUAD_COPPER:
1102 case E1000_DEV_ID_82571EB_QUAD_FIBER: 1103 case E1000_DEV_ID_82571EB_QUAD_FIBER:
1103 case E1000_DEV_ID_82571EB_QUAD_COPPER_LOWPROFILE: 1104 case E1000_DEV_ID_82571EB_QUAD_COPPER_LOWPROFILE:
1105 case E1000_DEV_ID_82571PT_QUAD_COPPER:
1104 /* if quad port adapter, disable WoL on all but port A */ 1106 /* if quad port adapter, disable WoL on all but port A */
1105 if (global_quad_port_a != 0) 1107 if (global_quad_port_a != 0)
1106 adapter->eeprom_wol = 0; 1108 adapter->eeprom_wol = 0;
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 0792031a5cf9..162489b9f599 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -910,6 +910,20 @@ static inline struct sky2_tx_le *get_tx_le(struct sky2_port *sky2)
910 return le; 910 return le;
911} 911}
912 912
913static void tx_init(struct sky2_port *sky2)
914{
915 struct sky2_tx_le *le;
916
917 sky2->tx_prod = sky2->tx_cons = 0;
918 sky2->tx_tcpsum = 0;
919 sky2->tx_last_mss = 0;
920
921 le = get_tx_le(sky2);
922 le->addr = 0;
923 le->opcode = OP_ADDR64 | HW_OWNER;
924 sky2->tx_addr64 = 0;
925}
926
913static inline struct tx_ring_info *tx_le_re(struct sky2_port *sky2, 927static inline struct tx_ring_info *tx_le_re(struct sky2_port *sky2,
914 struct sky2_tx_le *le) 928 struct sky2_tx_le *le)
915{ 929{
@@ -1320,7 +1334,8 @@ static int sky2_up(struct net_device *dev)
1320 GFP_KERNEL); 1334 GFP_KERNEL);
1321 if (!sky2->tx_ring) 1335 if (!sky2->tx_ring)
1322 goto err_out; 1336 goto err_out;
1323 sky2->tx_prod = sky2->tx_cons = 0; 1337
1338 tx_init(sky2);
1324 1339
1325 sky2->rx_le = pci_alloc_consistent(hw->pdev, RX_LE_BYTES, 1340 sky2->rx_le = pci_alloc_consistent(hw->pdev, RX_LE_BYTES,
1326 &sky2->rx_le_map); 1341 &sky2->rx_le_map);
@@ -2148,6 +2163,18 @@ static struct sk_buff *sky2_receive(struct net_device *dev,
2148 sky2->rx_next = (sky2->rx_next + 1) % sky2->rx_pending; 2163 sky2->rx_next = (sky2->rx_next + 1) % sky2->rx_pending;
2149 prefetch(sky2->rx_ring + sky2->rx_next); 2164 prefetch(sky2->rx_ring + sky2->rx_next);
2150 2165
2166 if (length < ETH_ZLEN || length > sky2->rx_data_size)
2167 goto len_error;
2168
2169 /* This chip has hardware problems that generates bogus status.
2170 * So do only marginal checking and expect higher level protocols
2171 * to handle crap frames.
2172 */
2173 if (sky2->hw->chip_id == CHIP_ID_YUKON_FE_P &&
2174 sky2->hw->chip_rev == CHIP_REV_YU_FE2_A0 &&
2175 length != count)
2176 goto okay;
2177
2151 if (status & GMR_FS_ANY_ERR) 2178 if (status & GMR_FS_ANY_ERR)
2152 goto error; 2179 goto error;
2153 2180
@@ -2156,8 +2183,9 @@ static struct sk_buff *sky2_receive(struct net_device *dev,
2156 2183
2157 /* if length reported by DMA does not match PHY, packet was truncated */ 2184 /* if length reported by DMA does not match PHY, packet was truncated */
2158 if (length != count) 2185 if (length != count)
2159 goto len_mismatch; 2186 goto len_error;
2160 2187
2188okay:
2161 if (length < copybreak) 2189 if (length < copybreak)
2162 skb = receive_copy(sky2, re, length); 2190 skb = receive_copy(sky2, re, length);
2163 else 2191 else
@@ -2167,13 +2195,13 @@ resubmit:
2167 2195
2168 return skb; 2196 return skb;
2169 2197
2170len_mismatch: 2198len_error:
2171 /* Truncation of overlength packets 2199 /* Truncation of overlength packets
2172 causes PHY length to not match MAC length */ 2200 causes PHY length to not match MAC length */
2173 ++sky2->net_stats.rx_length_errors; 2201 ++sky2->net_stats.rx_length_errors;
2174 if (netif_msg_rx_err(sky2) && net_ratelimit()) 2202 if (netif_msg_rx_err(sky2) && net_ratelimit())
2175 pr_info(PFX "%s: rx length mismatch: length %d status %#x\n", 2203 pr_info(PFX "%s: rx length error: status %#x length %d\n",
2176 dev->name, length, status); 2204 dev->name, status, length);
2177 goto resubmit; 2205 goto resubmit;
2178 2206
2179error: 2207error:
@@ -3934,13 +3962,6 @@ static __devinit struct net_device *sky2_init_netdev(struct sky2_hw *hw,
3934 sky2->hw = hw; 3962 sky2->hw = hw;
3935 sky2->msg_enable = netif_msg_init(debug, default_msg); 3963 sky2->msg_enable = netif_msg_init(debug, default_msg);
3936 3964
3937 /* This chip has hardware problems that generates
3938 * bogus PHY receive status so by default shut up the message.
3939 */
3940 if (hw->chip_id == CHIP_ID_YUKON_FE_P &&
3941 hw->chip_rev == CHIP_REV_YU_FE2_A0)
3942 sky2->msg_enable &= ~NETIF_MSG_RX_ERR;
3943
3944 /* Auto speed and flow control */ 3965 /* Auto speed and flow control */
3945 sky2->autoneg = AUTONEG_ENABLE; 3966 sky2->autoneg = AUTONEG_ENABLE;
3946 sky2->flow_mode = FC_BOTH; 3967 sky2->flow_mode = FC_BOTH;
@@ -3964,8 +3985,12 @@ static __devinit struct net_device *sky2_init_netdev(struct sky2_hw *hw,
3964 dev->features |= NETIF_F_HIGHDMA; 3985 dev->features |= NETIF_F_HIGHDMA;
3965 3986
3966#ifdef SKY2_VLAN_TAG_USED 3987#ifdef SKY2_VLAN_TAG_USED
3967 dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; 3988 /* The workaround for FE+ status conflicts with VLAN tag detection. */
3968 dev->vlan_rx_register = sky2_vlan_rx_register; 3989 if (!(sky2->hw->chip_id == CHIP_ID_YUKON_FE_P &&
3990 sky2->hw->chip_rev == CHIP_REV_YU_FE2_A0)) {
3991 dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
3992 dev->vlan_rx_register = sky2_vlan_rx_register;
3993 }
3969#endif 3994#endif
3970 3995
3971 /* read the mac address */ 3996 /* read the mac address */