Commit 62e3d2b6 authored by Scott Feldman's avatar Scott Feldman Committed by Stephen Hemminger

[e1000] new 82541/5/6/7 hardware support

* Added 82545 (rev3), 82546 (rev3), and 82541/7 (rev2) support
	- new device IDs
	- internal SERDES support for 82545/6 (rev3)
	- don't apply MMRBC workaround for 82545/6 (rev3)
	- don't use IO mapping for reset for 82545/6 (rev3)
parent 6cc43e74
...@@ -958,9 +958,13 @@ e1000_set_phy_loopback(struct e1000_adapter *adapter) ...@@ -958,9 +958,13 @@ e1000_set_phy_loopback(struct e1000_adapter *adapter)
case e1000_82544: case e1000_82544:
case e1000_82540: case e1000_82540:
case e1000_82545: case e1000_82545:
case e1000_82545_rev_3:
case e1000_82546: case e1000_82546:
case e1000_82546_rev_3:
case e1000_82541: case e1000_82541:
case e1000_82541_rev_2:
case e1000_82547: case e1000_82547:
case e1000_82547_rev_2:
return e1000_integrated_phy_loopback(adapter); return e1000_integrated_phy_loopback(adapter);
break; break;
...@@ -983,9 +987,12 @@ e1000_setup_loopback_test(struct e1000_adapter *adapter) ...@@ -983,9 +987,12 @@ e1000_setup_loopback_test(struct e1000_adapter *adapter)
{ {
uint32_t rctl; uint32_t rctl;
if(adapter->hw.media_type == e1000_media_type_fiber) { if(adapter->hw.media_type == e1000_media_type_fiber ||
adapter->hw.media_type == e1000_media_type_internal_serdes) {
if(adapter->hw.mac_type == e1000_82545 || if(adapter->hw.mac_type == e1000_82545 ||
adapter->hw.mac_type == e1000_82546) adapter->hw.mac_type == e1000_82546 ||
adapter->hw.mac_type == e1000_82545_rev_3 ||
adapter->hw.mac_type == e1000_82546_rev_3)
return e1000_set_phy_loopback(adapter); return e1000_set_phy_loopback(adapter);
else { else {
rctl = E1000_READ_REG(&adapter->hw, RCTL); rctl = E1000_READ_REG(&adapter->hw, RCTL);
...@@ -1010,9 +1017,12 @@ e1000_loopback_cleanup(struct e1000_adapter *adapter) ...@@ -1010,9 +1017,12 @@ e1000_loopback_cleanup(struct e1000_adapter *adapter)
E1000_WRITE_REG(&adapter->hw, RCTL, rctl); E1000_WRITE_REG(&adapter->hw, RCTL, rctl);
if(adapter->hw.media_type == e1000_media_type_copper || if(adapter->hw.media_type == e1000_media_type_copper ||
(adapter->hw.media_type == e1000_media_type_fiber && ((adapter->hw.media_type == e1000_media_type_fiber ||
adapter->hw.media_type == e1000_media_type_internal_serdes) &&
(adapter->hw.mac_type == e1000_82545 || (adapter->hw.mac_type == e1000_82545 ||
adapter->hw.mac_type == e1000_82546))) { adapter->hw.mac_type == e1000_82546 ||
adapter->hw.mac_type == e1000_82545_rev_3 ||
adapter->hw.mac_type == e1000_82546_rev_3))) {
adapter->hw.autoneg = TRUE; adapter->hw.autoneg = TRUE;
e1000_read_phy_reg(&adapter->hw, PHY_CTRL, &phy_reg); e1000_read_phy_reg(&adapter->hw, PHY_CTRL, &phy_reg);
if(phy_reg & MII_CR_LOOPBACK) { if(phy_reg & MII_CR_LOOPBACK) {
...@@ -1162,6 +1172,7 @@ e1000_ethtool_gwol(struct e1000_adapter *adapter, struct ethtool_wolinfo *wol) ...@@ -1162,6 +1172,7 @@ e1000_ethtool_gwol(struct e1000_adapter *adapter, struct ethtool_wolinfo *wol)
return; return;
case E1000_DEV_ID_82546EB_FIBER: case E1000_DEV_ID_82546EB_FIBER:
case E1000_DEV_ID_82546GB_FIBER:
/* Wake events only supported on port A for dual fiber */ /* Wake events only supported on port A for dual fiber */
if(E1000_READ_REG(hw, STATUS) & E1000_STATUS_FUNC_1) { if(E1000_READ_REG(hw, STATUS) & E1000_STATUS_FUNC_1) {
wol->supported = 0; wol->supported = 0;
...@@ -1200,6 +1211,7 @@ e1000_ethtool_swol(struct e1000_adapter *adapter, struct ethtool_wolinfo *wol) ...@@ -1200,6 +1211,7 @@ e1000_ethtool_swol(struct e1000_adapter *adapter, struct ethtool_wolinfo *wol)
return wol->wolopts ? -EOPNOTSUPP : 0; return wol->wolopts ? -EOPNOTSUPP : 0;
case E1000_DEV_ID_82546EB_FIBER: case E1000_DEV_ID_82546EB_FIBER:
case E1000_DEV_ID_82546GB_FIBER:
/* Wake events only supported on port A for dual fiber */ /* Wake events only supported on port A for dual fiber */
if(E1000_READ_REG(hw, STATUS) & E1000_STATUS_FUNC_1) if(E1000_READ_REG(hw, STATUS) & E1000_STATUS_FUNC_1)
return wol->wolopts ? -EOPNOTSUPP : 0; return wol->wolopts ? -EOPNOTSUPP : 0;
......
This diff is collapsed.
This diff is collapsed.
...@@ -71,15 +71,28 @@ static struct pci_device_id e1000_pci_tbl[] = { ...@@ -71,15 +71,28 @@ static struct pci_device_id e1000_pci_tbl[] = {
{0x8086, 0x100D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {0x8086, 0x100D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{0x8086, 0x100E, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {0x8086, 0x100E, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{0x8086, 0x100F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {0x8086, 0x100F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{0x8086, 0x1011, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{0x8086, 0x1010, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {0x8086, 0x1010, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{0x8086, 0x1011, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{0x8086, 0x1012, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {0x8086, 0x1012, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{0x8086, 0x1013, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{0x8086, 0x1014, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{0x8086, 0x1015, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{0x8086, 0x1016, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {0x8086, 0x1016, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{0x8086, 0x1017, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {0x8086, 0x1017, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{0x8086, 0x101E, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {0x8086, 0x1018, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{0x8086, 0x101D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{0x8086, 0x1013, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{0x8086, 0x1019, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {0x8086, 0x1019, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{0x8086, 0x101D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{0x8086, 0x101E, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{0x8086, 0x1026, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{0x8086, 0x1027, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{0x8086, 0x1028, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{0x8086, 0x1075, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{0x8086, 0x1076, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{0x8086, 0x1077, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{0x8086, 0x1078, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{0x8086, 0x1079, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{0x8086, 0x107A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{0x8086, 0x107B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
/* required last entry */ /* required last entry */
{0,} {0,}
}; };
...@@ -426,6 +439,11 @@ e1000_probe(struct pci_dev *pdev, ...@@ -426,6 +439,11 @@ e1000_probe(struct pci_dev *pdev,
if(pci_using_dac) if(pci_using_dac)
netdev->features |= NETIF_F_HIGHDMA; netdev->features |= NETIF_F_HIGHDMA;
/* before reading the EEPROM, reset the controller to
* put the device in a known good starting state */
e1000_reset_hw(&adapter->hw);
/* make sure the EEPROM is good */ /* make sure the EEPROM is good */
if(e1000_validate_eeprom_checksum(&adapter->hw) < 0) { if(e1000_validate_eeprom_checksum(&adapter->hw) < 0) {
...@@ -584,7 +602,10 @@ e1000_sw_init(struct e1000_adapter *adapter) ...@@ -584,7 +602,10 @@ e1000_sw_init(struct e1000_adapter *adapter)
hw->fc_pause_time = E1000_FC_PAUSE_TIME; hw->fc_pause_time = E1000_FC_PAUSE_TIME;
hw->fc_send_xon = 1; hw->fc_send_xon = 1;
if((hw->mac_type == e1000_82541) || (hw->mac_type == e1000_82547)) if((hw->mac_type == e1000_82541) ||
(hw->mac_type == e1000_82547) ||
(hw->mac_type == e1000_82541_rev_2) ||
(hw->mac_type == e1000_82547_rev_2))
hw->phy_init_script = 1; hw->phy_init_script = 1;
/* Media type - copper or fiber */ /* Media type - copper or fiber */
...@@ -763,7 +784,8 @@ e1000_configure_tx(struct e1000_adapter *adapter) ...@@ -763,7 +784,8 @@ e1000_configure_tx(struct e1000_adapter *adapter)
tipg |= DEFAULT_82542_TIPG_IPGR2 << E1000_TIPG_IPGR2_SHIFT; tipg |= DEFAULT_82542_TIPG_IPGR2 << E1000_TIPG_IPGR2_SHIFT;
break; break;
default: default:
if(adapter->hw.media_type == e1000_media_type_fiber) if(adapter->hw.media_type == e1000_media_type_fiber ||
adapter->hw.media_type == e1000_media_type_internal_serdes)
tipg = DEFAULT_82543_TIPG_IPGT_FIBER; tipg = DEFAULT_82543_TIPG_IPGT_FIBER;
else else
tipg = DEFAULT_82543_TIPG_IPGT_COPPER; tipg = DEFAULT_82543_TIPG_IPGT_COPPER;
...@@ -2387,7 +2409,7 @@ e1000_mii_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) ...@@ -2387,7 +2409,7 @@ e1000_mii_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd)
uint16_t mii_reg; uint16_t mii_reg;
uint16_t spddplx; uint16_t spddplx;
if(adapter->hw.media_type == e1000_media_type_fiber) if(adapter->hw.media_type != e1000_media_type_copper)
return -EOPNOTSUPP; return -EOPNOTSUPP;
switch (cmd) { switch (cmd) {
...@@ -2706,7 +2728,8 @@ e1000_suspend(struct pci_dev *pdev, uint32_t state) ...@@ -2706,7 +2728,8 @@ e1000_suspend(struct pci_dev *pdev, uint32_t state)
E1000_WRITE_REG(&adapter->hw, CTRL, ctrl); E1000_WRITE_REG(&adapter->hw, CTRL, ctrl);
} }
if(adapter->hw.media_type == e1000_media_type_fiber) { if(adapter->hw.media_type == e1000_media_type_fiber ||
adapter->hw.media_type == e1000_media_type_internal_serdes) {
/* keep the laser running in D3 */ /* keep the laser running in D3 */
ctrl_ext = E1000_READ_REG(&adapter->hw, CTRL_EXT); ctrl_ext = E1000_READ_REG(&adapter->hw, CTRL_EXT);
ctrl_ext |= E1000_CTRL_EXT_SDP7_DATA; ctrl_ext |= E1000_CTRL_EXT_SDP7_DATA;
......
...@@ -458,6 +458,7 @@ e1000_check_options(struct e1000_adapter *adapter) ...@@ -458,6 +458,7 @@ e1000_check_options(struct e1000_adapter *adapter)
switch(adapter->hw.media_type) { switch(adapter->hw.media_type) {
case e1000_media_type_fiber: case e1000_media_type_fiber:
case e1000_media_type_internal_serdes:
e1000_check_fiber_options(adapter); e1000_check_fiber_options(adapter);
break; break;
case e1000_media_type_copper: case e1000_media_type_copper:
......
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