1
0
Fork 0
Commit Graph

338 Commits (61321bbd6235ca9a40ba3bc249e8906cc66233c3)

Author SHA1 Message Date
Peter P Waskiewicz Jr 8756924c1e ixgbe: When in DCB mode with PFC enabled, show LFC is disabled
Ethtool should report that link flow control is disabled when in priority
flow control mode.

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: David S. Miller <davem@davemloft.net>
2009-05-17 21:04:14 -07:00
Peter P Waskiewicz Jr 264857b8fe ixgbe: Allow link flow control in DCB mode for 82599 adapters
82599 supports using either link flow control or priority flow control when
in DCB mode.  The dcbnl interface already supports sending down
configurations through rtnetlink that can enable LFC when DCB is enabled,
so the driver should take advantage of this.

82598 does not support using LFC when DCB is enabled, so explicitly disable
it when we're in DCB mode.  This means we always run in PFC mode when DCB
is enabled.

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: David S. Miller <davem@davemloft.net>
2009-05-17 21:04:13 -07:00
Peter P Waskiewicz Jr 70b77628d8 ixgbe: Set Priority Flow Control low water threshhold for DCB
This sets the low water threshhold for priority flow control for 82598
and 82599 controllers in DCB mode.

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: David S. Miller <davem@davemloft.net>
2009-05-17 21:04:13 -07:00
Yi Zou 63f39bd17a ixgbe: Enable jumbo frame for FCoE feature in 82599
Enable jumbo frame when FCoE feature is enabled in 82599. Use 3K
as the receive queue buffer size for receive queues used by FCoE
to address for max Fiber Channel frame size as 2148 bytes (with
max 2112 bytes of payload).

Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-17 21:04:10 -07:00
Yi Zou 29ebf6f8c8 ixgbe: Enable FCoE redirection table feature in 82599
Enable using FCoE redirection table feature in 82599. The FCoE
redirection table has maximum of eight entries, corresponding
to maximum of eight receive queues to be used for distributing
incoming FCoE packets. This patch sets up the FCoE redirection
table when multiple receive queues are available for FCoE.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-17 21:04:10 -07:00
Yi Zou 0331a832a8 ixgbe: Add RING_F_FCOE for FCoE feature in 82599
Add ring feature for FCoE to make use of the FCoE redirection
table in 82599. The FCoE redirection table is a receive side
scaling feature for Fiber Channel over Ethernet feature in 82599,
enabling distributing FCoE packets to different receive queues
based on the exchange id.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-17 21:04:09 -07:00
Waskiewicz Jr, Peter P aca6bee75f ixgbe: Add SAN MAC address to the RAR, return the address to DCB
After acquiring the SAN MAC address from the EEPROM, we need to program it
into one of the RARs.  Also, DCB will use this MAC address to run DCBX
commands, so it doesn't have to play musical MAC addresses when things like
bonding enter the picture.  So we need to return the MAC address through
the netlink interface to userspace.

This also moves the init_rx_addrs() call out of start_hw() and into
reset_hw().  We shouldn't try to read any of the RAR information before
initializing our internal accounting of the RAR table, which was what
was happening.

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: David S. Miller <davem@davemloft.net>
2009-05-17 21:04:07 -07:00
PJ Waskiewicz 0365e6e437 ixgbe: Add FCoE Storage MAC Address support
This patch implements the Storage Address entrypoint from the net device.
It will read the SAN MAC addresses from the EEPROM of the 82599 hardware,
and make them available to the FCoE stack through the net device.

Also, add/del the SAN MAC address to the netdev dev_addr_list via the
kernel api dev_addr_add()/dev_addr_del() when there is a valid SAN MAC
supported by the HW.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-17 21:04:07 -07:00
Yi Zou 6d45522c53 ixgbe: Add FCoE related statistics to 82599
This adds FCoE related statistics to 82599, including number Rx-ed and Tx-ed
FCoE packets, number of Rx-ed and Tx-ed FCoE packets in dwords, number of bad
Fiber Channel CRCs detected in FCoE packets, and number of FCoE packets dropped
on the Rx side.

Signed-off-by: Yi Zou <yi.zou@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-05-17 12:00:09 -07:00
Yi Zou 332d4a7d98 ixgbe: Implement FCoE Rx side large receive offload feature to 82599
This patch implements the FCoE Rx side offload feature in ixgbe_main.c
to 82599 using the Rx offload infrastructure code added in the previous
patch. The large receive offload by Direct Data Placement (DDP) for
FCoE is achieved by implementing the ndo_fcoe_ddp_setup and ndo_fcoe_ddp_done
in net_device_ops via netdev. It is up to the ULD, i.e., fcoe and libfc
to query and setup large receive offload accordingly through the corresponding
netdev upon creating fcoe instances.

Signed-off-by: Yi Zou <yi.zou@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-05-17 12:00:08 -07:00
Yi Zou d0ed89373f ixgbe: Add infrastructure code for FCoE large receive offload to 82599
This adds infrastructure code for FCoE Rx side offload feature to
82599, which provides large receive offload for FCoE by Direct
Data Placement (DDP). The ixgbe_fcoe_ddp_get() and ixgbe_fcoe_ddp_put()
pair corresponds to the netdev support to FCoE by the function pointers
provided in net_device_ops as ndo_fcoe_ddp_setup and ndo_fcoe_ddp_done.
The implementation of these in ixgbe is shown in the next patch.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: Chris Leech <christopher.leech@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-17 12:00:07 -07:00
Yi Zou eacd73f79a ixgbe: Implement FCoE Tx side offload features in base driver of 82599
This patch implements the FCoE Tx side offload features in ixgbe_main.c
to 82599 using the Tx offload infrastructure code added in the previous
patch. This is achieved by the calling the FCoE Sequence Offload (FSO)
function ixgbe_fso() on the transmit path of ixgbe.

This patch also includes an EEPROM check to make sure the NIC we're loading
on is an offload-enabled SKU.

Signed-off-by: Yi Zou <yi.zou@intel.com>
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: David S. Miller <davem@davemloft.net>
2009-05-17 12:00:04 -07:00
Yi Zou bc079228e7 ixgbe: Add infrastructure code for FCoE large send offload to 82599
This adds infrastructure code for FCoE Tx side offload feature to
82599, including Fiber Channel CRC calculation, auto insertion of
the start of frame (SOF) and end of frame (EOF) of FCoE packets,
and large send by FCoE Sequence Offload (FSO).

Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-17 12:00:03 -07:00
Yi Zou d3a2ae6d31 ixgbe: Add FCoE feature code to 82599
This adds the FCoE feature code ixgbe_fcoe.c to 82599. For a start, this patch
only adds ixgbe_configure_fcoe() to configure related register for FCoE to 82599.
In patches that follow, I will be adding more functions to ixgbe_fcoe.c to add
support of FCoE offload features to 82599.

Signed-off-by: Yi Zou <yi.zou@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-05-17 12:00:02 -07:00
Yi Zou e92cbeac89 ixgbe: Add FCoE feature header to 82599
This adds the FCoE feature header ixgbe_fcoe.h to 82599. This header includes
the defines and structures required by the ixgbe driver to support various
offload features in 82599 for Fiber Channel over Ethernet (FCoE).  These offloads
features include Fiber Channel CRC calculation, FCoE SOF/EOF auto insertion,
FCoE Sequence Offload (FSO) for large send, and Direct Data Placement (DDP)
for large receive.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-17 12:00:01 -07:00
Yi Zou bff66176bb ixgbe: Add FCoE feature register defines to 82599
This adds FCoE related register defines to 82599.

