Commit Graph

179 Commits (9fadfd1adff28a8895de8df9e8a778c44958840f)

Author SHA1 Message Date
Hannes Eder 678c610b5a drivers/net/igb: remove dead code (function 'igb_read_pci_cfg')
Fix this warning:

  drivers/net/igb/e1000_mac.c:54: warning: 'igb_read_pci_cfg' defined but not used

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-26 00:02:49 -08:00
Neil Horman 908a7a16b8 net: Remove unused netdev arg from some NAPI interfaces.
When the napi api was changed to separate its 1:1 binding to the net_device
struct, the netif_rx_[prep|schedule|complete] api failed to remove the now
vestigual net_device structure parameter.  This patch cleans up that api by
properly removing it..

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-22 20:43:12 -08:00
Jeff Kirsher ea943d41a8 igb: fixup AER with proper error handling
Based on Peter Waskiewicz patch for ixgbe.  Add error handling based on
Hemminger's recommendation.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-11 20:34:19 -08:00
Alexander Duyck 5e8427e5e2 igb: Correctly determine pci-e function number in virtual environment
When running in a virtual environment the ports of an 82575/6 can appear to
be single function devices which is not correct.  To resolve this we rely
on the function number stored in the status 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>
2008-12-10 01:09:53 -08:00
Alexander Duyck b4557be23d igb: update handling of RCTL for smaller buffer sizes
As we begin to move into virtualization the use of a global value for
buffer sizes becomes undesirable.  This change makes it so only 256 and 512
byte buffers require use of the RCTL 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>
2008-12-10 01:08:59 -08:00
Alexander Duyck cb7b48f671 igb/e1000e: Naming interrupt vectors
Change interrupt vector naming to match recent changes from Robert Olsson.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-05 15:08:03 -08:00
Alexander Duyck 40a914fa72 igb: Add support for pci-e Advanced Error Reporting
Add the calls necessary to enable advanced error reporting for igb on
systems with AER 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>
2008-11-27 00:24:37 -08:00
Alexander Duyck 527d47c111 igb: link up/down messages must follow a specific format
The system log messages created on a link status change need to follow a
specific format to work with tools some customers use.

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>
2008-11-27 00:21:39 -08:00
David S. Miller 5b9ab2ec04 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:

	drivers/net/hp-plus.c
	drivers/net/wireless/ath5k/base.c
	drivers/net/wireless/ath9k/recv.c
	net/wireless/reg.c
