Commit Graph

58 Commits

Author SHA1 Message Date
Stephen Hemminger d8511f8301 sky2: enable IRQ on duplex renegotiation
Don't want IRQ on FIFO error because there is nothing useful to do with it.
But do want IRQ on duplex change.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-05-30 09:54:32 -04:00
Stephen Hemminger b4ed372b29 sky2: dont set bogus bit in PHY register
This code inherited from the sk98lin driver is incorrect on the Yukon2.
The GPHY_CTRL register values are specific to the internal PHY of the chip
and the values used were leftovers.
Driver was setting bit 13 which is now the INT polarity for the PHY!

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-05-30 09:52:47 -04:00
Stephen Hemminger b628ed986d sky2: EC-U performance and jumbo support
The Yukon EC Ultra chips have transmit settings for store and
forward and PCI buffering. By setting these appropriately, normal
performance goes from 750Mbytes/sec to 940Mbytes/sec (non-jumbo).

It is also possible to do Jumbo mode, but it means turning off
TSO and checksum offload so the performance gets worse. There isn't
enough buffering for checksum offload to work.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-19 15:01:17 -04:00
Stephen Hemminger 40b01727a5 sky2: handle descriptor errors
There should never be descriptor error unless hardware or driver is buggy.
But if an error occurs, print useful information, clear irq, and recover.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-19 15:01:17 -04:00
Stephen Hemminger 819067916d sky2: transmit timeout
The transmit timeout code could hang, and it would not clear out
problems if the hardware was stuck.  Change the code to effectively do
a device down/up similar to the suspend/resume code.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-17 15:30:47 -05:00
Stephen Hemminger 7e7c098221 sky2: dont flush good pause frames
Don't mark pause frames as errors. This problem caused transmitter not
to pause and would effectively take out a gigabit switch because the
it can't handle overrun.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-17 15:30:47 -05:00
Stephen Hemminger 9374549428 sky2: Yukon Extreme support
This is basic support for the new Yukon Extreme
chip, extracted from the new vendor driver 10.0.4.3.

Since this is untested hardware, it has a big fat warning for now.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-07 18:50:46 -05:00
Stephen Hemminger e3173832d7 sky2: add Wake On Lan support
Adds basic magic packet wake on lan support to the sky2 driver.
Note: initial WOL value is based on BIOS settings.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-07 18:49:59 -05:00
Stephen Hemminger ae306cca3a sky2: better power state management
Improve power management and error handling by using pci_set_power_state(),
instead of driver doing PCI PM register changes in the driver.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:45 -05:00
Stephen Hemminger 0efdf26266 [PATCH] sky2: sparse warnings
Get rid of sparse warnings in sky2 driver because of mixed enum
usage.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-07 04:59:20 -05:00
Stephen Hemminger c3905bc4b7 [PATCH] sky2: receive queue watermark tweak
This patch makes the receive performance on some systems go from
714MB/s to 941MB/s. It adjusts the watermark of the receive queue
to be lower, thereby avoiding excess hardware flow control. This is
most important on the systems which have little/no additional buffering.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-07 04:58:33 -05:00
Stephen Hemminger b0a20ded56 [PATCH] sky2: msi enhancements.
If using Message Signaled Interrupts (MSI) then the IRQ will never
be shared. Don't call pci_disable_msi() unless using MSI.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-02 00:22:30 -05:00
Stephen Hemminger 8df9a87604 [PATCH] sky2: fixes for Yukon EC_U chip revisions
Update workarounds for 88E803X based on the latest SysKonnect vendor
driver version (8.41). Tested on EC_U rev A1, only.
These up the receive performance.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-02 00:22:29 -05:00
Stephen Hemminger 4e4bc305e1 sky2: GMAC pause frame
This reverts earlier change that attempted to fix flow control.
Device needs to discard pause frames, otherwise it hangs after a while.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-10-17 10:24:25 -07:00
Stephen Hemminger 16ad91e1c6 sky2: flow control setting fixes
The result of flow control negotiation should not limit the next
negotiatition. If board is plugged into an old half duplex 10Mbit port,
without pause, then replugged into a gigabit port, it should negotiate
what is desired, not inherit that last negotiation.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-10-17 10:24:13 -07:00
Stephen Hemminger 0edea0f54e sky2: advertising register 16 bits
The advertising bits (from ethtool.h) fit in 16 bits.
2006-10-17 10:24:07 -07:00
Stephen Hemminger 7bd656d121 [PATCH] sky2: revert pci express extensions
The pci express error handling extensions don't work unless PCI access is via
mmconfig. Otherwise, all accesses to pci config registers greater than 256 fail.
Since the sky2 driver has other ways of getting to PCI config space, it works
around this short coming, but the pci_find_ext_capablity doesn't work.