Signed-off-by: Yi Zou <yi.zou@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-05-17 11:59:57 -07:00
Nelson, Shannon c9c7d2e5a0 ixgbe: Typecase '1' for 64 bit shift
Make sure we don't get any sign-extend issues when we shift a 1
into bit 31.

Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-07 14:52:32 -07:00
Don Skidmore bf069c9726 ixgbe: fix failing to log fan failures
We weren't logging the 82598AT fan failure if it occurred before (ixgbe_open)
as we hadn't sent up to catch the interrupt that event caused.

This patch checks for this failure in:
ixgbe_probe - So we can log the failure asap. We check right after we
set up the adapter->flags, which is when we know that we have a fan.
ixgbe_up_complete - To catch failures that may have happened between probe
and when we set up the interrupt that would normally detect the fan failure.

To enable all of this we need to initialize the adapter flag with
IXGBE_FLAG_FAN_FAIL_CAPABLE when the NIC contained a fan.

Signed-off-by: Don Skidmore <donald.c.skidmore@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-05-07 14:52:31 -07:00
Yi Zou dfa12f05f6 ixgbe: Enable L2 header split in 82599
This enables L2 header split when packet split is enabled for 82599.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-07 14:52:30 -07:00
Alexander Duyck 163de42e24 ixgbe: set queue0 for srrctl configuration correctly for DCB
The current configuration is not setting queue 0 correctly for DCB
configurations.  As a result unconfigured queues are being used to setup
the SRRCTL register rx buffer len 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-05-07 14:52:30 -07:00
Alexander Duyck afafd5b020 ixgbe: always set header length in SRRCTL
As per the documentation for 82599 in order to support hardware RSC the
header size must be set.  This is only currently done for packet split
mode.  This patch sets the header buffer length for all modes.

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-05-07 14:52:29 -07:00
gouji-new 9ce77666da ixgbe: Proposed PARCH PCIE legacy I/O port free intel 10Gb NIC driver
Traditionally Intel based NIC drivers request I/O port even though it
doesn't need that really.

Intel PCIE 10Gb driver (ixgbe) also requests I/O port but it doesn't
need it either.

This is a little inconvenient situation because sometimes we have to
handle those cards on the slots where any I/O space is not attached.

So we made pach which makes ixgbe driver legacy I/O port free.

Signed-off-by: Masayuki Gouji <gouji.masayuki@jp.fujitsu.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-06 15:33:47 -07:00
Breno Leitao 3044b8d1ff ixgbe: Return PCI_ERS_RESULT_DISCONNECT when bus is disabled
According to the "PCI Error Recovery" document, if after a recovery,
the bus is disabled, the error_detected function should return
PCI_ERS_RESULT_DISCONNECT. Actually ixgbe error_detected function is
always returning PCI_ERS_RESULT_NEED_RESET, even if the bus is in failure.
This patch just check if the bus is disabled and then returns
PCI_ERS_RESULT_DISCONNET.

Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-06 15:33:47 -07:00
Alexander Duyck 2012bdc8a5 ixgbe: remove ixgbe_napi_add/del_all references
There were still some references to napi_add/del_all left after the dynamic
vector allocation patch.  This patch removes those references since the
ixgbe_napi_add/del_all calls are no longer needed as the napi struct is
added when the vector is created, and deleted when the vector is freed.

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-05-06 15:33:46 -07:00
Alexander Duyck fdaff1ceac ixgbe: skb_record_rx_queue should record rx queue instead of vector
currently ixgbe_receive_skb is passing the vector index to
skb_record_rx_queue instead of the queue index.  This patch changes that so
that the ring index is passed instead.

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-05-06 15:33:46 -07:00
Alexander Duyck 7a921c9362 ixgbe: make q_vectors dynamic to reduce netdev size
Currently the q_vectors are being allocated statically inside of the
adapter struct.  This increases the overall size of the adapter struct when
we can easily allocate the vectors dynamically.  This patch changes that
behavior so that the q_vectors are allocated dynamically and the napi
structures are automatically allocated inside of the q_vectors as needed.

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-05-06 15:33:45 -07:00
David S. Miller aba7453037 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	Documentation/isdn/00-INDEX
	drivers/net/wireless/iwlwifi/iwl-scan.c
	drivers/net/wireless/rndis_wlan.c
	net/mac80211/main.c
2009-04-29 20:30:35 -07:00
Ben Hutchings 6b73e10d2d ixgbe: Use generic MDIO definitions and functions
Compile-tested only.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-04-29 17:32:33 -07:00
Don Skidmore dd4d8ca644 ixgbe: Use pci_wake_from_d3() instead of multiple pci_enable_wake()
We were calling pci_enable_wake() twice in a row for both D3_hot
and D3_cold.  This replaces those calls with a call to pci_wake_from_d3()
to avoid issues with PCI PM vs ordering constraints.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-04-29 00:22:31 -07:00
Nelson, Shannon bc59fcda67 ixgbe: Clear out stray tx work on link down
Ayyappan at VMware noticed that we're missing this check from ixgbe which
is in our other drivers.  The difference with this implementation from our
other drivers is that this checks all the tx queues rather than just tx[0].

Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-04-28 01:53:17 -07:00
Nelson, Shannon 835462fc5d ixgbe: Interrupt management update for 82599
Update the interrupt management to correctly handle greater
than 16 queue vectors.

Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-04-28 01:53:16 -07:00
Alexander Duyck f8212f979f ixgbe: enable HW RSC for 82599
This patch enables hardware receive side coalescing for 82599 hardware.
82599 can merge multiple frames from the same TCP/IP flow into a single
structure that can span one ore more descriptors.  The accumulated data is
arranged similar to how jumbo frames are arranged with the exception that
other packets can be interlaced inbetween.  To overcome this issue a next
pointer is included in the written back descriptor which indicates the next
descriptor in the writeback sequence.

This feature sets the NETIF_F_LRO flag and clearing it via the ethtool set
flags operation will also disable hardware RSC.

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-04-28 01:53:16 -07:00
Jesse Brandeburg 45a5ead022 ixgbe: enable hardware offload for sctp
Inspired by: Vlad Yasevich <vladislav.yasevich@hp.com>

This is the code to enable ixgbe for hardware offload support
of CRC32c on both transmit and receive of SCTP traffic.

