dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

135 Commits

Author SHA1 Message Date
Alexander Duyck 376801172a igb: this patch addes the sr-iov enablement option via num_vfs parameter
This code adds a module parameter called num_vfs which defines if the
driver should attempt to use sr-iov and if so how many VFs should be
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-02-20 00:22:54 -08:00
Alexander Duyck 4ae196dfd6 igb: Add support for enabling VFs to PF driver.
This patch adds the support to handle requests from the VF to perform
operations such as completing resets, setting/reading mac address, adding
vlans, adding multicast addresses, setting rlpml, and general
communications between the PF and all VFs.

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-02-20 00:22:54 -08:00
Alexander Duyck e173952257 igb: add pf side of VMDq support
Add the pf portion of vmdq support.  This provides enough support so that
VMDq is enabled, and the pf is functional without enabling vfs.

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-02-20 00:22:53 -08:00
Alexander Duyck 1bfaf07bb1 igb: add vfs_allocated_count as placeholder for number of vfs
This is the first step in supporting sr-iov.  The vf_allocated_count value
will be 0 until we actually have vfs present.  In the meantime it
represents an offset value for the start of the queues.

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-02-20 00:22:53 -08:00
Alexander Duyck 46544258de igb: update napi polling to consolidate function and return correct values
igb is currently not returning the correct values for napi.  In addition it
is doing more work than necessary since it will not exit polling until
work_done is equal to zero.

This patch makes the following changes:
1.  Consolidates msi-x and non-msi polling routines.
2.  Corrects return values for polling routines.

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-02-20 00:22:52 -08:00
Hannes Eder 9107584ecd drivers/net/igb: fix sparse warning: symbol shadows an earlier one
Impact: Move variable declaration as far inner as possible.

Fix this sparse warning:
  drivers/net/igb/igb_main.c:1895:21: warning: symbol 'j' shadows an earlier one
  drivers/net/igb/igb_main.c:1855:16: originally declared here

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-18 19:36:04 -08:00
Jeff Kirsher 5fbbcb79e5 igb: remove LRO Kconfig option
To match ixgbe GRO functionality, we remove the LRO (which is now GRO)
Kconfig option which enables GRO by default.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-18 17:56:25 -08:00
Alexander Duyck 85e8d004ec igb: transition driver to only using advanced descriptors
Currently the driver uses advanced descriptors for its main functionality,
but then uses legacy when testing.  This patch changes this so that
advanced descriptors are used throughout and all mentions of legacy
descriptors are removed.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-16 00:00:20 -08:00
Alexander Duyck cbd347adfe igb: remove unused defines
This patch removes all of the unused defines from the .h files contained in
igb.  For some defines there was a use and so I plugged them into the correct
locations.

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-02-15 23:59:44 -08:00
Alexander Duyck bc1cbd3493 igb: misc cleanup to combine one if statement
This patch combines a pair of if statements into one.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
CC: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:56:02 -08:00
Alexander Duyck 56fbbb4e61 igb: cleanup incorrect comment and set IP Checksum Enable
IP Checksum enable doesn't need packet split in order to function.  It only
requires the use of advanced descriptors which the current igb driver does.
So we can enable it always without any issues.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:56:00 -08:00
Alexander Duyck 1e5c3d218a igb: reduce size required to trigger low latency
Update the Adaptive Interrupt Moderation algorithm so that the low latency
state is triggered less easily to prevent high interrupt loads.

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-02-15 23:56:00 -08:00
Alexander Duyck 73cd78f1d3 igb: misc whitespace/formatting cleanups
This patch is intended to hold several whitespace, formatting, and
comment cleanups that have been found while cleaning up the igb driver.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:55:59 -08:00
Patrick Ohly 33af6bcc00 igb: use timecompare to implement hardware time stamping
Both TX and RX hardware time stamping are implemented.  Due to
hardware limitations it is not possible to verify reliably which
packet was time stamped when multiple were pending for sending; this
could be solved by only allowing one packet marked for hardware time
stamping into the queue (not implemented yet).

RX time stamping relies on the flag in the packet descriptor which
marks packets that were time stamped. In "all packet" mode this flag
is not set. TODO: also support that mode (even though it'll suffer
from race conditions).

Signed-off-by: John Ronciak <john.ronciak@intel.com>
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:13:27 -08:00
Patrick Ohly c6cb090ba7 igb: stub support for SIOCSHWTSTAMP
Signed-off-by: John Ronciak <john.ronciak@intel.com>
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:13:25 -08:00
Patrick Ohly 38c845c764 igb: access to NIC time
Adds the register definitions and code to read the time
register.

