Need to make sure that sky2 receive buffers are 64 bit
aligned. Also, don't need to start off with GFP_ATOMIC
on initial setup.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
It is possible for hardware to get confused when an oversized frame
is received. In that case, just drop the packet and increment a counter.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Don't lose multicast addresses when link goes down or ring
parameters change.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Don't die if we run out of memory on mtu or ring parameter change.
For other admin operations, don't rebuild Rx ring, just restart the PHY.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Change version number. Still don't have enough history on this
to call it 1.0 yet.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Under load, my SysKonnect SK-9S22 sees duplicate checksums from
earlier packets. Doesn't happen on other platforms so just disable
receive checksum there.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Turn symmetric flow control on by default. This was an oversight
in the initial versions.
Signed-off-by: Stephen HEmminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Add a couple more prefetches to where we walk the rings.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Put more logic in to try and handle transmit timeout recovery.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Adjust interrupt deferral values for better performance and avoid
starvation issues under stress.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Optimize poll routine by not clearing interrupt till after
processing, and checking for more work before re-enable.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Change transmit complete handling to use the status values
in the poll list because they are in-cache, rather than reading
non-cached memory for chips status.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Some transmit side small fixes:
* When computing number of list elements per transmit, do full
comparision to check for checksuming.
* Get rid of racy check for tx_complete
* Change stop test to match wake condition.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Split Tx and Rx ring into two different data structures.
Tx needs the next value (to handle partial status), and
Rx always needs the mapaddr (to handle resubmitting same buffer).
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Don't need to keep track of mapping length in ring structure
because we can get the same info from other info.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Don't need to disable interrupts during the transmit routine.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Do phy processing in a work queue rather than a tasklet.
This means we can let bottom halves run.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Add support for get/set the interrupt coalescing settings.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Make the copy threshold a module parameter for those who
may want to turn it off.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
There maybe new versions of Yukon2 in the future, so make the
driver more robust to handle this.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
One of the rearrangements dropped this and it means
sky2 spins in napi/interrupt.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Update version number and print version in boot message.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Switch to using pci_register_driver as per current convention.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Eliminate special case tuning for PCI-Express. This code
causes receive hangs and doesn't help performance much anyway.
Signed-off-by: Stephen Hemminger <shemmnger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Sometimes on dual port cards, one tx complete may cover both
ports. To handle that rearrange poll routine to lookup at
end.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Avoid possible race conditions when doing MTU and change and shutdown.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
I didn't like the name netif_rx_schedule_test(), in earlier patches
and changed to __netif_rx_schedule_prep to be more consistent.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Add support for Yukon-EC Ultra chip as implemented in SysKonnect's
driver version 8.26.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Changes to receive side processing:
* bigger receive ring
* clean up polling loop
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Fix issues with pause and flush. This code works on
all chip versions tested.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Eliminate special case for EC-A1. The overhead isn't so
great that having config option is worth it.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
On alpha:
drivers/net/sky2.c: In function `sky2_probe':
drivers/net/sky2.c:2819: error: `DMA_64BIT_MASK' undeclared (first use in this function)
drivers/net/sky2.c:2819: error: (Each undeclared identifier is reported only once
drivers/net/sky2.c:2819: error: for each function it appears in.)
drivers/net/sky2.c:2825: error: `DMA_32BIT_MASK' undeclared (first use in this function)
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Speed up the receive and interrupt processing and eliminate a
couple of race conditions from NAPI code.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Here is support for ethtool controlled renegotiation.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Verion number change, comment update and one simple optimization
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Add better power management, and power down the chip on device removal
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
The receive processing can be cleaned up by not using local variables
to store checksum status, instead just put it directly onto the expected
skb.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Changing the MTU of the network device doesn't mean the whole link
has to be brought down and back up again. Just stopping the receive
engine is good enough.
Signed-off-by: Stephen Hemminger <shmminger @osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Bump version (we are half way to a stable driver??)
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
For debugging, it is useful to allow ethtool to dump all of
the PCI mapped space. There is one small set of registers for RAM
diagnostics that needs to be avoided to prevent hanging, but all
the rest is accessible.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
The Yukon2 chip FIFO has a problem recovering from a pause frame
if the receive buffer is not aligned. The workaround is to just
leave receive buffer at original alignment, which will make IP
header unaligned. Rework receive logic for clarity.
Need to ignore receive overrun interrupts (or mac hangs).
These fixes make the sky2 driver generally usable.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Here is revised patch against netdev sky2 branch.
It includes whitespace fixes, all the changes from the previous
review as well as some optimizations and timing fixes to
solve some of the hangs.
The stall problem is better but not perfect. It appears that
under stress the chip can't keep up with the bus
and sends a pause frame, then hangs. This version is for
testing, and hopefully other eyes might see the root
cause of the problem.
I don't want to reinvent the ugly watchdog code in the syskonnect
version of sk98lin. If you read it you will see, the original
driver writer and the hardware developer obviously didn't
understand each other.
Dual port support is included, but not tested yet. It did
require small change to NAPI since both ports share same
IRQ.
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
New driver for the Marvell Yukon2 Gigabit Ethernet chipset.
This driver is based on the skge driver, but using the logic
from the SysKonnect version of the sk98lin driver.
It should support all the Yukon2 chipsets that are available
in many current Intel and AMD motherboards.
The driver does support ethtool, tx and rx checksum, and
tcp segmentation offload. But it has only been tested for
a short while and is known to stop receiving under heavy load.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>