only 82599 supports this offload, not 82598.

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-04-28 01:53:15 -07:00
Alexander Duyck 182ff8dfdb igb/ixgbe: remove unecessary checks for CHECKSUM_UNNECESSARY
Both of these drivers do a check to verify ip_summed is set to
CHECKSUM_UNNECESSARY prior to passing the packet to GRO.  GRO itself
already does such a check so it is redundant and can be removed as this
will likely cause out of order issues when receiving a packet that didn't
pass checksum validation.

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-04-28 01:53:13 -07:00
Waskiewicz Jr, Peter P fa466e91bd ixgbe: Disallow SFP 1G modules in the SFP+ cages for 82598 and 82599
82598 and 82599 do not support SFP 1G modules.  Instead of allowing the
driver to load, but never get link, rejecting the module and displaying
a useful message is more preferrable.  The framework for displaying the
failure message already exists, now we just need to detect and reject the
SFP modules.

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: David S. Miller <davem@davemloft.net>
2009-04-27 03:15:42 -07:00
Waskiewicz Jr, Peter P 495dce123c ixgbe: Fix WoL functionality for 82599 KX4 devices
The current code writes the PME enabled bit in PCI config space which is
wrong.  This was needed for pre-release hardware, and was not removed from
the driver.  Also, we need to clear the WUS (wake up status) after we
resume.  Otherwise we can't wake for the same event again since it's still
asserted in the hardware.  Plus, the multicast lists were being written
improperly, causing multicast WoL to fail.

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: David S. Miller <davem@davemloft.net>
2009-04-27 03:14:48 -07:00
David S. Miller e5e9743bb7 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	net/core/dev.c
2009-04-21 01:32:26 -07:00
Jesse Brandeburg 5438646724 ixgbe: fix link down initial state
As reported by Andrew Lutomirski <amluto@gmail.com>

All the intel wired ethernet drivers were calling netif_carrier_off
and netif_stop_queue (or variants) before calling register_netdevice

This is incorrect behavior as was pointed out by davem, and causes
ifconfig and friends to report a strange state before first link
after the driver was loaded, since without a netif_carrier_off, the stack
assumes carrier_on, but before register_netdev, netlink messages are not
sent out telling link state.

This apparently confused *some* versions of networkmanager.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Reported-by: Andrew Lutomirski <amluto@gmail.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-04-20 02:00:37 -07:00
PJ Waskiewicz 2f3889f42e ixgbe: Fix the DCB PFC thresholds for 82599
The thresholds for the DCB priority flow control are incorrect for 82599.
This fixes the thresholds to be correct.

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: David S. Miller <davem@davemloft.net>
2009-04-17 01:16:28 -07:00
PJ Waskiewicz f92ef20298 ixgbe: Fix DCB traffic class mapping for 82599
The traffic classes in hardware are not symmetrical for Rx and Tx.  Rx
is every 16 descriptor queues, Tx is not.  It runs 32-32-16-16-8-8-8 when
running with 8 traffic classes, and runs 64-32-16 when running with 4
traffic classes.  This patch fixes the mapping.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Cc: stable@kernel.org
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-04-17 01:16:28 -07:00
David S. Miller a54bfa40fd Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-04-16 17:35:26 -07:00
Tony Breeds 2238aff5bb ixgbe: Be explict with what we are !'ing in ixgbe_sfp_config_module_task()
GCC warns:
drivers/net/ixgbe/ixgbe_main.c: In function 'ixgbe_sfp_config_module_task':
drivers/net/ixgbe/ixgbe_main.c:3920: warning: suggest parantheses around
operand of '!' or change '&' to '&&' or '!' to '~'

Which I think is right.  Bracket to remove ambiguity.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-04-16 16:27:23 -07:00
Rafael J. Wysocki 9d8d05ae66 NET/ixgbe: Fix powering off during shutdown
Prevent ixgbe from putting the adapter into D3 during shutdown except when
we're going to power off the system, since doing that may generally cause
problems with kexec to happen (such problems were observed for igb and
forcedeth).  For this purpose seperate ixgbe_shutdown() from ixgbe_suspend()
and use the appropriate PCI PM callbacks in both of them.

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>
2009-04-16 02:15:25 -07:00
Wu Fengguang af22ab1bd2 ixgbe: update real_num_tx_queues on changing num_rx_queues
Move the update of real_num_tx_queues from
ixgbe_acquire_msix_vectors() to ixgbe_set_num_queues(), to ensure it
be always in sync with num_tx_queues.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-04-14 21:54:07 -07:00
Wu Fengguang 95615d90a3 ixgbe: fix tx queue index
Don't do the num_tx_queues based masking on calculating tx queue
index.

 1) num_tx_queues is not always power-of-2, because it also depends on
    the online cpu numbers. So the masking could be a performance bug
    on a 6 cpu system.
 2) queue_mapping will be limited by real_num_tx_queues=num_tx_queues
    in the generic netdev function set_cur_queue_map(). So the bound
    limiting here is not necessary.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-04-14 21:53:48 -07:00
Tony Breeds 8d1c3c0746 ixgbe: Be explict with what we are !'ing in ixgbe_sfp_config_module_task()
GCC warns:
drivers/net/ixgbe/ixgbe_main.c: In function 'ixgbe_sfp_config_module_task':
drivers/net/ixgbe/ixgbe_main.c:3920: warning: suggest parantheses around
operand of '!' or change '&' to '&&' or '!' to '~'

Which I think is right.  Bracket to remove ambiguity.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-04-11 02:48:03 -07:00
Peter P Waskiewicz Jr 04193058c1 ixgbe: Update get_physical_layer() calls, plus a version bump
Not all physical connection types are being correctly identified.  This
fixes that issue, and cleans up the logic to make it more maintainable.

Also clean up the code for device capabilities from the EEPROM to support
multiple SKUs of the same hardware.

Bump the version to reflect all the updates since the 82599 merge.

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: David S. Miller <davem@davemloft.net>
2009-04-11 02:48:02 -07:00
PJ Waskiewicz 1eb99d5ac4 ixgbe: Update the usage of orig_autoc to be more consistent
The orig_autoc variable tracks the original setting of the autonegotiate
state prior to trying a new speed.  The usage is inconsistent and not very
maintainable.  This patch updates the usage to make it more consistent.

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: David S. Miller <davem@davemloft.net>
2009-04-11 02:48:01 -07:00
PJ Waskiewicz 553b449784 ixgbe: Remove unnecessary PHY reset, properly identify multispeed fiber modules
This patch does two things:
1) On 82599, the PHY is emedded in the MAC.  On 82598, the SFP+ NIC has an external PHY.  The reset in the SFP+ setup patch for 82598 is unnecessary on 82599, and adds extra dead time to device initialization.  This removes that PHY reset for 82599 only.

2) On 82599, the SFP+ modules are multispeed fiber modules (10G/1G).  We need to make sure to identify them properly for the remaining init sections to properly set them up.

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: David S. Miller <davem@davemloft.net>
2009-04-11 02:48:01 -07:00
PJ Waskiewicz 04f165ef4f ixgbe: Move PHY ops initialization to centralize bus accesses
When PHY operations are determined, the PHY must be identified.  This
identification causes bus access, and should be contained within its own
routines.  This also helps the 82599 PHY init paths for both SFP+ and
KX/KX4 devices to be easier to maintain.

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: David S. Miller <davem@davemloft.net>
2009-04-11 02:48:00 -07:00
PJ Waskiewicz d3e9c56caf ixgbe: Don't return error in flow control configuration if FC is off
When flow control is disabled, an invalid low/high watermark configuration
should not matter.

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: David S. Miller <davem@davemloft.net>
2009-04-11 02:48:00 -07:00
Don Skidmore e80e887a95 ixgbe: add define to support 82599 64 IVAR registers
82599 supports 64 IVAR registers this patch adds a define to
allow us to access them.