This backs out commit 91aeb3edbc
Go back to hardcoding, since we know where the error registers are anyway.
Fixes  http://bugzilla.kernel.org/show_bug.cgi?id=7222

Signed-off-by: Stephen Hemminger <shemmminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-11 04:07:45 -04:00
Stephen Hemminger 14d0263fea [PATCH] sky2: fragmented receive for large MTU
Use hardware support for chained receive to break up large frames
into multiple pages. This avoids having to do a mult-page allocation
that can fail on a busy system due to fragmented memory.

For normal size MTU, this code behaves the same.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-09-27 17:56:31 -04:00
Stephen Hemminger 2bb8c26242 [PATCH] sky2: use netif_tx_lock instead of LLTX
Use the netdevice transmit lock via netif_tx_lock rather than putting
lock in device specific code and using lockless transmit.  The code is
cleaner using netif_tx_lock, and the performance is same.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-09-27 17:56:31 -04:00
Stephen Hemminger 291ea6142b [PATCH] sky2: incremental transmit completion
Since a transmit can take several control blocks, the old code waited
until the last control block was marked as done. This code processes
the return values incrementally. This makes slots in the tx ring available
and less chance of getting stuck.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-09-27 17:56:31 -04:00
Stephen Hemminger 91aeb3edbc [PATCH] sky2: use standard pci register capabilties for error register
Use the standard pci capability mechanism to access PCI express error
registers, rather than hard coding the offset. Mask off the PCI express
error from ever occuring on non-PCI express systems.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-09-27 17:56:31 -04:00
Stephen Hemminger f65b138ca9 [PATCH] sky2: big endian
Fix support for big endian platforms like PPC.
Still not sure about VLAN acceleration (does it need swapping)?

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-09-13 13:27:44 -04:00
Stephen Hemminger b89165f2b7 [PATCH] sky2: fiber support
Fix the support for fiber connected gigabit boards.
Allow half duplex gigabit to be configured.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-09-13 13:27:44 -04:00
Stephen Hemminger 2eaba1a280 [PATCH] sky2: tx pause bug fix
Fix problems with transmit pause frames. The driver was telling the
GMAC to flush (not process) pause frames. Manually disabling pause wasn't
working because of problems in the setup.

This maybe the cause of the lockup under load.
	http://bugzilla.kernel.org/show_bug.cgi?id=6839

Patch against netdev-2.6 git tree

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-09-13 13:27:44 -04:00
shemminger@osdl.org 1d179332f8 [PATCH] sky2: optimize checksum offload information
Since many packets have the same checksum starting offset and insertion
location; the driver can save the last information and only tell hardware
when it changes.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-08-29 17:18:30 -04:00
shemminger@osdl.org 97bda706b4 [PATCH] sky2: dont use force status bit
Don't use force status bit. It was never implemented on all chips, or has
no impact.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-08-29 17:18:29 -04:00
Stephen Hemminger fbb88b3e0b [PATCH] sky2: fix truncated collision threshold mask
Patch to correct broken collision threshold mask in sky2 driver.  Should be
three bits wide, but the mask only allows for 1 bit to be set.

Thanks & Regards
Neil

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>

 sky2.h |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-12 18:39:21 -04:00
Stephen Hemminger 86a31a759f [PATCH] sky2: more fixes for Yukon Ultra
Logic error in the phy initialization code. Also, turn on wake on lan
bit in status control.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-20 00:15:39 -04:00
Stephen Hemminger ed6d32c7a9 Add more support for the Yukon Ultra chip found in dual core centino laptops.
The newest Yukon Ultra chipset's require more special tweaks.
They seem to be like the Yukon XL chipsets. This code is transliterated
from the latest SysKonnect driver; I don't have any Ultra hardware.

Signed-off-by: Stephe Hemminger <shemminger@osdl.org>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-05-08 16:00:27 -07:00
Stephen Hemminger d27ed38765 [PATCH] sky2: add fake idle irq timer
Add an fake NAPI schedule once a second. This is an attempt to work around
for broken configurations with edge-triggered interrupts.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-04-26 06:19:45 -04:00
Stephen Hemminger 43f2f10444 [PATCH] sky2: bad memory reference on dual port cards
Sky2 driver will oops referencing bad memory if used on
a dual port card.  The problem is accessing past end of
MIB counter space.

