aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/igb/igb_main.c
AgeCommit message (Collapse)Author
2009-10-28igb: replace unecessary &adapter->hw with just hw where applicableAlexander Duyck
This patch just cleans up some unecessary references to the adapter->hw member when it has already been placed in a local variable named hw. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28igb: cleanup clean_rx_irq_adv and alloc_rx_buffers_advAlexander Duyck
This patch cleans up some whitespace issues in clean_rx_irq_adv. It also adds NUMA aware page allocation and dma error handling to alloc_rx_buffers_adv. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28igb: cleanup igb xmit frame pathAlexander Duyck
This patch cleans up the xmit frame path for igb to better handle xmit frame errors and avoid null pointer exceptions. It also cleans up some whitespace issues found in the xmit frame path. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28igb: Remove invalid stats countersAlexander Duyck
There are several counters being used like they are static when in fact they are clear on read. In order to prevent the values from being incorrect I am removing the defunct counters. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28igb: cleanup interrupt enablement in regards to msix_otherAlexander Duyck
This patch changes a few things so that instead of firing a link status interrupt directly the get_link_status bit is set and the watchdog is scheduled. In addition the mailbox bit is now only enabled if VFs are enabled. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28igb: change queue ordering for 82576 based adaptersAlexander Duyck
This patch changes the queue ordering for 82576 adapters so that if VFs are enabled the queues will first be allocated out of the PF pool. Any remaining queues will be allocated out of other VMDq pools. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28igb: cleanup code related to ring resource allocation and freeAlexander Duyck
This patch cleans up some of the ring alloc and free code to better handle exceptions such as attempting to free resources on an already freed ring. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28igb: make tx hang check multiqueue, check eop descriptorAlexander Duyck
This change makes the tx hang check run over all tx queues instead of just queue 0. Also have hang display info on EOP descriptor instead of the descriptor at the start of the chain. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28igb: move global_quad_port_a from global into local static defineAlexander Duyck
This change moves global_quad_port_a into igb_probe as a static define since it doesn't actually need to be global. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28igb: only process global stats in igb_update_statsAlexander Duyck
This patch moves the update of adapter->net_stats.rx/tx values out of the interrupt routine and into igb_update_stats by just adding together the tx/rx byte/packet counts for the rings. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28igb: move vf init into a seperate functionAlexander Duyck
This patch moves VF initialization into a seperate function to help improve the readability of igb_probe. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28igb: rework handling of the vfta and vlvf registers in relation to mng_vlanAlexander Duyck
This patch corrects some errors in how vlans are being handled when vfs start interacting with the management vlans. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28igb: rework use of VMOLR in regards to PF and VFsAlexander Duyck
This patch updates the use of the VMOLR to include enabling multicast promiscous for the VFs should they attempt to send over 30 multicast addresses or if they use the new message type to enable multicast promiscuous. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28igb: replace the VF clear_to_send with a flags valueAlexander Duyck
In order to support future features it is easiest to replace the clear_to_send boolean with a flag value. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28igb: use packet buffer sizes from RXPBS registerAlexander Duyck
This patch changes the configuration for 82576 so that it uses the actual value of the 82576 rx packet buffer size instead of just assuming the value. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28igb: cleanup some of the code related to hw timestampingAlexander Duyck
The code for the hw timestamping is a bit bulky and making some of the functions difficult to read. In order to clean things up a bit I am moving the timestamping operations into seperate functions. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28igb: add support for seperate tx-usecs setting in ethtoolAlexander Duyck
This patch adds support for a seperate tx-usecs interrupt moderation setting in ethtool which is supported when tx and rx interrupt vectors are sperated. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28igb: make tx ring map and free functionality non-staticAlexander Duyck
This change makes a minor change to the xmit_frame_ring_adv funcition in that it moves 2 checks from it into the xmit_frame_adv since the checks were not ring specific. In addition it exports the xmit_frame_ring_adv and the unmap_and_free_tx_resource calls so that they can be used by other code such as the ethtool loopback testing calls. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28igb: re-use ring configuration code in ethtool testingAlexander Duyck
Since all of the ring code is now specific to the ring instead of the adapter struct it is possible to cut a large section of code out of the ethtool testing configuraiton since we can just use the existing functions to configure the rings. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28igb: setup vlan tag replication stripping in igb_vmm_controlAlexander Duyck
This update adds vlan tag stripping for inter-vf communications to the igb_vmm_control configuration function. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28igb: delay VF reset notification until after interrupts are enabedAlexander Duyck
This update delays the VF reset notification until after interrupts are enabled. Otherwise there is a chance of having the VF try to reset itself too soon and being ignored by the PF as a result. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28igb: move the multiple receive queue configuration into seperate functionAlexander Duyck
This patch moves the multiple receive queue configuration into a seperate function from igb_configure_rx. We can essentially do the configuration for the multiple receive queues just prior to enabling the RX and this will allow us to seperate the queue enablement from the receive queue layout configuration. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28igb: place a pointer to the netdev struct in the ring itselfAlexander Duyck
This change adds a pointer to the netdev to the ring itself. The idea being at some point in the future it will be possible to support multiple netdevs from a single adapter struct. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28igb: add a flags value to the ringAlexander Duyck
This patch adds a flags value to the ring that cleans up some of the last remaining items from the ring in order to help seperate it from the adapter struct. By implementing these flags it becomes possible for different rings to support different functions such as rx checksumming. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28igb: move alloc_failed and csum_err stats into per rx-ring statAlexander Duyck
The allocation failed and checksum error stats are currently kept as a global stat. If we end up allocating the queues to multiple netdevs then the global counter doesn't make much sense. For this reason I felt it necessary to move the alloc_rx_buff_failed stat into the rx_stats portion of the rx_ring. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28igb: move rx_buffer_len into the ring structureAlexander Duyck
This patch moves the rx_buffer_len value into the ring structure. This allows greater flexibility and the option of doing things such as supporting packet split only on some queues, or enabling virtualization. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28igb: add pci device pointer to ring structureAlexander Duyck
This patch adds a pci device pointer to the ring structure. The main use of this pointer is for memory mapping/unmapping of the rings. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28igb: change the head and tail offsets into pointersAlexander Duyck
Since we are writting to the head/tail pointers frequently we might as well save ourselves some processing time by converting the head and tail offsets directly to pointers. This will shave a few cycles off the rx/tx path and allows us to move one step closer to the rings being a bit more independant of each other. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28igb: move SRRCTL register configuration into ring specific configAlexander Duyck
The SRRCTL register exists per ring. Instead of configuring all of them in the RCTL configuration which is meant to be global it makes more sense to move this out into the ring specific configuration. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28igb: remove rx_ps_hdr_lenAlexander Duyck
This patch removes the rx_ps_hdr_len which isn't really needed since we can now use rx_buffer_len less than 1K to indicate that we are in a packet split mode. We also don't need it since we always use a half page for the data buffers when receiving so we always know the size to map/unmap. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28igb: move the tx and rx ring specific config into seperate functionsAlexander Duyck
This change makes the tx and rx config a bit cleaner by breaking out the ring specific configuration from the generic rx and tx configuration. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28igb: increase minimum rx buffer size to 1KAlexander Duyck
This update increases the minimum rx buffer size to 1K. The reason for this change is to support SR-IOV and avoid any conflicts with the rings being able to set their own MTU sizes. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28igb: remove rx checksum good counterAlexander Duyck
Counting packets with a good checksum can cause a significant amount of cache line bouncing due to the shared counter being written to by all of the queues. In order to avoid this I am removing the counter since we still have the checksum failed counter which will tell us if there are any issues. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28igb: add new data structure for handling interrupts and NAPIAlexander Duyck
Add a new igb_q_vector data structure to handle interrupts and NAPI. This helps to abstract the rings away from the adapter struct. In addition it allows for a bit of consolidation since a tx and rx ring can share a q_vector. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13net: Use netdev_alloc_skb_ip_align()Eric Dumazet
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-07igb: Use the instance of net_device_stats from net_device.Ajit Khaparde
Since net_device has an instance of net_device_stats, we can remove the instance of this from the adapter structure. Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-06igb: add support for 82576NS SerDes adapterAlexander Duyck
This patch adds the device ID necessary to support the 82576NS SerDes adapter. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-06igb: make use of the uta to allow for promiscous mode filterAlexander Duyck
In order to support functions such as vlan tag stripping when SR-IOV is enabled any given packet must match at least one filter. However in the case of promiscous mode being enabled on the PF the traffic routed to it may not match any filters and is just sent to the PF by default. In order to make certain that this traffic is processed we can set all bits in the UTA registers to create a pseudo promiscous mode filter that accepts all packets. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-06igb: add combined function for setting rar and pool bitsAlexander Duyck
This patch adds igb_rar_qsel which sets the mac address and pool bits for a given mac address in the receive address register table. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-02e1000e/igb/ixgbe: Don't report an error if devices don't support AERFrans Pop
The only error returned by pci_{en,dis}able_pcie_error_reporting() is -EIO which simply means that Advanced Error Reporting is not supported. There is no need to report that, so remove the error check from e1000e, igb and ixgbe. Signed-off-by: Frans Pop <elendil@planet.nl> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-09-21trivial: remove unnecessary semicolonsJoe Perches
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-09-14igb: reset sgmii phy at start of initAlexander Duyck
Our SGMII phy code was incomplete in that it was not actually placing the phy in SGMII mode and as a result the PHY was not able to establish a link when connected to a non serdes link partner. This patch updates the code to combine the SGMII/serdes PCS init and to add the necessary reset. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-09-03netdev: Remove redundant checks for CAP_NET_ADMIN in MDIO implementationsBen Hutchings
dev_ioctl() already checks capable(CAP_NET_ADMIN) before calling the driver's implementation of MDIO ioctls. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-09-03igb: set vf rlpml wasn't taking vlan tag into accountAlexander Duyck
This patch updates things so that vlan tags are taken into account when setting the receive large packet maximum length. This allows the VF driver to correctly receive full sized frames when vlans are enabled. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-09-03igb: only disable/enable interrupt bits for igb physical functionAlexander Duyck
The igb_irq_disable/enable calls were causing virtual functions associated with the igb physical function to have their interrupts disabled. In order to prevent this from occuring we should only clear/set the bits related to the physical function. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-09-03igb: add support for set_rx_mode netdevice operationAlexander Duyck
This patch adds support for the set_rx_mode netdevice operation so that igb can better support multiple unicast addresses. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-09-01intel: convert drivers to netdev_tx_tStephen Hemminger
Get rid of some bogus return wrapping as well. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26igb/ixgbe: add IPV6_CSUM support to vlan_featuresAlexander Duyck
We were already exporting TSO6 to the vlan, but we weren't exporting the checksum support for IPV6 which was causing warning messages to be displayed when doing IPv6 TSO over a vlan. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-07-26igb: cleanup flow control configuration to make requested/current more clearAlexander Duyck
This patch cleans up the flow control configuration for igb to make it a bit more readable in regards to what the requested and current modes are. This should help with the maintainability of the current igb driver in regards to flow control. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-07-26igb: use buffer_info->dma instead of shinfo->nr_frags to determine unmapAlexander Duyck
This change makes it so that we use buffer_info->dma instead of shinfo->nr_frags to determine if we need to unmap a received skb. By doing this we can avoid a cache miss on small packets since the buffer_info structure should already be prefetched. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>