Signed-off-by: Don Skidmore <donald.c.skidmore@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-04-11 02:47:59 -07:00
Don Skidmore 6e4e87d68a ixgbe: add support for addition VT_CTL defines
These defines allow for definition of target pool for packets that
pass L2 filtering but didn't pass any of the pool filters.  They are
needed to reset the default pool.

Signed-off-by: Don Skidmore <donald.c.skidmore@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-04-11 02:47:58 -07:00
Don Skidmore d988eadbe2 ixgbe: fix IXGBE_MTQC values
IXGBE_MTQC_64VF was wrong and 32VF not defined at all.  This patch
corrects that.

Signed-off-by: Don Skidmore <donald.c.skidmore@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-04-11 02:47:58 -07:00
PJ Waskiewicz 2132d38133 ixgbe: Enable another bit for flow control operation
The discard pause frames bit was not enabled, so flow control frames could
be passed up to the host.  Enabled DPF to keep the frames off the stack.

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: David S. Miller <davem@davemloft.net>
2009-04-11 02:47:57 -07:00
Alexander Duyck d6c519e129 ixgbe: only allow WOL for 82599 KX4 NIC
All NICs were reporting WOL support when only the KX4 NIC is capable of
supporting WOL.  This patch adds a function to check for and exclude all
non-WOL capable nics from enabling WOL in ethtool.

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-04-11 01:43:14 -07:00
PJ Waskiewicz 87c1201708 ixgbe: Move the LED blink code to common, since 82599 also uses it
The LED blink code is common for 82599 as well.  It should be moved to
ixgbe_common.c so both devices can use it, and not have it duplicated.

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: David S. Miller <davem@davemloft.net>
2009-04-11 01:43:12 -07:00
Yang Hongyang 284901a90a dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)
Replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)

Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-07 08:31:11 -07:00
Yang Hongyang 6a35528a83 dma-mapping: replace all DMA_64BIT_MASK macro with DMA_BIT_MASK(64)
Replace all DMA_64BIT_MASK macro with DMA_BIT_MASK(64)

Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-07 08:31:10 -07:00
Mallikarjuna R Chilakala f9ed88549e ixgbe: Fix potential memory leak/driver panic issue while setting up Tx & Rx ring parameters
While setting up the ring parameters using ethtool the driver can
panic or leak memory as ixgbe_open tries to setup tx & rx resources.
The updated logic will use ixgbe_down/up after successful allocation of
tx & rx resources

Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
CC: stable@kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-04-02 01:02:33 -07:00
Don Skidmore 71fd570b23 ixgbe: fix ethtool -A|a behavior
We were basicly ignoring ethtool users request for FC autoneg
and replying to queries with a "best guess".  This patch
enables the driver to store if we want to enable/disable
autoneg FC and do the correct behavior.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-04-02 01:02:32 -07:00
Mallikarjuna R Chilakala a20a1199a8 ixgbe: Patch to fix driver panic while freeing up tx & rx resources
When network interface is made active we were not handling the error
scenarios properly to clean up rx & tx resources which might result in
a driver panic.

Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@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-04-02 01:02:32 -07:00
Alexander Duyck 44df32c592 ixgbe: refactor tx buffer processing to use skb_dma_map/unmap
This patch resolves an issue with map single being used to map a buffer and
then unmap page being used to unmap it.  In addition it handles any error
conditions that may be detected using skb_dma_map.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@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-04-02 01:02:31 -07:00
PJ Waskiewicz 8be0e4671d ixgbe: Fix 82598 MSI-X allocation on systems with more than 8 CPU cores
MSI-X allocation broke after the 82599 merge on systems with more than 8
CPU cores.  82598 drops back into MSI mode, which isn't sufficient to run
full, efficient 10G line rate.

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: David S. Miller <davem@davemloft.net>
2009-04-02 01:02:31 -07:00
Don Skidmore cd7664f69f ixgbe: feature - driver to default with FC on.
In the past flow control wasn't enabled by default under the
incorrect assumption that this opened up us to a denial of
service attack.  However since any switch that forwarded flow
control would be extremely msiconfigured and/or buggy, this
concern no longer out weighs the preformance gains from
having FC enabled.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Acked-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@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-04-02 01:02:30 -07:00
PJ Waskiewicz ea4af4f447 ixgbe: Fix DCB netlink layer for 82599 to enable Priority Flow Control
The priority flow control settings from the netlink layer aren't taking
effect in the base driver.  The boolean pfc_mode_enable in the dcb_config
struct isn't being set, so the hardware configuration code is never
reached.

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: David S. Miller <davem@davemloft.net>
2009-04-02 01:02:28 -07:00
Don Skidmore 7c5b83230a ixgbe: Fix ethtool output with advertised mode.
Ethtool tries to get advertised speed from phy.autoneg_advertised.
However for copper media this wasn't happening until later do to
an other fix which moved mac.ops.setup_link_speed placement in
ixgbe_link_config(). This patch will display the default advertised
speeds if it can't yet get this information from phy.autoneg_advertised.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Acked-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@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-04-02 01:02:27 -07:00
Alexander Duyck b453368dfd ixgbe: fix build when DEBUG is defined
The ixgbe driver had issues when DEBUG was defined because the hw_dbg macro
was incomplete.  This patch completes the code based off of the code that
already existed in the igb module.

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-04-02 01:02:27 -07:00
PJ Waskiewicz bb3daa4a59 ixgbe: Allow Priority Flow Control settings to survive a device reset
When changing DCB parameters, ixgbe needs to have the MAC reset.  The way
the flow control code is setup today, PFC will be disabled on a reset.
This patch adds a new flow control type for PFC, and then has the netlink
layer take care of toggling which type of flow control to enable.

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: David S. Miller <davem@davemloft.net>
2009-03-26 01:13:51 -07:00
Stephen Hemminger 09a3b1f8b1 ixgbe: fix select_queue management
Convert ixgbe to use net_device_ops properly.
Rather than changing the select_queue function pointer
just check the flag.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-21 13:40:01 -07:00
Jesse Brandeburg 22d5a71b50 ixgbe: Fixup the watchdog interrupt scheduling on 82599
The watchdog will schedule an interrupt to help make sure queues are
cleaned in the case when an interrupt is missed, most likely due to very
high load.  On 82599, there are extra interrupt registers to account for
the larger number of MSI-X vectors (64 total for 82599 vs. 18 total for
82598).  These must be taken into account when performing this operation in
the watchdog.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
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: David S. Miller <davem@davemloft.net>
2009-03-20 01:17:29 -07:00
PJ Waskiewicz e63d976292 ixgbe: Correctly report Wake On LAN for 82599 KX4 devices
ethtool isn't reporting the support level of WoL for 82599 KX4 devices.
While the device does support WoL, ethtool was never updated to properly
report the level of support, nor will it allow ethtool to modify the type
of packets to listen for.

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: David S. Miller <davem@davemloft.net>
2009-03-20 01:17:27 -07:00
PJ Waskiewicz 03cfa20548 ixgbe: Fix PCI bus reporting on driver load for 82598 after 82599 merge
82598's PCI bus reporting on driver load was broken after 82599 merged.
This results in incorrect reporting, and an erroneous warning message
that the 82598 is in a PCIe slot that isn't fast enough to run 10GbE.

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: David S. Miller <davem@davemloft.net>
2009-03-20 01:17:25 -07:00
David S. Miller 2d6a5e9500 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	drivers/net/igb/igb_main.c
	drivers/net/qlge/qlge_main.c
	drivers/net/wireless/ath9k/ath9k.h
	drivers/net/wireless/ath9k/core.h
	drivers/net/wireless/ath9k/hw.c
