Improves small packet performance with large amounts of reassembly being done in the stack.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
This was to fix compilation warnings. Also added log messages when pci_enable_* functions return with an error.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
This is two patches, the first is adding additional bus information for the 8257{1|2|3} controllers. The second patch was orginally a community patch to print bus type/speed/width, and enhanced by us.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
The EEPROM image version is reported as a firmware version for these controllers.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Added 82571 fiber to WOL fix for dual port adapters.
Added support for 82546GB (Quad Copper).
Added PCIe typedef for x2, igp cable length 115, and extended TX CTRL registers.
Added parity error detection and PCIe CTRL registers.
Added EEPROM config registers.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Fixed an issue netpoll would error out during communication, generating the following error:
--netdump[14973]: Got toomany timeouts in handshaking, ...
Even after a kernel panic, netpoll requires two way communication to successfully transfer the crash log to the remote server.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Simplified the logic used to assign the frame_size.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Fixed VLAN support by switching control over to the firmware.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Fixed by moving code to correct location (for 82572 and 82571 controllers).
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Fixed the collision distance for 82543 controllers and newer.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Removed duplicate code, TXDCTL and TXDCTL_COUNT_DESC are the same bit and there is no need to set it twice.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
These were two separate community submitted patches.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Fixed the TX timeout logic to use "end of packet" rather than "next to clean". Updated message log.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
This patch contains two fixes. The first fix is to the tx and rx descriptor rings clean up process. The second fix is to jumbo frames, which cleans up the code logic and removes most of the fifo related limitations on jumbo frames. This is because the driver code now supports splitting a packet across multiple descriptors.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
10/100 speeds seem to have some problems reporting false tx timeouts especially at half duplex. Fixed by using a timeout factor to attempt to mitigate the false timeouts.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Fixed flow control water marks based on PBA size.
Store flow control state in original_fc in addition to fc.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Fixed read_eeprom logic to test use_eerd instead of testing for 82573 controllers.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Fixed the loopback logic to work for the PCI express adapters.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Fixed stats when using multiple queues.
When multiple queues are enabled, log a message in syslog.
Fixed memory allocation for multiple queues.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Fix adapter structure to handle multiple queues and prepping the driver for full multiple queue support, some changes are ifdef'd our unless you define CONFIG_E1000_MQ.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Updated the e1000_stats structure and removed mpx for rx_errors and rx_dropped.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Added a delay to allow PHY configuration to complete before accessing NVM.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
The 82573 controller required different logic than 82571|2 controllers. Corrected the reset logic for 8257{1|2|3} controllers.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Fix so that if a SoL/IDER session is active, do not allow operations which require a PHY reset and instead log a message.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
These fixes update the TX and RX ring structures. Prepare driver for up-coming fixes.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Fixed the TSO workaround for 82571/2 controllers.
Fixed TSO issue where a non-tso packet in a linear SKB which followed a TSO packet would get written back prematurely.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Partition PBA for Jumbo frames based on MTU size.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
This is now required to avoid
drivers/net/spider_net.c:844: error: 'IPPROTO_TCP' undeclared
Signed-off-by: Arnd Bergmann <arndb@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Performance optimizations, changes in these areas:
- RX and TX checksum offload
- correct maximum MTU
- don't use TX interrupts anymore, use a timer instead
- remove some superfluous barriers
- improve RX RAM full handling
From: Utz Bacher <utz.bacher@de.ibm.com>
Signed-off-by: Jens Osterkamp <jens.osterkamp@de.ibm.com>
Signed-off-by: Arnd Bergmann <arndb@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
The driver incorrectly used dma_addr_t to describe
HW structures and consequently broke when that type
was changed in 2.6.15-rc.
This changed spidernet to use u32 for 32 bit HW defined
structure elements.
From: Jens Osterkamp <Jens.Osterkamp@de.ibm.com>
Signed-off-by: Jens Osterkamp <Jens.Osterkamp@de.ibm.com>
Signed-off-by: Arnd Bergmann <arndb@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
request_firmware() is sometimes problematic, especially
in initramfs, reading the firmware from Open Firmware
is much preferrable.
We still try to get the firmware from the file system
first, in order to support old SLOF releases and to allow
updates of the spidernet firmware without reflashing
the system.
From: Jens Osterkamp <Jens.Osterkamp@de.ibm.com>
Signed-off-by: Jens Osterkamp <Jens.Osterkamp@de.ibm.com>
Signed-off-by: Arnd Bergmann <arndb@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Uploading the device firmware may fail if wrong input data
was provided by the user. This checks for the condition.
From: Jens Osterkamp <Jens.Osterkamp@de.ibm.com>
Signed-off-by: Jens Osterkamp <Jens.Osterkamp@de.ibm.com>
Signed-off-by: Arnd Bergmann <arndb@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
All interrupts controlled by the extended mask register are also
masked by a bit in the main mask register, so there is no need to
directly manipulate the extended mask register.
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
mv643xx_eth.c | 81 ++++++++++++++++++----------------------------------------
1 file changed, 26 insertions(+), 55 deletions(-)
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Move code from helper functions mv643xx_eth_real_open and mv643xx_eth_real_stop
as they are no longer needed.
Signed-off-by Dale Farnsworth <dale@farnsworth.org>
mv643xx_eth.c | 109 +++++++++++++++++++++++-----------------------------------
1 file changed, 45 insertions(+), 64 deletions(-)
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
This patch removes the NETIF_F_HW_CSUM flag to be able to use other protocols
than IPv4. Hardware checksums for IPv4 should continue to work because
NETIF_F_IP_CSUM is still set. The sanity-check has been enhanced to check
the used protocol and to not access skb->iph for non-ipv4-packets.
Signed-off-by: Wolfram Joost <pegasos@frokaschwei.de>
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
mv643xx_eth.c | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
This driver has historically held a spin_lock during the entire open
and stop functions and while receiving multiple packets. This is
unecessarily long and holds locks during calls that may sleep.
This patch reduces the size of windows where locks are held.
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
mv643xx_eth.c | 172 ++++++++++++++++++++++++++++++----------------------------
1 file changed, 91 insertions(+), 81 deletions(-)
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
The Marvell mv643xx ethernet hardware requires that DMA buffers be
aligned to 8-byte boundaries. This patch satisfies this requirement.
Buffers allocated by dev_alloc_skb() only have 4-byte alignment when
slab debugging is enabled.
Also, document that the 2-byte offset to align the IP packets on
receive is a hardware feature and is not tied to NET_IP_ALIGN.
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
mv643xx_eth.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
This code is adapted from code in a ppc-specific version of the driver.
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
mv643xx_eth.c | 201 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 197 insertions(+), 4 deletions(-)
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Fix a NULL pointer dereference.
Fill in the buf_ptr and byte_cnt fields of pkt_info in
eth_tx_return_desc().
Signed-off-by: Paolo Galtieri <pgaltieri@mvista.com>
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
mv643xx_eth.c | 51 +++++++++++++++++++++------------------------------
1 file changed, 21 insertions(+), 30 deletions(-)
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
If you do a dma_map_single you must do dma_unmap_single and if you do
a dma_map_page you must do a dma_unmap_page.
Signed-off-by: Paolo Galtieri <pgaltieri@mvista.com>
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
mv643xx_eth.c | 51 +++++++++++++++++++++------------------------------
1 file changed, 21 insertions(+), 30 deletions(-)
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>