summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
Commit message (Collapse)AuthorAgeFilesLines
* ixgbe: only report generic filters in get_ts_infoJacob Keller2015-07-181-8/+0Star
| | | | | | | Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Acked-by: Richard Cochran <richardcochran@gmail.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ixgbe: add define for X557 PHY IDDon Skidmore2015-06-101-0/+1
| | | | | | | | | | Add a define for the new PHY identification as well as it's mapping to the correct PHY type. Also allow ethtool to identify this type as well. Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Tested-by: Krishneil Singh <krishneil.k.singh@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ixgbe: add array of MAC type dependent valuesDon Skidmore2015-06-101-3/+3
| | | | | | | | | | | | | Some of the register addresses and format where unfortunately changed between MAC types. To get around this we add a const u32 *mvals pointer to the ixgbe_hw struct to point to an array of mac-type-dependent values. These can include register offsets, masks, whatever can be in a u32. When the ixgbe_hw struct is initialized, a pointer to the appropriate array must be set. Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ixgbe: Allow flow director to use entire queue spaceJohn Fastabend2015-05-281-10/+24
| | | | | | | | | | | | | | | | | | Flow director is exported to user space using the ethtool ntuple support. However, currently it only supports steering traffic to a subset of the queues in use by the hardware. This change allows flow director to specify queues that have been assigned to virtual functions by partitioning the ring_cookie into a 8bit VF specifier followed by 32bit queue index. At the moment we don't have any ethernet drivers with more than 2^32 queues on a single function as best I can tell and nor do I expect this to happen anytime soon. This way the ring_cookie's normal use for specifying a queue on a specific PCI function continues to work as expected. CC: Alex Duyck <alexander.h.duyck@redhat.com> Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Tested-by: Krishneil Singh <krishneil.k.singh@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ixgbe: Use a signed type to hold error codesMark Rustad2015-05-041-5/+5
| | | | | | | | | | Because error codes are negative, it only makes sense to consistently use signed types when handling them. Also remove some explicit comparisons with 0 on these variables. Signed-off-by: Mark Rustad <mark.d.rustad@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ixgbe: Add the appropriate ethtool ops to query RSS indirection table and keyVlad Zolotarov2015-04-111-0/+42
| | | | | | | | | | | Added get_rxfh_indir_size, get_rxfh_key_size and get_rxfh ethtool_ops callbacks implementations. This enables the ethtool's "-x" and "--show-rxfh[-indir]" options. Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ethernet: Use bool function returns of true/false instead of 1/0Joe Perches2015-03-311-2/+2
| | | | | | | | Use bool constants as the return values instead of 1 and 0. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ixgbe: add new wrapper for X550 supportDon Skidmore2015-03-131-6/+7
| | | | | | | | | | | For the X550 mac type we have to do additional steps around enabling/disabling Rx. This patch will add a layer of indirection around these support functions to enable this. CC: <kernel-team@fb.com> Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ixgbe: add support for X550 extended RSS supportDon Skidmore2014-12-051-4/+5
| | | | | | | | | | The new X550 family of MAC's will have a larger RSS hash (16 -> 64). It will also support individual VF to have their own independent RSS hash key. This patch will enable this functionality Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ixgbe: Add new support for X550 MAC'sDon Skidmore2014-11-111-5/+32
| | | | | | | | | This patch will add in the new MAC defines and fit it into the switch cases throughout the driver. New functionality and enablement support will be added in following patches. Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ixgbe: fix race when setting advertised speedEmil Tantilov2014-10-301-0/+4
| | | | | | | | | | | | | | | | | | | Following commands: modprobe ixgbe ifconfig ethX up ethtool -s ethX advertise 0x020 can lead to "setup link failed with code -14" error due to the setup_link call racing with the SFP detection routine in the watchdog. This patch resolves this issue by protecting the setup_link call with check for __IXGBE_IN_SFP_INIT. Reported-by: Scott Harrison <scoharr2@cisco.com> Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ixgbe: fix setting of TXDCTL.WTRHESH when ITR is set to 0 and no BQLEmil Tantilov2014-10-021-2/+1Star
| | | | | | | | | | | | | | | This patch consolidates the logic behind dynamically setting TXDCTL.WTHRESH depending on interrupt throttle rate (ITR) setting regardless of BQL. Previously TXDCTL.WTHRESH was dynamically being set only with BQL being enabled, but we have to set it regardless of BQL when ITR is low to avoid Tx stalls/hangs. CC: John Greene <jogreene@redhat.com> Reported by: Masayuki Gouji <gouji.masayuki@jp.fujitsu.com> Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ixgbe: Resolve warnings produced in W=2 buildsMark Rustad2014-09-121-2/+2
| | | | | | | | | | | This patch resolves warnings produced by ixgbe in W=2 kernel builds. There are missing-field-initializers warnings and shadow warnings. None of these point to any deeper problem, so just resolve them so any new warnings get analyzed. Signed-off-by: Mark Rustad <mark.d.rustad@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* list: fix order of arguments for hlist_add_after(_rcu)Ken Helias2014-08-071-1/+1
| | | | | | | | | | | | | | | | | | | All other add functions for lists have the new item as first argument and the position where it is added as second argument. This was changed for no good reason in this function and makes using it unnecessary confusing. The name was changed to hlist_add_behind() to cause unconverted code to generate a compile error instead of using the wrong parameter order. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Ken Helias <kenhelias@firemail.de> Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> [intel driver bits] Cc: Hugh Dickins <hughd@google.com> Cc: Christoph Hellwig <hch@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* ixgbe: remove unnecessary break after returnFabian Frederick2014-07-211-2/+0Star
| | | | | Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: use SPEED_UNKNOWN and DUPLEX_UNKNOWN when appropriateJiri Pirko2014-06-071-2/+2
| | | | | Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
* ixgbe: fix detection of SFP+ capable interfacesEmil Tantilov2014-06-041-7/+0Star
| | | | | | | | | | | | | | | | | | | | | | In cases where the driver is loaded while there are no SFP+ modules in the cage the interface was not being detected as SFP capable. To account for this the driver called identify_sfp in ixgbe_get_settings to make sure the data is correct. However when there is no SFP+ module in the cage the driver waits for the I2C reads to time out which can take more than a second and will cause issues with tools (like net-snmp) that may poll for that information. This patch resolves the issue by identifying interfaces with no PHY type set as SFP capable which allows the driver to detect the SFP module when the interface is brought up. As result of this we can also remove the identify_sfp call from ixgbe_get_settings. v2: remove the 82599 specific check since we have 82598 devices that are SFP capable. Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ixgbe: add /* fallthrough */ comment to case statementsJacob Keller2014-05-231-0/+4
| | | | | | | | | This semicomplex switch-case has various fallthrough portions, that were not indicated by a /* fallthrough */ comment. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ixgbe: add space between operands to &Jacob Keller2014-05-231-1/+1
| | | | | | | | This patch cleans up a checkpatch.pl style warning in the ixgbe code. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ixgbe: fix several concatenated strings to single lineJacob Keller2014-05-231-16/+9Star
| | | | | | | | | | | This patch fixes various log strings that are split over multiple lines in the ixgbe driver. This cleans up checkpatch.pl warnings, and makes it easier to search the code for warning strings displayed to the kernel log. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ixgbe: clean up checkpatch warnings about CODE_INDENT and LEADING_SPACEJacob Keller2014-05-231-26/+26
| | | | | | | | | | | The contents of this patch were originally generated by "scripts/checkpatch.pl --fix-inplace --types CODE_INDENT,LEADING_SPACE drivers/net/ethernet/ixgbe/*.[ch]", and then hand verified for consistency. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* net: get rid of SET_ETHTOOL_OPSWilfried Klaebe2014-05-131-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 <davem@davemloft.net> Signed-off-by: Wilfried Klaebe <w-lkml@lebenslange-mailadresse.de> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: Replace u64_stats_fetch_begin_bh to u64_stats_fetch_begin_irqEric W. Biederman2014-03-151-4/+4
| | | | | | | | | | | | | | | Replace the bh safe variant with the hard irq safe variant. We need a hard irq safe variant to deal with netpoll transmitting packets from hard irq context, and we need it in most if not all of the places using the bh safe variant. Except on 32bit uni-processor the code is exactly the same so don't bother with a bh variant, just have a hard irq safe variant that everyone can use. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ixgbe: add Linux NICS mailing list to contact infoJacob Keller2014-03-131-0/+1
| | | | | | | | | | This patch updates the contact information on the ixgbe driver files so that every file includes the Linux NICS address, as it is still used, but only a few of the files mentioned it. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ixgbe: Fix up some ethtool results when adapter is removedMark Rustad2014-03-031-1/+8
| | | | | | | | | | | | Some ethtool tests returned apparently good results when the adapter was in a removed state. Fix that by checking for removal. This also fixes two paths that could return uninitialized memory in data[4]. Signed-off-by: Mark Rustad <mark.d.rustad@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ixgbe: Additional adapter removal checksMark Rustad2014-01-151-0/+22
| | | | | | | | | | | | | Additional checks are needed for a detected removal not to cause problems. Some involve simply avoiding a lot of stuff that can't do anything good, and also cases where the phony return value can cause problems. In addition, down the adapter when the removal is sensed. Signed-off-by: Mark Rustad <mark.d.rustad@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ixgbe: Make ethtool register test use accessorsMark Rustad2014-01-151-51/+47Star
| | | | | | | | | | | | Make the ethtool register test use the normal register accessor functions. Also eliminate macros used for calling register test functions to make error exits clearer. Use boolean values for boolean returns instead of 0 and 1. Signed-off-by: Mark Rustad <mark.d.rustad@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ixgbe: fix rx-usecs range checks for BQLEmil Tantilov2013-10-241-3/+3
| | | | | | | | | | | | | This patch resolves an issue where the logic used to detect changes in rx-usecs was incorrect and was masked by the call to ixgbe_update_rsc(). Setting rx-usecs between 0,2-9 and 1,10 and up requires a reset to allow ixgbe_configure_tx_ring() to set the correct value for TXDCTL.WTHRESH in order to avoid Tx hangs with BQL enabled. Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ixgbe: remove marketing names from busy poll codeJacob Keller2013-10-011-14/+14
| | | | | | | | | | | | | | | This patch renames the LL_EXTENDED_STATS and some of the functions required to implement busy polling in the ixgbe driver, in order to remove the marketing "low latency" blurb which hides what the code actually does. This furthers work which was requested by Linus Torvalds when the initial busy poll code was included in the kernel. The code in the ixgbe driver itself was never properly renamed to reflect the change to busy polling as the title. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ixgbe: ethtool DCB registers dump for 82599 and x540Leonardo Potenza2013-10-011-15/+60
| | | | | | | | | | | | | Added support for DCB registers dump using ethtool -d option both for 82599 and x540 ethernet controllers Signed-off-by: Leonardo Potenza <leonardo.potenza@intel.com> Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com> Acked-by: John Fastabend <john.r.fastabend@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Tested-by: Jack Morgan <jack.morgan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ixgbe: fix ethtool reporting of supported links for SFP modulesEmil Tantilov2013-09-131-0/+7
| | | | | | | | | | | | | This patch resolves an issue where the driver will display incorrect info for Q/SFP+ modules that were inserted after the driver has been loaded. This patch adds a call to identify_phy() in ixgbe_get_settings() prior to calling get_link_capabilities() which needs the PHY data in order to determine the correct settings. Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ixgbe: limit setting speed to only one at a time for QSFP modulesEmil Tantilov2013-09-131-0/+13
| | | | | | | | | | | | | | QSFP+ modules do not support auto negotiation and should advertise only one speed at a time. This patch adds logic in ethtool to allow setting and reporting the advertised speed at either 1Gbps or 10Gbps, but not both. Also limits the speed set in ixgbe_sfp_link_config_subtask() to highest supported. Previously the link was set to whatever the supported speeds were. Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ixgbe: fix ethtool loopback diagnostic with DCB enabledEmil Tantilov2013-09-131-0/+5
| | | | | | | | | | | This patch disables DCB prior to running the loopback test. When DCB is enabled the frames may be modified on Tx (by adding vlan tag) which will fail the check on Rx. Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Tested-by: Jack Morgan <jack.morgan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ixgbe: add 1Gbps support for QSFP+Emil Tantilov2013-08-291-3/+0Star
| | | | | | | | | | This patch adds GB speed support for QSFP+ modules. Autonegotiation is not supported with QSFP+. The user will have to set the desired speed on both link partners using ethtool advertise setting. Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ixgbe: fix SFF data dumps of SFP+ modules from an offsetEmil Tantilov2013-08-291-5/+4Star
| | | | | | | | | | | | | This patch fixes the read loop for the I2C data to account for the offset. Also includes a whitespace cleanup and removes ret_val as it is not needed. CC: Ben Hutchings <bhutchings@solarflare.com> Reported-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Reviewed-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ixgbe: fix link test when connected to 1Gbps link partnerEmil Tantilov2013-08-291-17/+10Star
| | | | | | | | | | | | | | | | | | This patch is a partial reverse of: commit dfcc4615f09c33454bc553567f7c7506cae60cb9 Author: Jacob Keller <jacob.e.keller@intel.com> Date: Thu Nov 8 07:07:08 2012 +0000 ixgbe: ethtool ixgbe_diag_test cleanup Specifically forcing the laser before the link check can lead to inconsistent results because it does not guarantee that the link will be negotiated correctly. Such is the case when dual speed SFP+ module is connected to a gigabit link partner. Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ixgbe: fix incorrect limit value in ring transverseDon Skidmore2013-08-291-1/+1
| | | | | | | | | | | We were transversing the tx_ring with IXGBE_NUM_RX_QUEUES. Now this define happens to have the correct value but this is misleading and a change later could easily make this no longer true. I updated it to netdev->num_tx_queues like we use in ixgbe_get_strings(). Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ixgbe: rename LL_EXTENDED_STATS to use queue instead of qJacob Keller2013-07-311-6/+6
| | | | | | | | | This patch renames the stats introduced by the busy poll feature so that they are more inline with the current statistics naming schemes. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ixgbe: fix SFF data dumps of SFP+ modulesEmil Tantilov2013-07-311-55/+18Star
| | | | | | | | | | | | | | | | | | | This patch fixes several issues with the previous implementation of the SFF data dump of SFP+ modules: - removed the __IXGBE_READ_I2C flag - I2C access locking is handled in the HW specific routines - fixed the read loop to read data from ee->offset to ee->len - the reads fail if __IXGBE_IN_SFP_INIT is set in the process - this is needed because on some HW I2C operations can take long time and disrupt the SFP and link detection process Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Reported-by: Ben Hutchings <bhutchings@solarflare.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ixgbe: fix fc autoneg ethtool reporting.Don Skidmore2013-07-311-4/+5
| | | | | | | | | | | | Originally ixgbe_device_supports_autoneg_fc() was only expected to be called by copper devices. This would lead to false information to be displayed via ethtool. v2: changed ixgbe_device_supports_autoneg_fc() to a bool function, it returns bool. Based on feedback from David Miller Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ixgbe: add extra stats for ndo_ll_pollEliezer Tamir2013-06-111-0/+40
| | | | | | | | | | Add additional statistics to the ixgbe driver for ndo_ll_poll Defined under LL_EXTENDED_STATS Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Eliezer Tamir <eliezer.tamir@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ixgbe: add mac type to the version in ethtool_regsEmil Tantilov2013-04-261-1/+2
| | | | | | | | | | | | | This patch adds the mac type to the version in ethtool_regs. This will make it easier to check the mac type when dumping registers with ethtool. The drawback of this is that older versions of ethtool will only be able to dump in hex format for 82599 and above when used with the updated driver. Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ixgbe: fix register access during ethtool loopback testEmil Tantilov2013-04-261-12/+14
| | | | | | | | | | | | | This patch cleans up the logic in ixgbe_setup_loopback_test() to only access registers applicable to the MAC type. AUTOC is only valid on MACs older than X540. MACC is used for X540. In addition it removes a read of AUTOC and uses the stored value to force the link up. Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ixgbe: add SFP+ LX module supportDon Skidmore2013-04-251-6/+4Star
| | | | | | | | | | | | | | | | | This patch adds LX support to 82599 devices. This is an alternate patch to the one suggested by Stefan Behte <s.behte@babiel.com> In addition this patch includes some cleanups such as: - removed parenthesis around "x == y ||" lines inside an if statement for consistency. - grouped the sx/lx sfp types along with srlr in ixgbe_get_settings() since they all have the same supported, advertised and port values. Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Reported-by: Stefan Behte <s.behte@babiel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* hlist: drop the node parameter from iteratorsSasha Levin2013-02-281-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'm not sure why, but the hlist for each entry iterators were conceived list_for_each_entry(pos, head, member) The hlist ones were greedy and wanted an extra parameter: hlist_for_each_entry(tpos, pos, head, member) Why did they need an extra pos parameter? I'm not quite sure. Not only they don't really need it, it also prevents the iterator from looking exactly like the list iterator, which is unfortunate. Besides the semantic patch, there was some manual work required: - Fix up the actual hlist iterators in linux/list.h - Fix up the declaration of other iterators based on the hlist ones. - A very small amount of places were using the 'node' parameter, this was modified to use 'obj->member' instead. - Coccinelle didn't handle the hlist_for_each_entry_safe iterator properly, so those had to be fixed up manually. The semantic patch which is mostly the work of Peter Senna Tschudin is here: @@ iterator name hlist_for_each_entry, hlist_for_each_entry_continue, hlist_for_each_entry_from, hlist_for_each_entry_rcu, hlist_for_each_entry_rcu_bh, hlist_for_each_entry_continue_rcu_bh, for_each_busy_worker, ax25_uid_for_each, ax25_for_each, inet_bind_bucket_for_each, sctp_for_each_hentry, sk_for_each, sk_for_each_rcu, sk_for_each_from, sk_for_each_safe, sk_for_each_bound, hlist_for_each_entry_safe, hlist_for_each_entry_continue_rcu, nr_neigh_for_each, nr_neigh_for_each_safe, nr_node_for_each, nr_node_for_each_safe, for_each_gfn_indirect_valid_sp, for_each_gfn_sp, for_each_host; type T; expression a,c,d,e; identifier b; statement S; @@ -T b; <+... when != b ( hlist_for_each_entry(a, - b, c, d) S | hlist_for_each_entry_continue(a, - b, c) S | hlist_for_each_entry_from(a, - b, c) S | hlist_for_each_entry_rcu(a, - b, c, d) S | hlist_for_each_entry_rcu_bh(a, - b, c, d) S | hlist_for_each_entry_continue_rcu_bh(a, - b, c) S | for_each_busy_worker(a, c, - b, d) S | ax25_uid_for_each(a, - b, c) S | ax25_for_each(a, - b, c) S | inet_bind_bucket_for_each(a, - b, c) S | sctp_for_each_hentry(a, - b, c) S | sk_for_each(a, - b, c) S | sk_for_each_rcu(a, - b, c) S | sk_for_each_from -(a, b) +(a) S + sk_for_each_from(a) S | sk_for_each_safe(a, - b, c, d) S | sk_for_each_bound(a, - b, c) S | hlist_for_each_entry_safe(a, - b, c, d, e) S | hlist_for_each_entry_continue_rcu(a, - b, c) S | nr_neigh_for_each(a, - b, c) S | nr_neigh_for_each_safe(a, - b, c, d) S | nr_node_for_each(a, - b, c) S | nr_node_for_each_safe(a, - b, c, d) S | - for_each_gfn_sp(a, c, d, b) S + for_each_gfn_sp(a, c, d) S | - for_each_gfn_indirect_valid_sp(a, c, d, b) S + for_each_gfn_indirect_valid_sp(a, c, d) S | for_each_host(a, - b, c) S | for_each_host_safe(a, - b, c, d) S | for_each_mesh_entry(a, - b, c, d) S ) ...+> [akpm@linux-foundation.org: drop bogus change from net/ipv4/raw.c] [akpm@linux-foundation.org: drop bogus hunk from net/ipv6/raw.c] [akpm@linux-foundation.org: checkpatch fixes] [akpm@linux-foundation.org: fix warnings] [akpm@linux-foudnation.org: redo intrusive kvm changes] Tested-by: Peter Senna Tschudin <peter.senna@gmail.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Cc: Wu Fengguang <fengguang.wu@intel.com> Cc: Marcelo Tosatti <mtosatti@redhat.com> Cc: Gleb Natapov <gleb@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* ixgbe: fix Tx timeouts with BQLEmil Tantilov2013-02-161-6/+27
| | | | | | | | | This patch makes sure that TXDCTL.WTHRESH is set to 1 when BQL is enabled and EITR is set to more than 100k interrupts per second to avoid Tx timeouts. Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ixgbe: implement SFF diagnostic monitoring via ethtoolAurélien Guillaume2013-02-161-0/+114
| | | | | | | | | This patch adds support for reading data from SFP+ modules over i2c. Signed-off-by: Aurélien Guillaume <footplus@gmail.com> Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ixgbe: Add support for set_channels ethtool operationAlexander Duyck2013-02-161-0/+38
| | | | | | | | | | | | | This change adds support for the ethtool set_channels operation. Since the ixgbe driver has to support DCB as well as the other modes the assumption I made here is that the number of channels in DCB modes refers to the number of queues per traffic class, not the number of queues total. CC: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ixgbe: Add support for displaying the number of Tx/Rx channelsAlexander Duyck2013-02-161-0/+72
| | | | | | | | | | | | | This patch adds support for the ethtool get_channels operation. Since the ixgbe driver has to support DCB as well as the other modes the assumption I made here is that the number of channels in DCB modes refers to the number of queues per traffic class, not the number of queues total. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Reviewed-by: John Fastabend <john.r.fastabend@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ixgbe: update date to 2013Don Skidmore2013-02-051-1/+1
| | | | | | Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>