2009-03-17 15:01:30 -07:00
Jesse Brandeburg 4df1046622 ixgbe: Cleanup some whitespace issues, fixup and add some comments
Cleanup a bit of whitespace, add some function header comments, and fix a
few comments around the driver.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Acked-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-14 12:41:13 -07:00
PJ Waskiewicz 885125399e ixgbe: Two small fixes for 82599 when bringing the device down and for WoL
The Tx DMA unit should be disabled when bringing the device down.  Also,
the KX4 device with 82599 supports WoL, so we should clear the Wake Up
Status (WUS) after a PCIe slot reset.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Acked-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-14 12:41:13 -07:00
Jesse Brandeburg 9891ca7cdc ixgbe: Add a few safety nets for register writes and descriptor cleanups
There are possible times that a driver may fail to completely initialize,
due to a buggy platform or a buggy kernel.  In those cases, we'd rather
fail gracefully instead of a panic.  Add a few safety checks to some
critical paths to try and prevent a panic in these corner-case situations.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
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: David S. Miller <davem@davemloft.net>
2009-03-14 12:41:12 -07:00
Jesse Brandeburg 2a41ff8116 ixgbe: Cleanup on the Rx init path
This cleans up the following pieces of the Rx initialization path:

- Enable the ECC memory fault interrupt in OTHER causes.

- Fix an 82598 initialization of RDRXCTL when depending on RSS and VMDq to
be enabled.  We don't need these features enabled to safely set the MVMEN
bit to allow multiple SRRCTL register mappings into the RXDCTL registers.

- Fix the RSS initialization path to not stomp on DCB accidentally.  When
configuring the MRQC (multiple Rx queue contol) register, we want to make
sure we only OR in features as necessary, instead of full assignment.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
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: David S. Miller <davem@davemloft.net>
2009-03-14 12:41:11 -07:00
Jesse Brandeburg 9a1a69adad ixgbe: Fix the Tx clean logic to return proper status
The Tx accounting when cleaning during NAPI was not completely properly.
We should use the work_limit to determine when to finish cleaning, and
use the same to return the cleaned status.  The impact of running like this
causes the NAPI clean for this Tx to get stuck in a scheduling loop, and
can result in Tx not getting cleaned, ending with a Tx hang and device
reset.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
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: David S. Miller <davem@davemloft.net>
2009-03-14 12:41:11 -07:00
Jesse Brandeburg 4dd64df895 ixgbe: fix bug with napi add before request_irq
Occasionally if the driver was loaded in a system that
didn't support MSI-X or MSI and was on a shared interrupt,
the driver would then panic in NAPI on the first shared
interrupt because we hadn't called napi_add yet.

Solution: call napi_add before calling request_irq

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
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: David S. Miller <davem@davemloft.net>
2009-03-14 12:41:10 -07:00
Jesse Brandeburg 509ee935ec ixgbe: Fix interrupt configuration for 82599
The interrupt models using EITR have changed in 82599.  The way the register
is laid out, the change is transparent to some of the existing code.
However, some of it isn't.  This patch fixes all the cases where EITR
handling is different than 82598.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
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: David S. Miller <davem@davemloft.net>
2009-03-14 12:41:08 -07:00
PJ Waskiewicz 40dcd79a7b ixgbe: Disable DROP_EN for Rx queues
82599 mistakenly enabled drop on Rx queues in the packet buffer.  The
default mode should be store-and-forward from the FIFO.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Acked-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-14 12:41:07 -07:00
PJ Waskiewicz d51019a4da ixgbe: Fix an accounting problem when the Rx FIFO is full
The rx_no_dma_resources counter reported by ethtool -S ethX is not
counting correctly.  In 82599, the queue mappings for the counters need
to be mapped properly, and accounted for properly.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Acked-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-14 12:41:07 -07:00
PJ Waskiewicz 1339b9e975 ixgbe: Fix get_supported_physical_layer() due to new 82599 PHY types
A purely cosmetic change.  Report which physical layer is present, instead
of PHY unknown.  82599 added new PHY types for the SFP+ devices, and this
was missed getting updated.

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: David S. Miller <davem@davemloft.net>
2009-03-14 12:41:06 -07:00
Chris Leech e90d400c2b ixgbe: fix multiple unicast address support
Multiple unicast address support appears to have been broken with the
change to support net_device_ops.  This a regression from 2.6.28 to 2.6.29.

I'm not 100% on whether ndo_set_multicast_list can be NULL after this
or not.  If ndo_set_rx_mode is set everything _should_ be using it.

Signed-off-by: Chris Leech <christopher.leech@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-03-13 13:40:36 -07:00
David S. Miller fc1f209514 ixgbe: Fix some compiler warnings.
'pap' is never used in ixgbe_dcb_hw_config_82599()
and 'eec' in ixgbe_acquire_eeptom() is only used when
status == 0 but GCC has some trouble seeing that.

Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-01 20:32:39 -08:00
PJ Waskiewicz e8e26350f1 ixgbe: Add 82599 device id's, hook it up into the main driver.
With the hardware-specific code in place, add all supported device id's,
along with base driver changes to enable 82599 devices.  The devices
being enabled are:

8086:10f7: 82599EB 10 Gigabit KX4 Network Connection
8086:10fb: 82599EB 10 Gigabit Network Connection

The device 8086:10fb is a fully-pluggable SFP+ NIC.

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: David S. Miller <davem@davemloft.net>
2009-03-01 00:24:36 -08:00
PJ Waskiewicz 235ea828a1 ixgbe: Add DCB for 82599, remove BCN support
This patch adds the DCB (Data Center Bridging) support for 82599 hardware.
This is similar to how the 82598 DCB code works.

This patch also removes the BCN (Backwards Congestion Notification) netlink
configuration code from the driver.  BCN was a pre-standard congestion
notification framework, and was not what the IEEE body decided upon for
standard congestion management. QCN (802.1Qau), Quantized Congestion
Notification is the accepted standard, which is not supported by 82599,
hence we remove the support altogether.

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: David S. Miller <davem@davemloft.net>
2009-03-01 00:24:35 -08:00
PJ Waskiewicz 11afc1b1fd ixgbe: Add hardware specific initialization code for 82599 devices
This patch adds the hardware initialization code specific to 82599.  This
is similar to the 82598 hardware initialization code.  It also includes all
changes to the existing hardware init code to support 82599.

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: David S. Miller <davem@davemloft.net>
2009-03-01 00:24:33 -08:00
Jesse Brandeburg 32344a3940 ixbge: fix bug when using large pages and jumbo frames
it was pointed out on the list that ixgbe was failing when using 64kB pages
and large 16kB MTU.

since with a 64kB PAGE_SIZE MAX_SKB_FRAGS = 3, the way the driver was
configuring page usage was assuming 2kB is half a page, and was only
ever dmaing that much data to a half page.

