aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/e1000e
AgeCommit message (Collapse)AuthorFilesLines
2014-12-30time: move the timecounter/cyclecounter code into its own file.Richard Cochran1-1/+1
The timecounter code has almost nothing to do with the clocksource code. Let it live in its own file. This will help isolate the timecounter users from the clocksource users in the source tree. Signed-off-by: Richard Cochran <[email protected]> Acked-by: Jeff Kirsher <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-12-11Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-nextLinus Torvalds1-13/+6
Pull networking updates from David Miller: 1) New offloading infrastructure and example 'rocker' driver for offloading of switching and routing to hardware. This work was done by a large group of dedicated individuals, not limited to: Scott Feldman, Jiri Pirko, Thomas Graf, John Fastabend, Jamal Hadi Salim, Andy Gospodarek, Florian Fainelli, Roopa Prabhu 2) Start making the networking operate on IOV iterators instead of modifying iov objects in-situ during transfers. Thanks to Al Viro and Herbert Xu. 3) A set of new netlink interfaces for the TIPC stack, from Richard Alpe. 4) Remove unnecessary looping during ipv6 routing lookups, from Martin KaFai Lau. 5) Add PAUSE frame generation support to gianfar driver, from Matei Pavaluca. 6) Allow for larger reordering levels in TCP, which are easily achievable in the real world right now, from Eric Dumazet. 7) Add a variable of napi_schedule that doesn't need to disable cpu interrupts, from Eric Dumazet. 8) Use a doubly linked list to optimize neigh_parms_release(), from Nicolas Dichtel. 9) Various enhancements to the kernel BPF verifier, and allow eBPF programs to actually be attached to sockets. From Alexei Starovoitov. 10) Support TSO/LSO in sunvnet driver, from David L Stevens. 11) Allow controlling ECN usage via routing metrics, from Florian Westphal. 12) Remote checksum offload, from Tom Herbert. 13) Add split-header receive, BQL, and xmit_more support to amd-xgbe driver, from Thomas Lendacky. 14) Add MPLS support to openvswitch, from Simon Horman. 15) Support wildcard tunnel endpoints in ipv6 tunnels, from Steffen Klassert. 16) Do gro flushes on a per-device basis using a timer, from Eric Dumazet. This tries to resolve the conflicting goals between the desired handling of bulk vs. RPC-like traffic. 17) Allow userspace to ask for the CPU upon what a packet was received/steered, via SO_INCOMING_CPU. From Eric Dumazet. 18) Limit GSO packets to half the current congestion window, from Eric Dumazet. 19) Add a generic helper so that all drivers set their RSS keys in a consistent way, from Eric Dumazet. 20) Add xmit_more support to enic driver, from Govindarajulu Varadarajan. 21) Add VLAN packet scheduler action, from Jiri Pirko. 22) Support configurable RSS hash functions via ethtool, from Eyal Perry. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1820 commits) Fix race condition between vxlan_sock_add and vxlan_sock_release net/macb: fix compilation warning for print_hex_dump() called with skb->mac_header net/mlx4: Add support for A0 steering net/mlx4: Refactor QUERY_PORT net/mlx4_core: Add explicit error message when rule doesn't meet configuration net/mlx4: Add A0 hybrid steering net/mlx4: Add mlx4_bitmap zone allocator net/mlx4: Add a check if there are too many reserved QPs net/mlx4: Change QP allocation scheme net/mlx4_core: Use tasklet for user-space CQ completion events net/mlx4_core: Mask out host side virtualization features for guests net/mlx4_en: Set csum level for encapsulated packets be2net: Export tunnel offloads only when a VxLAN tunnel is created gianfar: Fix dma check map error when DMA_API_DEBUG is enabled cxgb4/csiostor: Don't use MASTER_MUST for fw_hello call net: fec: only enable mdio interrupt before phy device link up net: fec: clear all interrupt events to support i.MX6SX net: fec: reset fep link status in suspend function net: sock: fix access via invalid file descriptor net: introduce helper macro for_each_cmsghdr ...
2014-12-10ethernet/intel: Use napi_alloc_skbAlexander Duyck1-1/+1
This change replaces calls to netdev_alloc_skb_ip_align with napi_alloc_skb. The advantage of napi_alloc_skb is currently the fact that the page allocation doesn't make use of any irq disable calls. There are few spots where I couldn't replace the calls as the buffer allocation routine is called as a part of init which is outside of the softirq context. Cc: Jeff Kirsher <[email protected]> Signed-off-by: Alexander Duyck <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-12-08ethernet/intel: Use eth_skb_pad and skb_put_padto helpersAlexander Duyck1-6/+2
Update the Intel Ethernet drivers to use eth_skb_pad() and skb_put_padto instead of doing their own implementations of the function. Also this cleans up two other spots where skb_pad was called but the length and tail pointers were being manipulated directly instead of just having the padding length added via __skb_put. Cc: Jeff Kirsher <[email protected]> Signed-off-by: Alexander Duyck <[email protected]> Acked-by: Jeff Kirsher <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-12-05e1000e / igb / PM: Eliminate CONFIG_PM_RUNTIMERafael J. Wysocki1-2/+0
After commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is selected) PM_RUNTIME is always set if PM is set, so #ifdef blocks depending on CONFIG_PM_RUNTIME within #ifdef blocks depending on CONFIG_PM may be dropped now. Do that in the e1000e and igb network drivers. Signed-off-by: Rafael J. Wysocki <[email protected]> Acked-by: Jeff Kirsher <[email protected]>
2014-11-16e100e: use netdev_rss_key_fill() helperEric Dumazet1-6/+3
Use of well known RSS key increases attack surface. Switch to a random one, using generic helper so that all ports share a common key. Signed-off-by: Eric Dumazet <[email protected]> Cc: Jeff Kirsher <[email protected]> Cc: Jesse Brandeburg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-08-25e1000e: Fix TSO with non-accelerated vlansVlad Yasevich1-12/+9
This device claims TSO support for vlans. It also allows a user to control vlan acceleration offloading. As such, it is possible to turn off vlan acceleration and configure a vlan which will continue to support TSO. In such situation the packet passed down the the device will contain a vlan header and skb->protocol will be set to ETH_P_8021Q. The device assumes that skb->protocol contains network protocol value and uses that value to set up TSO information. This results in corrupted frames sent on the wire. Corruptions include incorrect IP total length and invalid IP checksum. This patch extract the protocol value correctly and corrects TSO for non-accelerated traffic. CC: Jeff Kirsher <[email protected]> CC: Jesse Brandeburg <[email protected]> CC: Bruce Allan <[email protected]> CC: Carolyn Wyborny <[email protected]> CC: Don Skidmore <[email protected]> CC: Greg Rose <[email protected]> CC: Alex Duyck <[email protected]> CC: John Ronciak <[email protected]> CC: Mitch Williams <[email protected]> CC: Linux NICS <[email protected]> CC: [email protected] Signed-off-by: Vladislav Yasevich <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-08-12e1000e: delete excessive space character in debug messageJean Sacren1-1/+1
There is an excessive space character between the word and the period in the debug message. So delete it. Signed-off-by: Jean Sacren <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2014-08-12e1000e: fix trivial kernel doc typosJean Sacren1-1/+1
The macro E1000_success is meant to be E1000_SUCCESS. As the return statement in the function is good as is, let's simply correct the comment for this trivial matter. Additionally E1000_ERR_HOST_INTERFACE_COMMAND is supposed to be -E1000_ERR_HOST_INTERFACE_COMMAND. Signed-off-by: Jean Sacren <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2014-07-25e1000e: Fix Runtime PM blocks EEE link negotiation in S5David Ertman1-0/+26
Adding a function, and associated calls, to flush writes to (read) the LPIC MAC register before entering the shutdown flow. This fixes the problem of the PHY never negotiating a 100M link (if both sides of the link support EEE and 100M link) when Runtime PM is enabled. Signed-off-by: Dave Ertman <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2014-07-25e1000e: Fix EEE in S5 w/ Runtime PM enabledDavid Ertman1-1/+6
The process of shutting down the system causes a call to the close PM callback. The reset in close causes a loss of link, and the resultant LSC interrupt causes the Runtime PM idle callback to be called. The check for link (while link is down) in the idle callback is wiping the information about the EEE ability of the link partner. The information is still gone when the PHY is powered back up in the shutdown flow. This causes EEE in S5 to fail when Runtime PM is active. Save the link partner's EEE ability in the idle callback so that a Runtime PM event will not cause a loss of this information. Signed-off-by: Dave Ertman <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2014-07-25e1000e: Add support for EEE in Sx statesDavid Ertman2-2/+20
On I217 and newer hardware, EEE is enabled in the PHY by the software when link is up and disabled by the hardware when link is lost. To enable EEE in Sx (When both ends of the link support, and are enabled for, EEE and 100Mbps), we need to disable LPLU and configure the PHY to automatically enable EEE when link is up, since there will be no software to complete the task. To configure this in the PHY, the Auto Enable LPI bit in the Low Power Idle GPIO Control register must be set. For normal operation in S0, this bit must be cleared. Signed-off-by: Dave Ertman <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2014-07-25e1000e: Add code to check return values on NVM accessesDavid Ertman3-8/+23
Adding code to check and respond to previously ignored return values from NVM access functions. Issue discovered through static analysis. Signed-off-by: Dave Ertman <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2014-07-25e1000e: Fix CRC errors with jumbo trafficDavid Ertman2-1/+2
Modifying the jumbo frame workaround for 82579, i217 and i218 client parts to increase the gap between the read and write pointers in the Tx FIFO. Signed-off-by: Dave Ertman <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2014-07-20e1000e: remove unnecessary break after returnFabian Frederick4-8/+0
Signed-off-by: Fabian Frederick <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-06-06net: use SPEED_UNKNOWN and DUPLEX_UNKNOWN when appropriateJiri Pirko1-2/+2
Signed-off-by: Jiri Pirko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-05-27e1000e: Out of line __ew32_prepare/__ew32Andi Kleen2-29/+32
Out of lining these two common inlines saves about 30k text size, due to their errata workarounds. 14131431 2008136 1507328 17646895 10d452f vmlinux-before-e1000e 14101415 2004040 1507328 17612783 10cbfef vmlinux-e1000e Signed-off-by: Andi Kleen <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2014-05-27e1000e: Fix expand setting EEE link info to all affected partsDavid Ertman1-1/+1
Previously, the update_phy_task was only calling e1000_set_eee_pchlan() for phy.type 82579. This patch is to cause this function to be called for 82579 and newer phy.types. This causes the dev_spec->eee_lp_ability to have the correct value when going into SX states. Signed-off-by: Dave Ertman <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2014-05-27e1000e: Cleanup parenthesis around return valueDavid Ertman1-2/+2
Signed-off-by: Dave Ertman <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2014-05-27e1000e: 82574/82583 TimeSync errata for SYSTIM readTodd Fujinaka2-1/+28
Due to a synchronization error, the value read from SYSTIML/SYSTIMH might be incorrect. Signed-off-by: Todd Fujinaka <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2014-05-26e1000e: Failure to write SHRA turns on PROMISC modeDavid Ertman7-13/+71
Previously, the check to turn on promiscuous mode only took into account the total number of SHared Receive Address (SHRA) registers and if the request was for a register within that range. It is possible that the Management Engine might have locked a number of SHRA and not allowed a new address to be written to the requested register. Add a function to determine the number of unlocked SHRA registers. Then determine if the number of registers available is sufficient for our needs, if not then return -ENOMEM so that UNICAST PROMISC mode is activated. Since the method by which ME claims SHRA registers is non-deterministic, also add a return value to the function attempting to write an address to a SHRA, and return a -E1000_ERR_CONFIG if the write fails. The error will be passed up the function chain and allow the driver to also set UNICAST PROMISC when this happens. Cc: Vlad Yasevich <[email protected]> Signed-off-by: Dave Ertman <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2014-05-13net: get rid of SET_ETHTOOL_OPSWilfried Klaebe1-1/+1
net: get rid of SET_ETHTOOL_OPS Dave Miller mentioned he'd like to see SET_ETHTOOL_OPS gone. This does that. Mostly done via coccinelle script: @@ struct ethtool_ops *ops; struct net_device *dev; @@ - SET_ETHTOOL_OPS(dev, ops); + dev->ethtool_ops = ops; Compile tested only, but I'd seriously wonder if this broke anything. Suggested-by: Dave Miller <[email protected]> Signed-off-by: Wilfried Klaebe <[email protected]> Acked-by: Felipe Balbi <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-05-12Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller3-29/+46
Conflicts: drivers/net/ethernet/altera/altera_sgdma.c net/netlink/af_netlink.c net/sched/cls_api.c net/sched/sch_api.c The netlink conflict dealt with moving to netlink_capable() and netlink_ns_capable() in the 'net' tree vs. supporting 'tc' operations in non-init namespaces. These were simple transformations from netlink_capable to netlink_ns_capable. The Altera driver conflict was simply code removal overlapping some void pointer cast cleanups in net-next. Signed-off-by: David S. Miller <[email protected]>
2014-05-05e1000e: Restrict MDIO Slow Mode workaround to relevant partsDavid Ertman1-6/+8
It has been determined that the workaround of putting the PHY into MDIO slow mode to access the PHY id is not necessary with Lynx Point and newer parts. The issue that necessitated the workaround has been fixed on the newer hardware. We will maintains, as a last ditch attempt, the conversion to MDIO Slow Mode in the failure branch when attempting to access the PHY id so as to cover all contingencies. Signed-off-by: Dave Ertman <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2014-05-05e1000e: Fix issue with link flap on 82579David Ertman2-0/+13
Several customers have reported a link flap issue on 82579. The symptoms are random and intermittent link losses when 82579 is connected to specific link partners. Issue has been root caused as interoperability problem between 82579 and at least some Broadcom PHYs in the Energy Efficient Ethernet wake mechanism. To fix the issue, we are disabling the Phase Locked Loop shutdown in 100M Low Power Idle. This solution will cause an increase of power in 100M EEE link. It will cost additional 28mW in this specific mode. Cc: Lukasz Adamczuk <[email protected]> Signed-off-by: Dave Ertman <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2014-05-05e1000e: Expand workaround for 10Mb HD throughput bugDavid Ertman2-4/+12
In commit 772d05c51c4f4896c120ad418b1e91144a2ac813 "e1000e: slow performance between two 82579 connected via 10Mbit hub", a workaround was put into place to address the overaggressive transmit behavior of 82579 parts when connecting at 10Mbs half-duplex. This same behavior is seen on i217 and i218 parts as well. This patch expands the original workaround to encompass these parts. Signed-off-by: Dave Ertman <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2014-05-05e1000e: Workaround for dropped packets in Gig/100 speeds on 82579David Ertman2-19/+13
This is a workaround for a HW erratum on 82579 devices. Erratum is #23 in Intel 6 Series Chipset and Intel C200 Series Chipset specification Update June 2013. Problem: 82579 parts experience packet loss in Gig and 100 speeds when interconnect between PHY and MAC is exiting K1 power saving state. This was previously believed to only affect 1Gig speed, but has been observed at 100Mbs also. Workaround: Disable K1 for 82579 devices at Gig and 100 speeds. Signed-off-by: Dave Ertman <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2014-04-24Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-3/+3
Conflicts: drivers/net/ethernet/intel/igb/e1000_mac.c net/core/filter.c Both conflicts were simple overlapping changes. Signed-off-by: David S. Miller <[email protected]>
2014-04-23e1000e: Cleanup use of deprecated DEFINE_PCI_DEVICE_TABLEDavid Ertman1-1/+1
Signed-off-by: Dave Ertman <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2014-04-23e1000e: Cleanup checkpatch extra spaceDavid Ertman1-4/+4
Fixing "WARNING:SPACING: Unnecessary space before function pointer arguments" Signed-off-by: Dave Ertman <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2014-04-23e1000e: Cleanup to fix checkpatch missing blank linesDavid Ertman6-0/+23
Fixing "WARNING:SPACING: networking uses a blank line after declarations" Signed-off-by: Dave Ertman <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2014-04-23e1000e: Cleanup return values in ethtoolDavid Ertman2-6/+6
Changing occurrences of returning 0 and 1 from bool functions to false and true, respectively Signed-off-by: Dave Ertman <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2014-04-18e1000e/igb/ixgbe/i40e: fix message terminationsJakub Kicinski1-1/+1
Add \n at the end of messages where missing, remove all \r. Reported-by: Joe Perches <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]> Tested-by: Aaron Brown <[email protected]> Tested-by: Phil Schmitt <[email protected]> Tested-by: Kavindya Deegala <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2014-04-18e1000e: Enclose e1000e_pm_thaw() with CONFIG_PM_SLEEPHiroaki SHIMODA1-1/+1
Fix following compilation warning: drivers/net/ethernet/intel/e1000e/netdev.c:6238:12: warning ‘e1000e_pm_thaw’ defined but not used [-Wunused-function] static int e1000e_pm_thaw(struct device *dev) ^ Signed-off-by: Hiroaki SHIMODA <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2014-04-18e1000e: Correctly include VLAN_HLEN when changing interface MTUVlad Yasevich1-1/+1
When changing the interface mtu, the driver starts with a value that doesn't include VLAN_HLEN. Later tests in the driver set the rx_buffer_len based on the mtu. As a result, when the user increases the mtu to 1504 (to support 802.1AD for example), the driver rx_buffer_len does not change and frames longer the 1522 bytes are rejected as too long. Include VLAN_HLEN from the start so that an user mtu greater then 1500 bytes is correctly reflected in the driver rx_buffer_len. CC: [email protected] Signed-off-by: Vlad Yasevich <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2014-04-11e1000e: remove open-coded skb_cow_headFrancois Romieu1-6/+4
Signed-off-by: Francois Romieu <[email protected]> Cc: Jesse Brandeburg <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2014-03-31e1000e: Fix no connectivity when driver loaded with cable outDavid Ertman1-5/+15
In commit da1e2046e5, the flow for enabling/disabling an Si errata workaround (e1000_lv_jumbo_workaround_ich8lan) was changed to fix a problem with iAMT connections dropping on interface down with jumbo frames set. Part of this change was to move the function call disabling the workaround to e1000e_down() from the e1000_setup_rctl() function. The mechanic for disabling of this workaround involves writing several MAC and PHY registers back to hardware defaults. After this commit, when the driver is loaded with the cable out, the PHY registers are not programmed with the correct default values. This causes the device to be capable of transmitting packets, but is unable to recieve them until this workaround is called. The flow of e1000e's open code relies upon calling the above workaround to expicitly program these registers either with jumbo frame appropriate settings or h/w defaults on 82579 and newer hardware. Fix this issue by adding logic to e1000_setup_rctl() that not only calls e1000_lv_jumbo_workaround_ich8lan() when jumbo frames are set, to enable the workaround, but also calls this function to explicitly disable the workaround in the case that jumbo frames are not set. Signed-off-by: Dave Ertman <[email protected]> Tested-by: Jeff Pieper <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2014-03-28e1000e: remove redundant if clause from PTP workJakub Kicinski1-3/+0
tx_hwtstamp_skb is always set before work is scheduled, work is cancelled before tx_hwtstamp_skb is set to NULL. PTP work cannot ever see tx_hwtstamp_skb set to NULL. Signed-off-by: Jakub Kicinski <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2014-03-28e1000e: add timeout for TX HW time stamping workJakub Kicinski3-0/+10
Hardware may fail to report time stamp e.g.: - when hardware time stamping is not enabled - when time stamp is requested shortly after ifup Timeout time stamp reading work to prevent it from scheduling itself indefinitely. Report timeout events via system log and device stats. Signed-off-by: Jakub Kicinski <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2014-03-21ptp: drivers: set the number of programmable pins.Richard Cochran1-0/+1
This patch updates the many PTP Hardware Clock drivers with the newly introduced field that advertises the number of programmable pins. Some of these devices do have programmable pins, but the implementation will have to wait for follow on patches. Signed-off-by: Richard Cochran <[email protected]> Acked-by: Jeff Kirsher <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-03-19e1000e: Fix Explicitly set Transmit Control RegisterDavid Ertman1-1/+9
This patch causes the TCTL to be explicitly set to fix a problem with poor network performance (throughput) on certain silicon when configured for 100M HDX performance. Cc: Todd Fujinaka <[email protected]> Signed-off-by: Dave Ertman <[email protected]> Acked-by: Bruce W. Allan <[email protected]> Tested-by: Jeff Pieper <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2014-03-19e1000e: Fix Hardware Unit HangDavid Ertman1-9/+23
The check for pending Tx work when link is lost was mistakenly moved to be done only when link is first detected to be lost. It turns out there is a small window of opportunity for additional Tx work to get queued up shortly after link is dropped. Move the check back to the place it was before in the watchdog task. Put in additional debug information for other reset paths and a final catch-all for false hangs in the scheduled function that prints out the hardware hang message. Signed-off-by: Dave Ertman <[email protected]> Signed-off-by: Bruce Allan <[email protected]> Tested-by: Jeff Pieper <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2014-03-18e1000e: fix the build error when PM is disabledKevin Hao1-0/+2
The commit 2800209994f8 (e1000e: Refactor PM flows) changed the SET_SYSTEM_SLEEP_PM_OPS to open-coded assignment, but forgot to protect them with CONFIG_PM_SLEEP. Then cause the following build error when PM is disabled: drivers/net/ethernet/intel/e1000e/netdev.c:7079:13: error: 'e1000e_pm_suspend' undeclared here (not in a function) .suspend = e1000e_pm_suspend, ^ drivers/net/ethernet/intel/e1000e/netdev.c:7080:13: error: 'e1000e_pm_resume' undeclared here (not in a function) .resume = e1000e_pm_resume, ^ drivers/net/ethernet/intel/e1000e/netdev.c:7082:11: error: 'e1000e_pm_thaw' undeclared here (not in a function) .thaw = e1000e_pm_thaw, ^ Signed-off-by: Kevin Hao <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-03-12net: e1000e calls skb_set_hashTom Herbert1-1/+1
Drivers should call skb_set_hash to set the hash and its type in an skbuff. Signed-off-by: Tom Herbert <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2014-03-07e1000e: Fix SHRA register access for 82579David Ertman2-2/+2
Previous commit c3a0dce35af0 fixed an overrun for the RAR on i218 devices. This commit also attempted to homogenize the RAR/SHRA access for all parts accessed by the e1000e driver. This change introduced an error for assigning MAC addresses to guest OS's for 82579 devices. Only RAR[0] is accessible to the driver for 82579 parts, and additional addresses must be placed into the SHRA[L|H] registers. The rar_entry_count was changed in the previous commit to an inaccurate value that accounted for all RAR and SHRA registers, not just the ones usable by the driver. This patch fixes the count to the correct value and adjusts the e1000_rar_set_pch2lan() function to user the correct index. Cc: John Greene <[email protected]> Signed-off-by: Dave Ertman <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2014-03-07e1000e: Fix ethtool offline tests for 82579 partsDavid Ertman1-2/+8
Changes to the rar_entry_count value require a change to the indexing used to access the SHRA[H|L] registers when testing them with 'ethtool -t <iface> offline' Signed-off-by: Dave Ertman <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2014-03-07e1000e: Fix not generating an error on invalid load parameterDavid Ertman1-0/+6
Valid values for InterruptThrottleRate are 10-100000, or one of 0, 1, 3, 4. '2' is not valid. This is a legacy from the branching from the e1000 driver code that e1000e was based from. Prior to this patch, if the e1000e driver was loaded with a forced invalid InterruptThrottleRate of '2', then no throttle rate would be set and no error message generated. Now, a message will be generated that an invalid value was used and the value for InterruptThrottleRate will be set to the default value. Signed-off-by: Dave Ertman <[email protected]> Tested-by: Jeff Pieper <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2014-03-07e1000e: Feature Enable PHY Ultra Low Power Mode (ULP)David Ertman6-33/+354
ULP is a power saving feature that reduces the power consumption of the PHY when a cable is not connected. ULP is gated on the following conditions: 1) The hardware must support ULP. Currently this is only I218 devices from Intel 2) ULP is initiated by the driver, so, no driver results in no ULP. 3) ULP's implementation utilizes Runtime Power Management to toggle its execution. ULP is enabled/disabled based on the state of Runtime PM. 4) ULP is not active when wake-on-unicast, multicast or broadcast is active as these features are mutually-exclusive. Since the PHY is in an unavailable state while ULP is active, any access of the PHY registers will fail. This is resolved by utilizing kernel calls that cause the device to exit Runtime PM (e.g. pm_runtime_get_sync) and then, after PHY access is complete, allow the device to resume Runtime PM (e.g. pm_runtime_put_sync). Under certain conditions, toggling the LANPHYPC is necessary to disable ULP mode. Break out existing code to toggle LANPHYPC to a new function to avoid code duplication. Signed-off-by: Dave Ertman <[email protected]> Cc: Bruce Allan <[email protected]> Tested-by: Jeff Pieper <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2014-03-07e1000e Refactor of Runtime Power ManagementDavid Ertman2-32/+46
Fix issues with: RuntimePM causing the device to repeatedly flip between suspend and resume with the interface administratively downed. Having RuntimePM enabled interfering with the functionality of Energy Efficient Ethernet. Added checks to disallow functions that should not be executed if the device is currently runtime suspended Make runtime_idle callback to use same deterministic behavior as the igb driver. Signed-off-by: Dave Ertman <[email protected]> Acked-by: Bruce Allan <[email protected]> Tested-by: Jeff Pieper <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2014-03-07e1000e: Refactor PM flowsDavid Ertman3-55/+78
Refactor the system power management flows to prevent the suspend path from being executed twice when hibernating since both the freeze and poweroff callbacks were set to e1000_suspend() via SET_SYSTEM_SLEEP_PM_OPS. There are HW workarounds that are performed during this flow and calling them twice was causing erroneous behavior. Re-arrange the code to take advantage of common code paths and explicitly set the individual dev_pm_ops callbacks for suspend, resume, freeze, thaw, poweroff and restore. Add a boolean parameter (reset) to the e1000e_down function to allow for cases when the HW should not be reset when downed during a PM event. Now that all suspend/shutdown paths result in a call to __e1000_shutdown() that checks Wake on Lan status, removing redundant check for WoL in e1000_power_down_phy(). Signed-off-by: Dave Ertman <[email protected]> Acked-by: Bruce Allan <[email protected]> Tested-by: Jeff Pieper <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>