diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/e1000/e1000.h | 1 | ||||
-rw-r--r-- | drivers/net/e1000/e1000_ethtool.c | 31 | ||||
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 10 |
3 files changed, 41 insertions, 1 deletions
diff --git a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h index 658f36ad8b4f..a18782748d5a 100644 --- a/drivers/net/e1000/e1000.h +++ b/drivers/net/e1000/e1000.h | |||
@@ -242,6 +242,7 @@ struct e1000_adapter { | |||
242 | uint32_t rx_buffer_len; | 242 | uint32_t rx_buffer_len; |
243 | uint32_t part_num; | 243 | uint32_t part_num; |
244 | uint32_t wol; | 244 | uint32_t wol; |
245 | uint32_t ksp3_port_a; | ||
245 | uint32_t smartspeed; | 246 | uint32_t smartspeed; |
246 | uint32_t en_mng_pt; | 247 | uint32_t en_mng_pt; |
247 | uint16_t link_speed; | 248 | uint16_t link_speed; |
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c index f7e81e96a191..f1b9cf4643c9 100644 --- a/drivers/net/e1000/e1000_ethtool.c +++ b/drivers/net/e1000/e1000_ethtool.c | |||
@@ -1632,10 +1632,26 @@ e1000_get_wol(struct net_device *netdev, struct ethtool_wolinfo *wol) | |||
1632 | case E1000_DEV_ID_82546EB_QUAD_COPPER: | 1632 | case E1000_DEV_ID_82546EB_QUAD_COPPER: |
1633 | case E1000_DEV_ID_82545EM_FIBER: | 1633 | case E1000_DEV_ID_82545EM_FIBER: |
1634 | case E1000_DEV_ID_82545EM_COPPER: | 1634 | case E1000_DEV_ID_82545EM_COPPER: |
1635 | case E1000_DEV_ID_82546GB_QUAD_COPPER: | ||
1635 | wol->supported = 0; | 1636 | wol->supported = 0; |
1636 | wol->wolopts = 0; | 1637 | wol->wolopts = 0; |
1637 | return; | 1638 | return; |
1638 | 1639 | ||
1640 | case E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3: | ||
1641 | /* device id 10B5 port-A supports wol */ | ||
1642 | if (!adapter->ksp3_port_a) { | ||
1643 | wol->supported = 0; | ||
1644 | return; | ||
1645 | } | ||
1646 | /* KSP3 does not suppport UCAST wake-ups for any interface */ | ||
1647 | wol->supported = WAKE_MCAST | WAKE_BCAST | WAKE_MAGIC; | ||
1648 | |||
1649 | if (adapter->wol & E1000_WUFC_EX) | ||
1650 | DPRINTK(DRV, ERR, "Interface does not support " | ||
1651 | "directed (unicast) frame wake-up packets\n"); | ||
1652 | wol->wolopts = 0; | ||
1653 | goto do_defaults; | ||
1654 | |||
1639 | case E1000_DEV_ID_82546EB_FIBER: | 1655 | case E1000_DEV_ID_82546EB_FIBER: |
1640 | case E1000_DEV_ID_82546GB_FIBER: | 1656 | case E1000_DEV_ID_82546GB_FIBER: |
1641 | case E1000_DEV_ID_82571EB_FIBER: | 1657 | case E1000_DEV_ID_82571EB_FIBER: |
@@ -1650,8 +1666,9 @@ e1000_get_wol(struct net_device *netdev, struct ethtool_wolinfo *wol) | |||
1650 | default: | 1666 | default: |
1651 | wol->supported = WAKE_UCAST | WAKE_MCAST | | 1667 | wol->supported = WAKE_UCAST | WAKE_MCAST | |
1652 | WAKE_BCAST | WAKE_MAGIC; | 1668 | WAKE_BCAST | WAKE_MAGIC; |
1653 | |||
1654 | wol->wolopts = 0; | 1669 | wol->wolopts = 0; |
1670 | |||
1671 | do_defaults: | ||
1655 | if (adapter->wol & E1000_WUFC_EX) | 1672 | if (adapter->wol & E1000_WUFC_EX) |
1656 | wol->wolopts |= WAKE_UCAST; | 1673 | wol->wolopts |= WAKE_UCAST; |
1657 | if (adapter->wol & E1000_WUFC_MC) | 1674 | if (adapter->wol & E1000_WUFC_MC) |
@@ -1676,10 +1693,22 @@ e1000_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol) | |||
1676 | case E1000_DEV_ID_82543GC_COPPER: | 1693 | case E1000_DEV_ID_82543GC_COPPER: |
1677 | case E1000_DEV_ID_82544EI_FIBER: | 1694 | case E1000_DEV_ID_82544EI_FIBER: |
1678 | case E1000_DEV_ID_82546EB_QUAD_COPPER: | 1695 | case E1000_DEV_ID_82546EB_QUAD_COPPER: |
1696 | case E1000_DEV_ID_82546GB_QUAD_COPPER: | ||
1679 | case E1000_DEV_ID_82545EM_FIBER: | 1697 | case E1000_DEV_ID_82545EM_FIBER: |
1680 | case E1000_DEV_ID_82545EM_COPPER: | 1698 | case E1000_DEV_ID_82545EM_COPPER: |
1681 | return wol->wolopts ? -EOPNOTSUPP : 0; | 1699 | return wol->wolopts ? -EOPNOTSUPP : 0; |
1682 | 1700 | ||
1701 | case E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3: | ||
1702 | /* device id 10B5 port-A supports wol */ | ||
1703 | if (!adapter->ksp3_port_a) | ||
1704 | return wol->wolopts ? -EOPNOTSUPP : 0; | ||
1705 | |||
1706 | if (wol->wolopts & WAKE_UCAST) { | ||
1707 | DPRINTK(DRV, ERR, "Interface does not support " | ||
1708 | "directed (unicast) frame wake-up packets\n"); | ||
1709 | return -EOPNOTSUPP; | ||
1710 | } | ||
1711 | |||
1683 | case E1000_DEV_ID_82546EB_FIBER: | 1712 | case E1000_DEV_ID_82546EB_FIBER: |
1684 | case E1000_DEV_ID_82546GB_FIBER: | 1713 | case E1000_DEV_ID_82546GB_FIBER: |
1685 | case E1000_DEV_ID_82571EB_FIBER: | 1714 | case E1000_DEV_ID_82571EB_FIBER: |
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index a525c95266f1..aad5373a8aeb 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -651,6 +651,7 @@ e1000_probe(struct pci_dev *pdev, | |||
651 | unsigned long mmio_start, mmio_len; | 651 | unsigned long mmio_start, mmio_len; |
652 | 652 | ||
653 | static int cards_found = 0; | 653 | static int cards_found = 0; |
654 | static int e1000_ksp3_port_a = 0; /* global ksp3 port a indication */ | ||
654 | int i, err, pci_using_dac; | 655 | int i, err, pci_using_dac; |
655 | uint16_t eeprom_data; | 656 | uint16_t eeprom_data; |
656 | uint16_t eeprom_apme_mask = E1000_EEPROM_APME; | 657 | uint16_t eeprom_apme_mask = E1000_EEPROM_APME; |
@@ -743,6 +744,15 @@ e1000_probe(struct pci_dev *pdev, | |||
743 | if ((err = e1000_check_phy_reset_block(&adapter->hw))) | 744 | if ((err = e1000_check_phy_reset_block(&adapter->hw))) |
744 | DPRINTK(PROBE, INFO, "PHY reset is blocked due to SOL/IDER session.\n"); | 745 | DPRINTK(PROBE, INFO, "PHY reset is blocked due to SOL/IDER session.\n"); |
745 | 746 | ||
747 | /* if ksp3, indicate if it's port a being setup */ | ||
748 | if (pdev->device == E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3 && | ||
749 | e1000_ksp3_port_a == 0) | ||
750 | adapter->ksp3_port_a = 1; | ||
751 | e1000_ksp3_port_a++; | ||
752 | /* Reset for multiple KP3 adapters */ | ||
753 | if (e1000_ksp3_port_a == 4) | ||
754 | e1000_ksp3_port_a = 0; | ||
755 | |||
746 | if (adapter->hw.mac_type >= e1000_82543) { | 756 | if (adapter->hw.mac_type >= e1000_82543) { |
747 | netdev->features = NETIF_F_SG | | 757 | netdev->features = NETIF_F_SG | |
748 | NETIF_F_HW_CSUM | | 758 | NETIF_F_HW_CSUM | |