(16kB - header size) / 2048 = 7 or 8 pages, which would far exceed 3

adjust the driver to account for these large pages, the hardware can
support DMA to up to 16kB for each descriptor.

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-24 16:37:31 -08:00
Shannon Nelson c7e4358ae8 ixgbe: Move ring features into an enum, allowing easier future maintenance
From: Shannon Nelson <shannon.nelson@intel.com>

The ring_feature member of ixgbe_adapter is statically allocated based on
the supported features of the device.  When a new feature is added, we need
to manually update the static allocation.  This patch makes the feature
list an enum, eliminating the need for multiple updates to the code when
adding a new feature.

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: David S. Miller <davem@davemloft.net>
2009-02-24 16:36:38 -08:00
Don Skidmore 54037505a5 ixgbe: fix for 82598 Si errata causing buffer overflow
The failure happens when an interrupt occurs and the driver is reading
EICR.  This read will cause a clear-by-read which leads to two TLP
being inserted in the PCIe retry buffer leading to an overflow of the
buffer and corruption of TLPs.

The solution is different depending where the reading of EICR takes place.

For ixgbe_msix_lsc() since we are in MSIX mode and know OCD is enabled a
clear-by-write is done instead of the normal clear-by-read.

For ixgbe_intr() 0xffffffff is written to EIMC before the read, masking the
interrupts.

Signed-off-by: Don Skidmore <donald.c.skidmore@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-21 15:42:56 -08:00
Hannes Eder 1aef47c411 drivers/net/ixgbe: fix sparse warning: Should it be static?
Impact: Make symbol static.

Fix this sparse warning:
  drivers/net/ixgbe/ixgbe_82598.c:59:5: warning: symbol 'ixgbe_get_pcie_msix_count_82598' was not declared. Should it be static?

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-17 17:37:58 -08:00
Breno Leitão 367681f4ec ixgbe: Removing the unused PAGE_USE_COUNT() macro.
Removing the unused PAGE_USE_COUNT() macro. Also removing the unused
pages variable at ixgbe_configure_rx() function.

Signed-off-by: Breno Leitão <leitao@linux.vnet.ibm.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-10 17:24:48 -08:00
Peter P Waskiewicz Jr 3e450669cc ixgbe: Fix a set_num_queues() bug that can result in num_(r|t)x_queues = 0
Now that our set_num_queues() routines for each feature are re-entrant, and
can be called at any point, they shouldn't zero out the feature's indices
or mask bits.  Subsequent calls into those routines for those features can
result in zero Rx and Tx queues being assigned, causing a panic later in
driver reinitialization.

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: David S. Miller <davem@davemloft.net>
2009-02-07 02:16:59 -08:00
Peter P Waskiewicz Jr 12207e498b ixgbe: Defeature Tx Head writeback
Tx Head writeback is causing multi-microsecond stalls on PCIe chipsets, due
to partial cacheline writebacks.  Removing this feature removes these
issues.

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: David S. Miller <davem@davemloft.net>
2009-02-06 21:47:24 -08:00
Peter P Waskiewicz Jr 0ecc061d19 ixgbe: Update flow control state machine in link setup
The flow control handling is overly complicated and difficult to maintain.
This patch cleans up the flow control handling and makes it much more
explicit.  It also adds 1G flow control autonegotiation, for 1G copper
links, 1G KX links, and 1G fiber links.

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: David S. Miller <davem@davemloft.net>
2009-02-06 21:46:54 -08:00
Peter P Waskiewicz Jr 34b0368c68 ixgbe: Display EEPROM version in ethtool -i queries
Currently ixgbe does not display the EEPROM version in ethtool -i, where
other drivers do.  The EEPROM version is located at offset 0x29.  This
patch adds support to display it.

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: David S. Miller <davem@davemloft.net>
2009-02-05 23:54:42 -08:00
Peter P Waskiewicz Jr 3201d3130e ixgbe: Update link setup code to better support autonegotiation of speed
The current code has some flaws in it when performing autonegotiation,
especially on KX/KX4 links.  This patch updates the code to better handle
the autonegotiation states on link setup.  The patch also removes a redundant
link configuration call on driver load, and moves link configuration to
the ->open() path.

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: David S. Miller <davem@davemloft.net>
2009-02-05 23:54:21 -08:00
Peter P Waskiewicz Jr bc97114d3f ixgbe: Refactor set_num_queues() and cache_ring_register()
The current code to determine the number of queues the device will want
on driver initialization is ugly and difficult to maintain.  It also
doesn't allow for easy expansion for future features or future hardware.
This patch refactors these routines, and make them easier to deal with.

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: David S. Miller <davem@davemloft.net>
2009-02-05 23:53:59 -08:00
Peter P Waskiewicz Jr 3efac5a001 ixgbe: Update copyright dates, bump the driver version number
New year, new copyright date ranges.  Also bump the driver version
number to reflect many of the recent changes.

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: David S. Miller <davem@davemloft.net>
2009-02-01 01:19:20 -08:00
Peter P Waskiewicz Jr eb7f139ce5 ixgbe: Refactor MSI-X allocation mechanism
Our current MSI-X allocation mechanism does not support new hardware
at all.  It also isn't getting the actual number of supported MSI-X vectors
from the device.

This patch allows the number of MSI-X vectors to be specific to a device,
plus it gets the number of MSI-X vectors available from PCIe configuration
space.

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: David S. Miller <davem@davemloft.net>
2009-02-01 01:18:58 -08:00
Don Skidmore 2f21bdd354 ixgbe: Add 82598 support for BX mezzanine devices
Add the device ID for BX devices using the 82598 MAC.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
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: David S. Miller <davem@davemloft.net>
2009-02-01 01:18:23 -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
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
Don Skidmore 1e336d0fc9 ixgbe: add support KX/KX4 device
And support for the KX/KX4 mezzanine card.  Device id 0x10B6.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
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: David S. Miller <davem@davemloft.net>
2009-01-26 20:57:51 -08:00
Don Skidmore 5b9c3cdd55 ixgbe: fix slow load times on 82598 nics
Load times for NICs that use i2c to communicate with the phy were taking
~4.5 sec per port.  This fix first checks to see if the link is already
up before calling get_link_capabilities, since if it is we don't need
query the phy for link state.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
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: David S. Miller <davem@davemloft.net>
2009-01-26 20:57:17 -08:00
Herbert Xu 78b6f4ce58 ixgbe: Replace LRO with GRO
This patch makes ixgbe invoke the GRO hooks instead of LRO.  As
GRO has a compatible external interface to LRO this is a very
straightforward replacement.