2008-11-26 23:48:40 -08:00
Alexander Duyck 69d728baf6 igb: loopback bits not correctly cleared from RCTL register
This change forces the bits to 0 by using an &= operation with an inverted
mask of all options instead of using an |= with a value of 0.

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>
2008-11-25 01:04:03 -08:00
Alexander Duyck 9b07f3d315 igb: remove unneeded bit refrence when enabling jumbo frames
There is a reference to a Buffer Size extention bit that is unneded by
82575/82576 hardware.  Since it is not needed it should be removed from the
code.

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>
2008-11-25 01:03:26 -08:00
Qinghuang Feng ece4af18e0 driver/net/*: remove redundant argument comments
remove redundant argument comments in files of drivers/net/*

Signed-off-by: Qinghuang Feng <qhfeng.kernel@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-23 15:46:55 -08:00
Alexander Duyck f5f4cf0846 igb: do not use phy ops in ethtool test cleanup for non-copper parts
Currently the igb driver is experiencing a panic due to a null function
pointer being used during the cleanup of the ethtool looback test on
fiber/serdes parts.  This patch prevents that and adds a check prior to
calling any phy 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>
2008-11-21 21:30:24 -08:00
Stephen Hemminger 008298231a netdev: add more functions to netdevice ops
This patch moves neigh_setup and hard_start_xmit into the network device ops
structure. For bisection, fix all the previously converted drivers as well.
Bonding driver took the biggest hit on this.

Added a prefetch of the hard_start_xmit in the fast path to try and reduce
any impact this would have.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-20 20:14:53 -08:00
Alexander Duyck 68fd991020 igb: Fix tx/rx_ring_count parameters for igb on suspend/resume/ring resize
When suspending the device the ring structure is freed which causes it to
loose track of the count.  To resolve this we need to move the ring count
outside of the ring structure and store it in the adapter struct.

In addition to resolving the suspend/resume issue this patch also addresses
issues seen in the event of memory allocation errors causing uneven ring
sizes on multiple 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>
2008-11-20 00:48:10 -08:00
Alexander Duyck b2d565365e igb: simplify swap in clean_rx_irq if using packet split
This update replaces the xchg calls that were added with a pair of
assignments as there is no need for the xchg calls and they were found to
cause issues on some architectures.

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>
2008-11-20 00:47:34 -08:00
Stephen Hemminger 2e5c69228e igb: convert to net_device_ops
Convert to new network device ops interface. Compile tested only.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-19 22:42:52 -08:00
David S. Miller 198d6ba4d7 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:

	drivers/isdn/i4l/isdn_net.c
	fs/cifs/connect.c
2008-11-18 23:38:23 -08:00
Bjorn Helgaas ac450208de igb: use dev_printk instead of printk
Use dev_printk() instead of printk() to give a little more context
and use consistent format.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-16 01:42:36 -08:00
\"Rafael J. Wysocki\ e1b86d8479 igb: Use device_set_wakeup_enable
Since dev->power.should_wakeup bit is used by the PCI core to
decide whether the device should wake up the system from sleep
states, set/unset this bit whenever WOL is enabled/disabled using
igb_set_wol().  Accordingly, use device_can_wakeup() for checking
if wake-up is supported by the device.

Signed-off-by: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-16 01:35:57 -08:00
Wang Chen 4cf1653aa9 netdevice: safe convert to netdev_priv() #part-2
We have some reasons to kill netdev->priv:
1. netdev->priv is equal to netdev_priv().
2. netdev_priv() wraps the calculation of netdev->priv's offset, obviously
   netdev_priv() is more flexible than netdev->priv.
But we cann't kill netdev->priv, because so many drivers reference to it
directly.

This patch is a safe convert for netdev->priv to netdev_priv(netdev).
Since all of the netdev->priv is only for read.
But it is too big to be sent in one mail.
I split it to 4 parts and make every part smaller than 100,000 bytes,
which is max size allowed by vger.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-12 23:38:14 -08:00
David S. Miller babcda74e9 drivers/net: Kill now superfluous ->last_rx stores.
The generic packet receive code takes care of setting
netdev->last_rx when necessary, for the sake of the
bonding ARP monitor.

Drivers need not do it any more.

Some cases had to be skipped over because the drivers
were making use of the ->last_rx value themselves.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-03 21:11:17 -08:00
Johannes Berg 7c510e4b73 net: convert more to %pM
A number of places still use %02x:...:%02x because it's
in debug statements or for no real reason. Make a few
of them use %pM.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-27 17:47:26 -07:00
Jeff Kirsher 421e02f0e9 igb: add IGB_DCA instead of selecting INTEL_IOATDMA
Add a bool IGB_DCA defined to y if IGB and DCA are enabled, but IGB isn't y while DCA=m.  And thus remove the need to select INTEL_IOATDMA when IGB is enabled, so that non-x86 architectures can build the igb driver.
Based on work/patch from Brice Goglin <brice@myri.com>

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-22 06:54:07 -04:00
Alexander Duyck c54106bb38 igb: fix tx data corruption with transition to L0s on 82575
The 82575 has an issue in which the DMA will go out of sync if the link
partner goes into an L0s state.  To prevent this we set the pci-e link
partner capability bits to disable the L0s transition on the hw.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-22 06:53:59 -04:00
Alexander Duyck 1a32bcfb57 igb: clean up a stray fake netdev code left in rx path
Remove code that was in place to support fake netdev

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 10:08:17 -04:00
Alexander Duyck fc7d345d11 igb: remove unneeded cleaned variable in clean_tx_irq path
The cleaned variable can be replaced by the count of packets cleaned during
the tx interrupt routine so it can be removed.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 10:08:16 -04:00
Alexander Duyck 17fc7004a3 igb: remove 82576 quad adapter
Disable support for device 8086:10E8.  Currently the result of loading the
driver with the device present causes system instability.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-08-27 05:36:12 -04:00
Alexander Duyck 34a20e8973 igb: fix setting the number of tx queues
The real_num_tx_queues was not being set when in MSI-X only mode.  This patch
corrects that path so all interrupt types are correctly configured.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-08-27 05:16:31 -04:00
Alexander Duyck fe59de38c5 igb: ethtool -d reads EICR which is incorrect as it is read on clear
Ethtool -d is reading the EICR and ICR registers which is currently
clearing these registers and masking off interrupts.  To prevent this we
read the EICS and ICS equivilents as they can be read without clearing or
masking.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-08-27 05:16:30 -04:00
Alexander Duyck 7a6ea550f2 igb: force all queues to interrupt once every 2 seconds
Set the EICS bit for each of the RX queues at least once every 2 seconds to
prevent the rx queues from stalling.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-08-27 05:16:27 -04:00
Alexander Duyck a6ef5e9d7d igb: remove igb_init_managability as it is deprecated
igb_init_managability does not actually perform any function as the two
registers it attempts to write are both read only on the host.  This patch
removes the function and all references to it from 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: Jeff Garzik <jgarzik@redhat.com>
2008-08-07 01:55:26 -04:00
Alexander Duyck ec796b4ffc igb: remove three redundant functions left in the code
Three functions were left in the code that are no longer used.  I am removing
these functions just to keep the code clean.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-08-07 01:55:20 -04:00
Alexander Duyck 549bdd84dc igb: correct issue of set_mta member of mac.ops not being populated
The igb_mta_set function was not being correctly used

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-08-07 01:55:16 -04:00
Alexander Duyck 726c09e7b6 igb: fixes 82576 serdes init to correctly support manual flow control changes
This patch changes the PCS configuration for serdes so that the flow
control options change be set via the ethtool -A option.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-08-07 01:55:09 -04:00
Alexander Duyck c743a87eab igb: fix null pointer dereference seen with fiber NICs
With a fiber or serdes NIC installed the driver was causing a null pointer
dereference on driver unload.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-08-07 01:55:05 -04:00
Alexander Duyck 106ef2fef3 igb: fix comments
The internal name was used in comments, replaced with silicon part number.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-08-07 01:55:00 -04:00
Harvey Harrison 25ac3c2483 net: igb_main.c fix sparse integer as NULL pointer warning
drivers/net/igb/igb_main.c:388:20: warning: Using plain integer as NULL pointer

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-07-22 17:54:12 -04:00
Jeff Kirsher d55b53fff0 igb/ixgbe/e1000e: resolve tx multiqueue bug
With the recent changes to tx mutiqueue, igb/ixgbe/e1000e was not calling
netif_tx_start_all_queues() before calling netif_tx_wake_all_queues().
This causes an issue during loading of the driver.

In addition, updated e1000e to use the updated tx mutliqueue api.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-18 04:33:03 -07:00
David S. Miller fd2ea0a79f net: Use queue aware tests throughout.
This effectively "flips the switch" by making the core networking
and multiqueue-aware drivers use the new TX multiqueue structures.

Non-multiqueue drivers need no changes.  The interfaces they use such
as netif_stop_queue() degenerate into an operation on TX queue zero.
So everything "just works" for them.

Code that really wants to do "X" to all TX queues now invokes a
routine that does so, such as netif_tx_wake_all_queues(),
netif_tx_stop_all_queues(), etc.

pktgen and netpoll required a little bit more surgery than the others.

In particular the pktgen changes, whilst functional, could be largely
improved.  The initial check in pktgen_xmit() will sometimes check the
wrong queue, which is mostly harmless.  The thing to do is probably to
invoke fill_packet() earlier.

The bulk of the netpoll changes is to make the code operate solely on
the TX queue indicated by by the SKB queue mapping.

Setting of the SKB queue mapping is entirely confined inside of
net/core/dev.c:dev_pick_tx().  If we end up needing any kind of
special semantics (drops, for example) it will be implemented here.

Finally, we now have a "real_num_tx_queues" which is where the driver
indicates how many TX queues are actually active.

With IGB changes from Jeff Kirsher.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-17 19:21:07 -07:00
David S. Miller 09e83b5d7d netdev: Kill NETIF_F_MULTI_QUEUE.
There is no need for a feature bit for something that
can be tested by simply checking the TX queue count.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-17 19:21:03 -07:00
David S. Miller 070825b384 igb: Kill CONFIG_NETDEVICES_MULTIQUEUE references, no longer exists.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-17 19:20:58 -07:00
Patrick McHardy 78ed11a56b netdrv intel: always enable VLAN filtering except in promiscous mode
Currently VLAN filtering is enabled when the first VLAN is added.
Obviously before that there's no point in receiving any VLAN packets.
Now that we disable VLAN filtering in promiscous mode, we can keep
the VLAN filters enabled the remaining time.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-16 20:16:14 -07:00
Patrick McHardy 746b9f0228 netdrv intel: disable VLAN filtering in promiscous mode
As discussed in this thread:

http://www.mail-archive.com/netdev@vger.kernel.org/msg53976.html

promiscous mode means to disable *all* filters. Currently only unicast
and multicast filtering is disabled. This patch changes all Intel
drivers to also disable VLAN filtering.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-16 20:15:45 -07:00
Alexander Duyck 6eb5a7f1db igb: Improve multiqueue AIM support
Improve multiqueue performance
Change itr_val to reflect ITR timer value instead of ints/sec
Cleaned up AIM algorithms in general

Based on work by Mitch Williams

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-07-11 01:20:33 -04:00
Alexander Duyck 9280fa5201 igb: unused variable warning in igb remove
Wrap hw variable declaration in DCA flags to prevent unused variable
warning during compilation.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-07-11 01:20:33 -04:00
Alexander Duyck a88f10ec7a igb: update suspend resume
Updates the suspend and resume to better handle the possibility of MSIX
vector changes.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-07-11 01:20:33 -04:00
Alexander Duyck d335252027 igb: add support for in kernel LRO
This patch adds support for the use of the inet_lro module to provide
software LRO support.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-07-11 01:20:32 -04:00
Alexander Duyck bf36c1a004 igb: add page recycling support
This patch adds support for page recycling by splitting the page into two
usable portions and tracking the reference count.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-07-11 01:20:32 -04:00
Alexander Duyck 7dfc16fab1 igb: Add support for quad port WOL and feature flags
Change igb from using a series of boolean operators to using a single flags
value that contains a number of different bit flags for all the different
features of the adapter.

This patch also adds WOL support for quad port adapters.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-07-11 01:20:32 -04:00
Alexander Duyck 2d064c06fe igb: add 82576 MAC support
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-07-11 01:20:32 -04:00
Auke Kok 0024fd00cd igb: Increment driver version
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-07-11 01:20:32 -04:00
Auke Kok 87cb7e8cc5 igb: reenable CRC stripping in hardware
We can remove a clunky workaround for not having the hardware
strip the CRC. 82575 silicon as well as the older PCI Express
e1000e hardware all work OK in this respect.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-07-11 01:20:31 -04:00
Jeb Cramer fe4506b6a2 igb: add DCA support
Add DCA support in the similar method that it was added to the ixgbe
driver recently. DCA allows the network device to put data in the
CPU cache and notify the chipset of that event. This reduces cache
misses during receives.

Signed-off-by: Jeb Cramer <cramerj@intel.com>
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-07-11 01:20:31 -04:00
Alexander Duyck e21ed3538f igb: update ethtool stats to support multiqueue
Addesses problems seen earlier with igb driver not correctly reporting rx
and tx stats.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-07-11 01:20:31 -04:00
Peter P Waskiewicz Jr 661086df6c igb: Introduce multiple TX queues with infrastructure
This code adds multiple Tx queue infrastructure much like we
previously did in ixgbe. The MSI-X vector mapping is the bulk of
the change.

IAM can now be safely enabled and we've verified that it does
work correctly. We can also eliminate the tx ring lock.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-07-11 01:20:31 -04:00
Patrick McHardy 38b221957b netdrv: don't truncate VLAN TCI with VLAN stripping
The vlan_hwaccel_{rx,receive_skb} functions expect the full TCI field
for priority mappings, don't truncate the upper 4 bits.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Acked-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-06 20:48:41 -07:00
PJ Waskiewicz 844290e560 igb: add NAPI Rx queue support
Update the NAPI implementation to use the new napi_struct infrstructure.
This removes the need of multiple net_device structs to implement a
multiqueue NAPI.

Signed-off-by: PJ Waskiewicz <peter.p.waskiewicz.jr.@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-07-04 08:47:01 -04:00
Alexander Duyck 662d7205b3 igb: fix init on 82575 with MNG enabled
This patch resolves an issue seen on 82575 adapters with managability
pass-thru enabled, which could cause the system to panic.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-07-04 08:47:00 -04:00
Auke Kok 652fff3214 igb: eliminate hw from the hw_dbg macro arguments
Various cosmetic cleanups. Comment fixes. Eliminate the hw part out
of the hw_dbg macro since it's always used.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-07-04 08:46:59 -04:00
Alexander Duyck d67ce5338c igb: fix parameter options
Currently there are items in the driver to support parameters, but there
are no parameters being added 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: Jeff Garzik <jgarzik@redhat.com>
2008-07-04 08:46:59 -04:00
Jeff Kirsher 733596bea6 igb: cleanup function header comments
Function header comments do not match function name.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-07-04 08:46:58 -04:00
Mitch Williams 3b644cf6ce igb: Remove adapter struct from these function call parameters
Simplify a bunch of calls to these functions by moving the adapter
struct out of the function arguments since that is not needed.

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-07-04 08:46:57 -04:00
Jeff Kirsher 5c3cad754c igb: limit EEPROM access
EEPROM access beyond the base eeprom page is unsupported.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-07-04 08:46:56 -04:00
David S. Miller 332e4af80d Merge branch 'davem-next' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 2008-06-28 21:28:46 -07:00
Taku Izumi 42bfd33ab7 igb: make ioport free
This patch makes igb driver ioport-free.
This corrects behavior in probe function so as not to request ioport
resources as long as they are not really needed.

Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-28 10:23:32 -04:00
David S. Miller 1b63ba8a86 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:

	drivers/net/wireless/iwlwifi/iwl4965-base.c
2008-06-28 01:19:40 -07:00
Jeff Kirsher 3023682e74 igb: fix EEH recovery during reset on PPC
EEH is not recovering in a reasonable amount of time on PPC during
igb_down().

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-27 01:27:47 -04:00
Jeff Kirsher 48f29ffc50 igb: allow vlan devices to use TSO and TCP CSUM offload
Using the new interface for propagating device feature flags into VLAN
deivces, turn on TSO and CSUM offload on VLAN devices.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-11 21:58:42 -04:00
Auke Kok c682fc238a igb: save and restore pcie/msi state to support EEH recovery
To enable EEH support for pci-express network adapters, pcie/msi state
needs to be saved and restored for that adapter.

[after similar patches for ixgbe and e1000e from Wendy Xiong]

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Cc: Wendy Xiong <wendyx@us.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-25 02:08:04 -04:00
Al Viro 6d8126f988 igb trivial annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-25 23:16:03 -04:00
Al Viro 7deb07b1be igb: endianness fix
le16_to_cpu() should be done before mask and shift...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-25 23:16:01 -04:00
Mitch Williams 44b0cda375 igb: Correctly get protocol information
We can't look at the socket to get protocol information. We should
instead look directly at the packet, and hope there are no IPv6
option headers.

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-17 08:11:44 -04:00
Bill Hayes 68707acb5b igb: Fix panic with NICs with 1000BASE-SX PHY
This patch eliminates a kernel panic with the igb driver in 2.6.25-rc2 when
running on a Intel 82575 Ethernet controller with a 1000BASE-SX PHY.  The
panic does not happen with the 1000BASE-T PHY, only with a SX connection.

Signed-off-by: Bill Hayes <bill.hayes@hp.com>
Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-23 23:57:49 -05:00
Andy Gospodarek 6cb5e57701 igb: fix legacy mode irq issue
I booted an igb kernel with the option pci=nomsi and instantly noticed
that interrupts no longer worked on my igb device.  I took a look at the
interrupt initialization and quickly discovered a comment stating:

"DO NOT USE EIAME or IAME in legacy mode"

It seemed a bit odd that bits to enable IAM were being set in legacy
interrupt mode, so I dropped out the following parts and interrupts
began working fine again.

[Updated code flow and a nitpick spelling error --Auke]

Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-23 23:55:01 -05:00
David Graham aa20c6c6d2 igb: PCIe devices do not need to unset MANC_ARP_ENA
Users reported that ARP's were lost with igb. The problem
is fixed by not enabling this manageability configuration
bit.

None of the release_manageability code is actually needed as the
normal device reset during a shutdown returns everthing to
the right condition automatically.

Signed-off-by: David Graham <david.graham@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-15 10:52:11 -05:00
Julia Lawall 030ed68bf0 replace code with FIELD_SIZEOF
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 14:51:40 -05:00
Auke Kok 6d490a7e5b igb: remove unneeded declaration shadowing earlier one
This removes a sparse warning.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-03 04:28:09 -08:00
Auke Kok 9d5c824399 igb: PCI-Express 82575 Gigabit Ethernet driver
We are pleased to announce a new Gigabit Ethernet product and its
driver to the linux community. This product is the Intel(R) 82575
Gigabit Ethernet adapter family. Physical adapters will be available
to the public soon. These adapters come in 2- and 4-port versions
(copper PHY) currently. Other variants will be available later.

The 82575 chipset supports significantly different features that
warrant a new driver. The descriptor format is (just like the
ixgbe driver) different. The device can use multiple MSI-X vectors
and multiple queues for both send and receive. This allows us to
optimize some of the driver code specifically as well compared to
the e1000-supported devices.

This version of the igb driver no lnger uses fake netdevices and
incorporates napi_struct members for each ring to do the multi-
queue polling. multi-queue is enabled by default and the driver
supports NAPI mode only.

All the namespace collisions should be gone in this version too. The
register macro's have been condensed to improve readability.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 15:10:33 -08:00