Signed-off-by: John Ronciak <john.ronciak@intel.com>
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 23:13:25 -08:00
Jesse Brandeburg 593721833d igb: remove dead code in transmit routine
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-07 02:43:18 -08:00
Alexander Duyck 86d5d38fa1 igb: update version number and copyright dates
Update the version number to 1.3.16 and update copyright dates for 2009.

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-02-07 02:43:17 -08:00
Alexander Duyck 265de40908 igb: fix two minor items found during code review
This patch addresses two minor items I found while cleaning up the igb
driver for our sourceforge version.

The first clears the context index if we don't flag that we need it.

The second item is that eims_other should be used instead of bit defines
when setting all of the EICS bits prior to reset.

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-02-07 02:43:16 -08:00
Alexander Duyck 04fe63583d igb: update stats before doing reset in igb_down
It was seen with repeated interface up/down testing that there was a large
stray between the stats reported by the queues and the stats reported by the
HW.  It was found to be an issue in that hw stats were being reset without
first being recorded.  This change records the stats before wiping them from
the system via the reset.

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-02-07 02:43:16 -08:00
Alexander Duyck 450c87c8d2 igb: remove redundant count set and err_hw_init
Remove the setting of ring->count variables from igb_probe as they are
duplicating the same configuration that is done igb_alloc_queues.

Remove the err_hw_init tag as it can be replaced by err_sw_init.

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-02-07 02:43:15 -08:00
Alexander Duyck 8675737a9c igb: remove disable_av variable from mac_info struct
The disable_av variable is never used by the driver and provides no value as
it is likely a leftover debugging variable.  I have removed it and replaced
the one spot that checked for it with a check for a valid address.

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-02-07 02:43:15 -08:00
Alexander Duyck fa4dfae0ce igb: change pba size determination from if to switch statement
As additional hardware is added to the igb driver it is easier to support
the expansion via switch statements instead of using nested ifs.  For
this reason I am changing this to a switch statement.

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-02-07 02:43:14 -08:00
Alexander Duyck a8564f033e igb: move get_hw_control within igb_resume.
Move igb_get_hw_control up so that it is called just after the reset in
igb_resume.  This notifies the HW sooner that the driver is reassuming
control of the device.

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-02-07 02:43:14 -08:00
Alexander Duyck 4a3c6433e4 igb: don't read eicr when responding to legacy interrupts
The interrupt handler was reading eicr and then doing nothing with the
result.  I have removed the variable and the register read since they
provide no value to the legacy interrupt handler.

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-02-07 02:43:13 -08:00
Alexander Duyck 28b0759c22 igb: remove unnecessary adapter->hw calls when just hw-> will do.
There were several spots in the code making calls to adapter->hw when they
could have just been accessing hw-> directly.  I cleaned up the spots where
this was visibly apparent.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-07 02:43:13 -08:00
Alexander Duyck 8a900862a2 igb: rename igb_update_mc_addr_list_82575 to not include the 82575
There isn't much point in having the _82575 hanging off the end of this
function since there aren't any other version of this function running
around within this driver.  This also allows for a bit of whitespace
cleanup due to a shorter function name.

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-02-07 02:43:12 -08:00
Alexander Duyck 4b1a987736 igb: remove redundant timer updates and cleanup watchdog_task
The igb watchdog task is modifying the watchdog timer twice duing a single
run.  It only needs to be called once to reschedule itself for 2 seconds from
the last time it ran.