As GRO uses the napi structure to track the held packets, I've
modified the code paths involved to pass that along.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-21 14:34:06 -08:00
Ben Hutchings 288379f050 net: Remove redundant NAPI functions
Following the removal of the unused struct net_device * parameter from
the NAPI functions named *netif_rx_* in commit 908a7a1, they are
exactly equivalent to the corresponding *napi_* functions and are
therefore redundant.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-21 14:33:50 -08:00
Peter P Waskiewicz Jr 1da100bb47 ixgbe: Fix usage of netif_*_all_queues() with netif_carrier_{off|on}()
netif_carrier_off() is sufficient to stop Tx into the driver.  Stopping the Tx
queues is redundant and unnecessary.  By the same token, netif_carrier_on()
will be sufficient to re-enable Tx, so waking the queues is unnecessary.

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: David S. Miller <davem@davemloft.net>
2009-01-19 16:55:03 -08:00
Don Skidmore 068c89b014 ixgbe: fix tag stripping for VLAN ID 0
Register VLAN ID 0 so that frames with VLAN ID 0 are received and get
their tag stripped when ixgbe is not in DCB mode.  VLAN ID 0 means
that the frame is 'priority tagged' only - it is not a VLAN, but the
priority value is the tag in valid.  The functions
ixgbe_vlan_rx_register() and ixgbe_vlan_rx_kill_vid() were moved up a
couple functions to correct compiling issues with this change.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Eric W Multanen <eric.w.multanen@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-19 16:54:36 -08:00
Don Skidmore 15005a3204 ixgbe: fix dca issue with relaxed ordering turned on
The is an issue where setting Relaxed Ordering (RO) bit
(in a PCI-E write transaction) on 82598 causing the chipset
to drop DCA hints.  This patch forces RO not to be set for
descriptors as well as payload.  This will only be in effect
while DCA is enabled and no performance difference was
noticed in testing.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
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: David S. Miller <davem@davemloft.net>
2009-01-19 16:54:13 -08:00
Peter P Waskiewicz Jr d3fa472145 ixgbe: Fix set_ringparam in ixgbe to use the same memory pools.
The adapter rings are kcalloc()'d, but in set_ringparam() in ixgbe_ethtool,
we replace that memory from the vmalloc() pool.  This can result in a NULL
pointer reference when trying to modify the rings at a later time, or on
device removal.

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: David S. Miller <davem@davemloft.net>
2008-12-26 01:36:33 -08:00
Peter P Waskiewicz Jr 7adf1525be ixgbe: Fix NAPI enable/disable path when using DCB
This change allows DCB mode to change the number of queues, and presumably
the number of NAPI instances, safely.

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: David S. Miller <davem@davemloft.net>
2008-12-26 01:36:05 -08:00
Hannes Eder e855aac805 drivers/net/ixgbe: fix sparse warnings: make symbols static
Fix this sparse warnings:

  drivers/net/ixgbe/ixgbe_82598.c:180:5: warning: symbol 'ixgbe_get_copper_link_capabilities_82598' was not declared. Should it be static?
  drivers/net/ixgbe/ixgbe_82598.c:245:5: warning: symbol 'ixgbe_setup_fc_82598' was not declared. Should it be static?
  drivers/net/ixgbe/ixgbe_82598.c:729:5: warning: symbol 'ixgbe_set_vmdq_82598' was not declared. Should it be static?
  drivers/net/ixgbe/ixgbe_82598.c:773:5: warning: symbol 'ixgbe_set_vfta_82598' was not declared. Should it be static?
  drivers/net/ixgbe/ixgbe_82598.c:897:5: warning: symbol 'ixgbe_read_analog_reg8_82598' was not declared. Should it be static?
  drivers/net/ixgbe/ixgbe_82598.c:919:5: warning: symbol 'ixgbe_write_analog_reg8_82598' was not declared. Should it be static?
  drivers/net/ixgbe/ixgbe_82598.c:940:5: warning: symbol 'ixgbe_read_i2c_eeprom_82598' was not declared. Should it be static?
  drivers/net/ixgbe/ixgbe_82598.c:1000:5: warning: symbol 'ixgbe_get_supported_physical_layer_82598' was not declared. Should it be static?
  drivers/net/ixgbe/ixgbe_dcb_82598.c💯5: warning: symbol 'ixgbe_dcb_config_packet_buffers_82598' was not declared. Should it be static?

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-26 00:03:59 -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
Don Skidmore bfb8cc31b1 ixgbe: fix the display of DCB control stats in ethtool
Priority flow contol statistics for Data Center Bridging (DCB) weren't
included in ethtool.  This patch adds them.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Eric W Multanen <eric.w.multanen@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-21 20:11:04 -08:00
Don Skidmore f4314e815e net: add DCNA attribute to the BCN interface for DCB
Adds the Backward Congestion Notification Address (BCNA) attribute to the
Backward Congestion Notification (BCN) interface for Data Center Bridging
(DCB), which was missing.  Receive the BCNA attribute in the ixgbe driver.
The BCNA attribute is for a switch to inform the endstation about the physical
port identification in order to support BCN on aggregated links.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Eric W Multanen <eric.w.multanen@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2008-12-21 20:10:29 -08:00
Don Skidmore 1486a61ebc net: fix DCB setstate to return success/failure
Data Center Bridging (DCB) had no way to know if setstate had failed in the
driver.  This patch enables dcb netlink code to handle the status for the DCB
setstate interface.  Likewise it allows the driver to return a failed status
if MSI-X isn't enabled.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Eric W Multanen <eric.w.multanen@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-21 20:09:50 -08:00
Jesse Brandeburg 5ecc361444 ixgbe: fix dma mapping unbalance
This issue was initially reported by Joerg Roedel <joerg.roedel@amd.com>
It appears that ixgbe has had a long standing bug where it was unmapping a different size than it had mapped.

ixgbe 0000:02:00.0: PCI-DMA: device driver frees DMA memory with different sizes than it mapped.
ixgbe 0000:02:00.0: PCI-DMA: device driver frees DMA memory with different size [device address=0x0000000003fed812] [map size=258 bytes] [unmap size=256 bytes]
Pid: 6178, comm: rmmod Not tainted 2.6.28-rc5 #4 Call Trace:
 [<ffffffff8022a2ae>] iommu_queue_inv_iommu_pages+0x5e/0x70
 [<ffffffff80225956>] check_unmap+0x1c6/0x240  [<ffffffff80225ff5>] debug_unmap_single+0xb5/0x110  [<ffffffffa0213997>] ixgbe_clean_rx_ring+0x147/0x220  [<ffffffffa0214d7d>] ixgbe_down+0x2fd/0x3d0 [ixgbe]  [<ffffffffa02150b3>] ixgbe_close+0x13/0xc0 [ixgbe]  [<ffffffff80431326>] dev_close+0x56/0xa0  [<ffffffff804313b3>] rollback_registered+0x43/0x220  [<ffffffff804315a5>] unregister_netdevice+0x15/0x60  [<ffffffff80431601>] unregister_netdev+0x11/0x20  [<ffffffffa021aef8>] ixgbe_remove+0x48/0x16e [ixgbe]  [<ffffffff80386ffc>] pci_device_remove+0x2c/0x60  [<ffffffff803ef929>] __device_release_driver+0x99/0x100
 [<ffffffff803efa48>] driver_detach+0xb8/0xc0  [<ffffffff803eea6e>] bus_remove_driver+0x8e/0xd0  [<ffffffff80387374>] pci_unregister_driver+0x34/0x90  [<ffffffff8026c6c7>] sys_delete_module+0x1c7/0x2a0  [<ffffffff802a9ce9>] do_munmap+0x349/0x390  [<ffffffff80374481>] __up_write+0x21/0x150  [<ffffffff8020c30b>] system_call_fastpath+0x16/0x1b

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>
2008-12-15 01:00:57 -08:00
Peter P Waskiewicz Jr 6fabd715e6 ixgbe: Implement PCIe AER support
This patch implements the PCIe Advanced Error Reporting callbacks in
ixgbe.  The 82598 hardware supports AER, so we enable it.

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: David S. Miller <davem@davemloft.net>
2008-12-10 01:13:08 -08:00
Wang Chen a4d2f34b7c ixgbe: function comment typo
Seems the ixgbe's code was copied from e1000.
The comment talks about something not exist.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-03 22:06:21 -08:00
Al Viro feea6a574d ixgbe: section fixes
ixgbe_init_interrupt_scheme() is called from ixgbe_resume().  Build that
with CONFIG_PM and without CONFIG_HOTPLUG and you've got a problem.
Several helpers called by it also are misannotated __devinit.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-27 15:34:07 -08:00
Jeff Kirsher a46e534bc7 ixgbe: cleanup link up/down messages
The system log messages created on a link status change need to follow a
specific format to work with tools some customers use.  This also makes
the messages consistant with other Intel driver link messages.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-27 00:22:21 -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
Robert Olsson cb13fc209f ixgbe: Naming interrupt vectors
Signed-off-by: Robert Olsson <robert.olsson@its.uu.se>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 16:44:39 -08:00
Jeff Kirsher 7a6b6f515f DCB: fix kconfig option
Since the netlink option for DCB is necessary to actually be useful,
simplified the Kconfig option.  In addition, added useful help text for the
Kconfig option.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 01:02:08 -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
Wang Chen 9d2f472097 ixgbe: convert directly reference of netdev->priv
Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-21 01:56:07 -08:00
Donald Skidmore c4900be053 ixgbe: add SFP+ driver support
This patch adds support for SFP+ PHY in the following device ID's (10DB,
10F1, 10E1).  These SFP+ PHY's are accessed via an I2C interface so the
patch also includes functions to support this.