Applies for both 2.6.17 and 2.6.16 (with fuzz)

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-04-12 18:11:23 -04:00
Alexey Dobriyan 53b3531bbb [PATCH] s/;;/;/g
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-24 07:33:24 -08:00
Stephen Hemminger eadfa7ddca [PATCH] sky2: more ethtool stats
Expose all the available hardware statistics via ethtool.
And cleanup some of the statistics definitions.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-22 20:30:45 -05:00
Stephen Hemminger d257924e85 [PATCH] sky2: handle all error irqs
The hardware has additional error trap interrupt bits.  I have never seen
them trigger, but if they do, it looks like this might be useful.

Signed-off-by: Stephen Hemminger <shemminger@osdl.rog>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-21 16:00:53 -05:00
Stephen Hemminger fb2690a9bf [PATCH] sky2: add MSI support
Add MSI support to sky2 driver.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-21 16:00:52 -05:00
Stephen Hemminger e07b1aa8b3 [PATCH] sky2: rework of NAPI and IRQ management
Redo the interupt handling of sky2 driver based on the IRQ mangement
documentation. All interrupts are handled by the device0 NAPI poll
routine.

Don't need to adjust interrupt mask in IRQ context, done only when
changing device under RTNL. Therefore don't need hwlock anymore.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-21 16:00:52 -05:00
Stephen Hemminger c4b1580e8a [PATCH] sky2: drop broken wake on lan support
Remove wake on lan support for now. It doesn't work right, and I
don't have a machine with working suspend/resume to test or fix it.
It will be re-enabled later.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-21 16:00:52 -05:00
Stephen Hemminger 290d4de5b7 [PATCH] sky2: remove support for untested Yukon EC/rev 0
The Yukon EC/rev0 (A1) chipset requires a bunch of workarounds. I copied these
from sk98lin.  But since they never got tested and add more cruft to the code;
any attempt at using driver as is on this version will probably fail.

It looks like this was a early engineering sample chip revision, if it ever shows
up on a real system. Produce an error message.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-21 16:00:51 -05:00
Stephen Hemminger 958ddb75b0 [PATCH] sky2: remove MSI support
Remove Message Signaled Interrupt support (for 2.6.16).
MSI is inherently edge-triggered and that is incompatiable (without more
work) with NAPI.

In future, will replace with smarter lockless-IRQ handling like
tg3.c

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-02-28 18:06:25 -05:00
Stephen Hemminger 791917deb6 [PATCH] sky2: close race on IRQ mask update.
Need to avoid race in updating IRQ mask.  This can probably be replaced
smarter use of the interrupt control registers (if/when chipset
docs are available).

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-02-23 01:25:26 +01:00
Stephen Hemminger 56a645cc1b [PATCH] sky2: use device iomem to access PCI config
To avoid problems with PCI config access without ACPI (or busted ACPI tables),
use the device's window into PCI config space.

I know this probably will upset the purists, but I would rather have users
than ACPI testers. It also generates less code.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-02-23 01:25:23 +01:00
Stephen Hemminger 977bdf06ca [PATCH] sky2: yukon-ec-u chipset initialization
Add more complete setup code for Yukon EC_U chipset.
Based on matching code in 8.31 code in SysKonnect vendor driver.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-02-23 01:23:36 +01:00
Stephen Hemminger 4d52b48b43 [PATCH] sky2: support msi interrupt (revised)
This hardware supports Message Signaled interrupts.
When setting up, use software interrupt to check for bad hardware.

Signed-off-by: Stephen Hemminger <shemminger @osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2006-02-07 02:00:36 -05:00
Stephen Hemminger 2d42d21f11 [PATCH] sky2: pci config space checking
There were bugs in mmconfig access to PCI space, up to and
include 2.6.16-rc1. These prevented the sky2 driver from being
able to clear PCI express errors.

This patch makes the driver check (during probe), for errors
in PCI config access and fail.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2006-02-07 02:00:35 -05:00
Stephen Hemminger 6cdbbdf305 [PATCH] sky2: tx/rx ring data structure split
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>
2005-12-12 15:27:20 -05:00
Stephen Hemminger 734d186846 [PATCH] sky2: map length optimization
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>
2005-12-12 15:27:20 -05:00
Stephen Hemminger 91c86df5a8 [PATCH] sky2: phy processing in workqueue rather than tasklet
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>
2005-12-12 15:27:20 -05:00
Stephen Hemminger 6e23231b65 [PATCH] sky2: device structure alignment
It is a useful optimization to rearrange the structure
slightly to align receive and transmit portions.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-12-12 15:27:20 -05:00
shemminger@osdl.org af4ed7e6ba [PATCH] sky2: remove pci-express hacks
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>
2005-12-01 02:20:21 -05:00
shemminger@osdl.org 65497dacd8 [PATCH] sky2: byteorder annotation
Use byteorder annotation for hardware structures

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-12-01 02:20:20 -05:00