summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/igb
AgeCommit message (Collapse)Author
2012-02-09igb: fix warning about unused functionEmil Tantilov
This patch fixes a warning about unused function when CONFIG_PM_SLEEP is not selected in the kernel config: igb_main.c: warning: `igb_suspend` defined but not used [W-unused-function] Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-01-19igb: Update Copyright on all Intel copyrighted files.Carolyn Wyborny
Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-19igb: make local functions staticStephen Hemminger
Sparse caught two functions that were only being used in one file. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-05igb: reset PHY after recovering from PHY power downKoki Sanagi
According to 82576_Datasheet.pdf, PHY setting is lost after PHY power down. So resetting PHY is needed when recovering from PHY power down to set a default setting to PHY register. Owing to this lack, NIC doesn't link up in some rare situation. Signed-off-by: Koki Sanagi <sanagi.koki@jp.fujitsu.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-05igb: add basic runtime PM supportYan, Zheng
Use the runtime power management framework to add basic runtime PM support to the igb driver. Namely, make the driver suspend the device when the link is off and set it up for generating a wakeup event after the link has been detected again. This feature is disabled by default. Based on e1000e's runtime PM code. Changes since v1: Don't suspend the device when shutting down the interface. Avoid race between runtime suspending and ethtool operations. Signed-off-by: Zheng Yan <zheng.z.yan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-05igb: Add support for byte queue limits.Eric Dumazet
This adds support for byte queue limits (BQL) Since this driver collects bytes count in 'bytecount' field, use it also in igb_tx_map() Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> CC: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-02igb: Add flow control advertising to ethtool setting.Carolyn Wyborny
Added pause flag for bi-directional flow control advertising to ethtool settings. Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-12-08net: make vlan ndo_vlan_rx_[add/kill]_vid return error valueJiri Pirko
Let caller know the result of adding/removing vlan id to/from vlan filter. In some drivers I make those functions to just return 0. But in those where there is able to see if hw setup went correctly, return value is set appropriately. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-05igb: Update DMA Coalescing threshold calculation.Matthew Vick
This patch updates the DMA Coalescing feature parameters to account for larger MTUs. Previously, sufficient space may not have been allocated in the receive buffer, causing packet drop. Signed-off-by: Matthew Vick <matthew.vick@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-11-22net: remove netdev_alloc_page and use __GFP_COLDEric Dumazet
Given we dont use anymore the struct net_device *dev argument, and this interface brings litle benefit, remove netdev_{alloc|free}_page(), to debloat include/linux/skbuff.h a bit. (Some drivers used a mix of these interfaces and alloc_pages()) When allocating a page given to device for DMA transfer (device to memory), it makes sense to use a cold one (__GFP_COLD) Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com> CC: Dimitris Michailidis <dm@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-16Merge branch 'master' of ↵David S. Miller
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next
2011-11-16net: introduce and use netdev_features_t for device features setsMichał Mirosław
v2: add couple missing conversions in drivers split unexporting netdev_fix_features() implemented %pNF convert sock::sk_route_(no?)caps Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-16igb: Convert bare printk to pr_noticeJoe Perches
printks should use KERN_ levels. Signed-off-by: Joe Perches <joe@perches.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-11-16igb: Convert printks to pr_<level>Jeff Kirsher
Based on original patch from Joe Perches <joe@perches.com> Use the current logging styles. pr_<level> conversions are now prefixed with "igb: " Correct a defect where the trailing NTU may have been printed on a separate line because of an interleaving hex_dump. Remove unnecessary uses of KERN_CONT and use single pr_info()s to avoid any possible output interleaving from other modules. Coalesce formats as appropriate. -v2 fix-up to make checkpatch.pl compliant and remove change to the copyright line CC: Joe Perches <joe@perches.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com>
2011-11-14Sweep the last of the active .get_drvinfo floors under ethernet/Rick Jones
This round of floor sweeping converts strncpy calls in various .get_drvinfo routines to the preferred strlcpy. It also does a modicum of other cleaning in those routines. Signed-off-by: Rick Jones <rick.jones2@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-02igb: Fix for I347AT4 PHY cable length unit detectionKantecki, Tomasz
The PHY cable length unit detection was not using the correct the correct PHY data variable for I347AT4. Signed-off-by: Tomasz Kantecki <tomasz.kantecki@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-10-25Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-nextLinus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1745 commits) dp83640: free packet queues on remove dp83640: use proper function to free transmit time stamping packets ipv6: Do not use routes from locally generated RAs |PATCH net-next] tg3: add tx_dropped counter be2net: don't create multiple RX/TX rings in multi channel mode be2net: don't create multiple TXQs in BE2 be2net: refactor VF setup/teardown code into be_vf_setup/clear() be2net: add vlan/rx-mode/flow-control config to be_setup() net_sched: cls_flow: use skb_header_pointer() ipv4: avoid useless call of the function check_peer_pmtu TCP: remove TCP_DEBUG net: Fix driver name for mdio-gpio.c ipv4: tcp: fix TOS value in ACK messages sent from TIME_WAIT rtnetlink: Add missing manual netlink notification in dev_change_net_namespaces ipv4: fix ipsec forward performance regression jme: fix irq storm after suspend/resume route: fix ICMP redirect validation net: hold sock reference while processing tx timestamps tcp: md5: add more const attributes Add ethtool -g support to virtio_net ... Fix up conflicts in: - drivers/net/Kconfig: The split-up generated a trivial conflict with removal of a stale reference to Documentation/networking/net-modules.txt. Remove it from the new location instead. - fs/sysfs/dir.c: Fairly nasty conflicts with the sysfs rb-tree usage, conflicting with Eric Biederman's changes for tagged directories.
2011-10-21igb: VFTA Table Fix for i350 devicesCarolyn Wyborny
Due to a hardware problem, writes to the VFTA register can theoretically fail. Although the likelihood of this is very low. This patch adds a shadow vfta in the adapter struct for reading and adds new write functions for these devices to work around the problem. Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-10-21igb: Move DMA Coalescing init code to separate function.Carolyn Wyborny
This patch moves the DMA Coalescing feature initialization code from igb_reset to a new function and replaces it with a call to the new function. Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-10-21igb: Fix for Alt MAC Address feature on 82580 and later devicesCarolyn Wyborny
In 82580 and later devices, the alternate MAC address feature is completely handled by the option ROM and software does not handle it anymore. This patch changes the check_alt_mac_addr function to exit immediately if device is 82580 or later. Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-10-20igb: fix a compile warningRongQing Li
control these three function declarations and definitions with same macro CONFIG_PCI_IOV drivers/net/ethernet/intel/igb/igb_main.c:165: warning: ‘igb_vf_configure’ declared ‘static’ but never defined drivers/net/ethernet/intel/igb/igb_main.c:166: warning: ‘igb_find_enabled_vfs’ declared ‘static’ but never defined drivers/net/ethernet/intel/igb/igb_main.c:167: warning: ‘igb_check_vf_assignment’ declared ‘static’ but never defined Signed-off-by: RongQing Li <roy.qing.li@gmail.com> Acked-by: Greg Rose <gregory.v.rose@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-10-19net: add skb frag size accessorsEric Dumazet
To ease skb->truesize sanitization, its better to be able to localize all references to skb frags size. Define accessors : skb_frag_size() to fetch frag size, and skb_frag_size_{set|add|sub}() to manipulate it. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-10-17igb: Check if subordinate VFs are assigned to virtual machinesGreg Rose
Kvm and the Xen pci-back driver will set a flag in the virtual function pci device dev_flags when the VF is assigned to a guest VM. Before destroying subordinate VFs check to see if the flag is set and if so skip the call to pci_disable_sriov() to avoid system crashes. Copy the maintainer for the Xen pci-back driver. Also CC'ing maintainers of all drivers found to call pci_disable_sriov(). V2 - Fix uninitialized variable warning Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Cc: Christian Benvenuti <benve@cisco.com> Cc: Sathya Perla <sathya.perla@emulex.com> Cc: Dimitris Michailidis <dm@chelsio.com> Cc: Jon Mason <jdmason@kudzu.us> Cc: James Smart <james.smart@emulex.com> Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-10-16igb: enable l4 timestamping for v2 event packetsJacob Keller
When enabling hardware timestamping for ptp v2 event packets, the software does not setup the queue for l4 packets, although layer 4 packets are valid for v2. This patch adds the flag which enables setting up a queue and enabling udp packet timestamping. Signed-off-by: Jacob E Keller <jacob.e.keller@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-10-13igb: fix skb truesize underestimationEric Dumazet
e1000 allocates half a page per skb fragment. We must account PAGE_SIZE/2 increments on skb->truesize, not the actual frag length. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-10-12igb: Version bump.Carolyn Wyborny
This change updates the driver version to 3.2.10. Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-10-12igb: Loopback functionality supports for i350 devicesAkeem G. Abodunrin
This patch adds VMDq loopback pf support for i350 devices. The patch is necessary since the register that enabled loopback was moved and renamed from DTXSWC to TXSWC. Signed-off-by: "Akeem G. Abodunrin" <akeem.g.abodunrin@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-10-12igb: fix static function warnings reported by sparseEmil Tantilov
igb_update/validate_nvm_checksum_with_offset() should be static. Also removes unneeded prototypes for the above functions. Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-10-12igb: Add workaround for byte swapped VLAN on i350 local trafficAlexander Duyck
On i350 when traffic is looped back from a VF to the PF the value is byte swapped from the normal format. In order to address this we need to add a flag indicating that the ring will need to byte swap the loopback packets prior to processing them. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-10-12igb: Drop unnecessary write of E1000_IMS from igb_msix_otherAlexander Duyck
Since we mask interrupts in EIMS not in IMS there is no need to re-enable mask bits in that register. As such we can remove the write to IMS from the end of igb_msix_other. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-10-12igb: Fix features that are currently 82580 only and should also be i350Alexander Duyck
This change allows support for per packet timesync and global device reset on the i350 adapter. These features were supported on both 82580 and i350 however it looks like several checks where not updated and as such the i350 support was not enabled. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-10-12igb: Make certain one vector is always assigned in igb_request_irqAlexander Duyck
This change makes certain that one interrupt is always initialized in igb_request_irq. In addition we drop the use of adapter->pdev and instead just call pdev since we made a local copy of the pointer earlier in the function. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-10-12igb: avoid unnecessarily creating a local copy of the q_vectorAlexander Duyck
This is mostly a drop of unnecessary pointer defines for q_vector when we don't have issues with line width and don't have multiple references to the pointer. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-10-11Merge git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-nextDavid S. Miller
2011-10-07igb: add support for NETIF_F_RXHASHAlexander Duyck
This patch adds support for Rx hashing. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-10-07igb: move TX hang check flag into ring->flagsAlexander Duyck
This change moves the Tx hang check into the ring flags. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-10-07igb: fix recent VLAN changes that would leave VLANs disabled after resetAlexander Duyck
This patch cleans up several issues with VLANs on igb after the recent changes that were meant to leave the VLANs enabled/disable via the netdev->features flags. Specifically the Rx VLAN settings were being dropped after reset due to the fact that they were not being restored correctly. In addition I removed the IRQ disable/enable since those were in place to protect the setting of vlgrp. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-10-07igb: leave staterr in place and instead us a helper function to check bitsAlexander Duyck
Instead of doing a byte swap on the staterr bits in the Rx descriptor we can save ourselves a bit of space and some CPU time by instead just testing for the various bits out of the Rx descriptor directly. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-10-07igb: retire the RX_CSUM flag and use the netdev flag insteadAlexander Duyck
Since the netdev now has its' own checksum flag to indicate if Rx checksum is enabled we might as well use that instead of using the ring flag. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-10-07igb: cleanup IVAR configurationAlexander Duyck
This change is meant to cleanup some of the IVAR register configuration. igb_assign_vector had become pretty large with multiple copies of the same general code for setting the IVAR. This change consolidates most of that code by adding the igb_write_ivar function which allows us just to compute the index and offset and then use that information to setup the IVAR. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-10-07igb: Move ITR related data into work container within the q_vectorAlexander Duyck
This change moves information related to interrupt throttle rate configuration into a separate q_vector sub-structure called a work container. A similar change has already been made for ixgbe and this work is based off of that. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-10-07igb: Consolidate all of the ring feature flags into a single valueAlexander Duyck
This change moves all of the ring flags into a single value. The advantage to this is that there is one central area for all of these flags and they can all make use of the set/test bit operations. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-10-07igb: avoid unnecessary conversions from u16 to intAlexander Duyck
There are a number of places where we have values that are stored as u16 but are being converted to int unnecessarily. In order to avoid that we should convert all variables that deal with the next_to_clean, next_to_use, and count to u16 values. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-10-07igb: Use node specific allocations for the q_vectors and ringsAlexander Duyck
This change is meant to update the ring and vector allocations so that they are per node instead of allocating everything on the node that ifconfig/modprobe is called on. By doing this we can cut down significantly on cross node traffic. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-10-07igb: push data into first igb_tx_buffer sooner to reduce stack usageAlexander Duyck
Instead of storing most of the data for the TX hot path in the stack until we are ready to write the descriptor we can save ourselves some time and effort by pushing the SKB, tx_flags, gso_size, bytecount, and protocol into the first igb_tx_buffer since that is where we will end up putting it anyway. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-10-07net: Remove unnecessary driver assignments of ethtool_ringparam fields to zeroRick Jones
Per comments from Ben Hutchings on a previous patch, sweep the floors a little removing unnecessary assignments of zero to fields of struct ethtool_ringparam in driver code supporting ethtool -g. Signed-off-by: Rick Jones <rick.jones2@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-10-07igb: consolidate creation of Tx buffer info and data descriptorAlexander Duyck
This change will combine the writes of tx_buffer_info and the Tx data descriptors into a single function. The advantage of this is that we can avoid needless memory reads from the buffer info struct and speed things up by keeping the accesses to the local registers. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-10-06igb: Combine all flag info fields into a single tx_flags structureAlexander Duyck
This change is meant to combine all of the TX flags fields into one u32 flags field so that it can be stored into the tx_buffer_info structure. This includes the time stamp flag as well as mapped_as_page flag info. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-10-06igb: Cleanup protocol handling in transmit pathAlexander Duyck
This change is meant to cleanup the protocol handling in the transmit path so that it correctly offloads software VLAN tagged frames. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-10-06igb: Create separate functions for generating cmd_type and olinfoAlexander Duyck
This change is meant to improve the readability of the driver by separating out the cmd_type configuration and the olinfo configuration into their own functions. By doing this it is much easier to determine which ingredients go into setting up these to portions of the descriptor. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>