Another feature of note is that the PHY is pluggable and some
rearchitecting was needed to support this.

Signed-off-by: Donald Skidmore <donald.c.skidmore@intel.com>
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: David S. Miller <davem@davemloft.net>
2008-11-20 21:11:42 -08:00
Alexander Duyck 859ee3c438 DCB: Add support for DCB BCN
Adds an interface to configure the Backward Congestion Notification
(BCN) feature.  In a BCN capabale network, congestion notifications
from congested points out in the network can cause the end station
limit the rate of a given traffic flow.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-20 21:10:23 -08:00
Alexander Duyck 0eb3aa9bab DCB: Add interface to query the state of PFC feature.
Adds a netlink interface for Data Center Bridging (DCB) to get and set
the enable state of the Priority Flow Control (PFC) feature.
Primarily, this is a way to turn off PFC in the driver while DCB
remains enabled.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-20 21:09:23 -08:00
Alexander Duyck 33dbabc4a7 DCB: Add interface to query # of TCs supported by device
Adds interface for Data Center Bridging (DCB) to query (and set if
supported) the number of traffic classes currently supported by the
device for the two (DCB) features: priority groups (PG) and priority
flow control (PFC).

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-20 21:08:19 -08:00
Alexander Duyck 46132188bf DCB: Add interface to query for the DCB capabilities of an device.
Adds to the netlink interface for Data Center Bridging (DCB), allowing
the DCB capabilities supported by a device to be queried.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-20 21:05:08 -08:00
Alexander Duyck 2f90b8657e ixgbe: this patch adds support for DCB to the kernel and ixgbe driver
This adds support for Data Center Bridging (DCB) features in the ixgbe
driver and adds an rtnetlink interface for configuring DCB to the
kernel.  The DCB feature support included are Priority Grouping (PG) -
which allows bandwidth guarantees to be allocated to groups to traffic
based on the 802.1q priority, and Priority Based Flow Control (PFC) -
which introduces a new MAC control PAUSE frame which works at
granularity of the 802.1p priority instead of the link (IEEE 802.3x).

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-20 20:52:10 -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
David S. Miller 6ab33d5171 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:

	drivers/net/ixgbe/ixgbe_main.c
	include/net/mac80211.h
	net/phonet/af_phonet.c
2008-11-20 16:44:00 -08:00
Stephen Hemminger 0edc352743 ixgb: convert to net_device_ops
Convert this driver to network device ops. 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:56 -08:00
Alexey Dobriyan 79aefa45b2 ixgbe: fix compilation with gcc-3.4
CC [M]  drivers/net/ixgbe/ixgbe_main.o
drivers/net/ixgbe/ixgbe_main.c: In function `ixgbe_intr':
drivers/net/ixgbe/ixgbe_main.c:1290: sorry, unimplemented: inlining failed in call to 'ixgbe_irq_enable': function body not available
drivers/net/ixgbe/ixgbe_main.c:1312: sorry, unimplemented: called from here
make[4]: *** [drivers/net/ixgbe/ixgbe_main.o] Error 1

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-19 14:17:02 -08:00
PJ Waskiewicz 74ad0a5421 ixgbe: Fix usage of netif_*_all_queues() with netif_carrier_{off|on}()
netif_carrier_off() is sufficient to stop Tx into the driver.  Stopping the Tx
queues is redundant and unnecessary.  By the same token, netif_carrier_on()
will be sufficient to re-enable Tx, so waking the queues is unnecessary.

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: David S. Miller <davem@davemloft.net>
2008-11-16 00:31:35 -08:00
Wang Chen 454d7c9b14 netdevice: safe convert to netdev_priv() #part-1
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:37:49 -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
Jesse Brandeburg 0befdb3e0a ixgbe: add device support for 82598AT (copper 10GbE) adapters
Intel is currently shipping support for adapters with a phy
that does 10GBase-T (copper), which is 10 Gigabit ethernet
over standard Category 6 cabling.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-11-02 08:00:32 -05: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 Garzik 5dd2d33228 [netdrvr] myri10ge, ixgbe: remove broken select INTEL_IOATDMA
We cannot select INTEL_IOATDMA in Kconfig as soon as MYRI10GE or IXGBE
is enabled since the former is not available on all architectures.

Just use a Kconfig bool {IXGBE,MYRI10GE}_DCA set to =y when DCA
support can actually be built.

[myri10ge portion written and signed-off-by] Brice Goglin <brice@myri.com>

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-16 05:09:31 -04:00
Harvey Harrison b39d66a81f drivers/net: replace __FUNCTION__ with __func__
__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24 18:59:00 -04:00
Alexander Duyck 6988867473 ixgbe: whitespace/formatting cleanup
This patch cleans up some whitespace items, reorders a couple of functions, and removes some outdated comments.

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-24 18:55:06 -04:00
Alexander Duyck b3c8b4ba61 ixgbe: correctly add and remove napi queues
This patch corrects support for NAPI so that queues are correctly added and
removed during suspend/resume in the event that the number of MSI-X vectors
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-09-24 18:55:05 -04:00
Peter P Waskiewicz b46172402f ixgbe: Whitespace, copyright update and version number change patch
This patch cleans up a bit of whitespace issues with the driver, updates
the copyright information, and bumps the version number up.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24 18:55:05 -04:00
Jeff Kirsher 51ac6445b1 ixgbe: bump version
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-09-24 18:55:04 -04:00