In addition I removed the allocation of the mac_info structure since it is
only called twice and is easier to access via the e1000_hw 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-02-07 02:43:10 -08:00
Alexander Duyck eebbbdba5e igb: cleanup igb_netpoll to be more friendly with napi & GRO
This patch cleans up igb_netpoll so that it is more friendly with both the
current napi and newly introduced GRO features.

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-02-07 02:43:09 -08:00
Alexander Duyck dda0e0834c igb: add counter for dma out of sync errors
Add a counter for dma out of sync errors reported via interrupt.

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-02-07 02:43:08 -08:00
Alexander Duyck 2753f4cebf igb: update testing done by ethtool
Most of the code for the testing has pretty much become stale at this point
and is need of update.  This update just streamlines most of the code,
widens the range of interrupt testing.

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-02-07 02:43:08 -08:00
Alexander Duyck 7d8eb29e6e igb: update feature flags supported in ethtool
This driver is currently using HW_CSUM which is not correct.  Update this
to use the IP_CSUM and IPV6_CSUM flags.  In addition consolidate the TSO
flag setting.

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-02-07 02:43:07 -08:00
Alexander Duyck 0fbe67af3e igb: remove unused rx_hdr_split statistic
This statistic is not used and so it is safe to remove

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-02-07 02:43:07 -08:00
Alexander Duyck 312c75aee7 igb: rename nvm ops
All of the nvm ops have the tag _nvm added to the end which is redundant
since all of the calls to the ops have to go through the nvm ops struct
anyway.

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-02-07 02:43:06 -08:00
Alexander Duyck a8d2a0c27f igb: rename phy ops
This patch renames write_phy_reg to write_reg and read_phy_reg to read_reg.
It seems redundant to call out phy in an operation that is part of the
phy_ops 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-02-07 02:43:05 -08:00
Alexander Duyck 40a70b3889 igb: read address from RAH/RAL instead of from EEPROM
Instead of pulling the mac address from EEPROM it is easier to pull it from
the RAL/RAH registers and then just copy it into the address structures.

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-02-07 02:43:05 -08:00
Alexander Duyck c1889bfe68 igb: make dev_spec a union and remove dynamic allocation
This patch makes dev_spec a union and simplifies it so that it does not
require dynamic allocation and freeing in the driver.

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-02-07 02:43:04 -08:00
Alexander Duyck 4d6b725e4d igb: add link check function
Add a link check function to contain all activities related to verifying
that the link is present.  The current approach is a bit cludgy and needs
to be cleaned up.

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-02-07 02:43:04 -08:00
Alexander Duyck aed5dec370 igb: remove check for needing an io port
Since igb supports only pci-e nics and there is no plan to support any
legacy pci parts in the driver there isn't really much need for checking to
see if an io port is needed.

In the unlikely event that we do begin supporting legacy pci parts then we
can see about adding this code back to the driver.

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-02-07 02:43:03 -08:00
Alexander Duyck 83b7180d0d igb: move initialization of number of queues into set_interrupt_capability
This patch moves the initialization of the number of queues into
set_interrupt_capability.  This allows the number of queues to increase in
the unlikely event that the system initially fails to allocate enough msi-x
interrupts, does a suspend/resume, and then can allocate enough interrupts
on resume.

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-02-07 02:43:02 -08:00
Alexander Duyck db76176215 igb: move setting of buffsz out of repeated path in alloc_rx_buffers
buffsz is being repeatedly set when allocaing buffers.  Since this value
should only need to be set once in the function I am moving it out of the
looped portion of the 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-02-07 02:43:02 -08:00
Alexander Duyck 69d3ca5357 igb: optimize/refactor receive path
While cleaning up the skb_over panic with small frames I found there was
room for improvement in the ordering of operations within the rx receive
flow.  These changes will place the prefetch for the next descriptor to a
point earlier in the rx 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-02-07 02:43:01 -08:00
David S. Miller b3ff29d2cc Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	drivers/net/Kconfig
2009-02-03 00:15:35 -08:00
Harvey Harrison 09640e6365 net: replace uses of __constant_{endian}
Base versions handle constant folding now.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-01 00:45:17 -08:00
Alexander Duyck 5d0932a5dd igb: fix link reporting when using sgmii
When using sgmii the link was not being properly passed up to the driver
from the underlying link management functions.  This change corrects it so
that get_link_status is cleared when a link has been found.

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-01-31 00:53:18 -08:00
Alexander Duyck ec54d7d6e4 igb: prevent skb_over panic w/ mtu smaller than 1K
A panic has been observed with frame sizes smaller than 1K.  This has been
root caused to the hardware spanning larger frames across multiple buffers
and then reporting the original frame size in the first descriptor.  To
prevent this we can enable set the LPE bit which in turn will restrict
packet sizes to those set in the RLPML register.

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-01-31 00:52:57 -08:00
Alexander Duyck bbd98fe48a igb: Fix DCA errors and do not use context index for 82576
82576 was being incorrectly flagged as needing a context index.  It does not as
each ring has it's own table of 2 contexts.

Driver was registering after registering the driver instead of the other way around.

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-01-31 00:52:30 -08:00
David S. Miller 0c8dfc830a net: Add skb_record_rx_queue() calls to multiqueue capable drivers.
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-27 16:22:32 -08:00
Alexander Duyck 921aa74912 igb: make certain to power on optics for 82576 fiber nics
It appears that a step was missed in the initialization of 82576 fiber nics
that resulted in it not powering on the optics.

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-01-21 14:42:28 -08:00
Alexander Duyck 5851765cca igb: igb should not flag lltx
Igb has flags enabling lltx but this is a holdover from the earlier
e1000 driver which the igb driver was based off of.

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-01-21 14:42:07 -08:00