aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sky2.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2007-02-07sky2: version 1.12Stephen Hemminger1-1/+1
Updated version for WOL and new id's Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-07sky2: add new chip idsStephen Hemminger1-0/+4
More new chip id's from vendor driver version 10.0.4.3 Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-07sky2: Yukon Extreme supportStephen Hemminger1-12/+37
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-07sky2: safer transmit timeoutStephen Hemminger1-26/+15
Rather than trying to be "smart" about possible transmit timeout causes. Just clear all pending frames and reset the PHY. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-07sky2: TSO support for EC_UStephen Hemminger1-4/+3
The Yukon EC_U chipset apparently supports TSO but only for non-Jumbo frame sizes because it lacks a Ram buffer. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-07sky2: use dev_err for error reportsStephen Hemminger1-44/+31
Use the standard dev_xxx functions instead of printk directly for error reports. Fix a bug where the initialization would return 0 if allocation of network device failed. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-07sky2: add Wake On Lan supportStephen Hemminger1-27/+181
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-05sky2: handle network device allocation failureshemminger@linux-foundation.org1-6/+14
If alloc_etherdev() failed, then sky2_init_netdev will return NULL, and sky2_probe would end up returning 0 instead of -ENOMEM. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05sky2: software rx/tx statsshemminger@linux-foundation.org1-16/+5
Maintain packet statistics in software rather than hardware. This is slightly slower, but allows easier debugging of problems where packets are still being received by PHY but not being handled by hardware. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05sky2: version 1.11.1shemminger@linux-foundation.org1-1/+1
Version update to 1.11.1. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05sky2: better power state managementStephen Hemminger1-83/+57
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-01-29[PATCH] sky2: revert IRQ dance on suspend/resumeStephen Hemminger1-25/+0
Let's just backout the IRQ hack, and for those crap machines (like some Sony VAIO's) can just disable MSI with the module parameter. This reverts 44ade178249fe53d055fd92113eaa271e06acddd. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Cc: Jeff Garzik <jeff@garzik.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Frédéric Riss <frederic.riss@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-01-23[PATCH] email change for shemminger@osdl.orgStephen Hemminger1-1/+1
Change my email address to reflect OSDL merger. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> [ The irony. Somebody still has his sign-off message hardcoded in a script or his brainstem ;^] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2006-12-26sky2: phy power down needs PCI config write enabledStephen Hemminger1-1/+2
In order to change PCI registers (via the iomap'd window), it needs to be enabled; this wasn't being done in sky2_phy_power the function that turns on/off power to the PHY. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26sky2: power management/MSI workaroundStephen Hemminger1-0/+25
MSI doesn't work properly on resume on many platforms because the BIOS goes and changes it back to INTx mode after the sky2 driver has restored in resume. It is really a bug in the base power management resume code, and this workaround is temporary until the change to PM code works it's way through the release process. The PM fix is non-trivial since it needs to change when non-boot CPU's are enabled. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26sky2: dual port NAPI problemStephen Hemminger1-0/+7
Shutting down port 0 disables the NAPI poll used by both ports. The long term fix will be to separate NAPI object from net device until then just reenable if needed. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-07[PATCH] sky2: sparse warningsStephen Hemminger1-14/+4
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[PATCH] sky2: receive queue watermark tweakStephen Hemminger1-3/+8
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[PATCH] sky2: beter ram buffer partitioningStephen Hemminger1-16/+25
Different chips have different sizes of ram buffers, and some versions have no ram buffer at all!. Be more careful about sizing the ram usage because it maybe a problem if vendor keeps changing sizes. There is the (unlikely) possibility that some of the errors on some of the chips have been caused by partitioning not on a 1K boundary. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-07[PATCH] sky2: add comments to PCI idsStephen Hemminger1-25/+23
Add comments to sky2 driver to show relationship between PCI id and hardware. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-07[PATCH] sky2: add PCI for 88ec033Stephen Hemminger1-0/+1
Add another new/missing pci id for 88ec033 chip. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-02[NET]: Split skb->csumAl Viro1-1/+1
... into anonymous union of __wsum and __u32 (csum and csum_offset resp.) Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
2006-12-02[PATCH] sky2: msi enhancements.Stephen Hemminger1-7/+10
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[PATCH] sky2: kfree_skb_any neededStephen Hemminger1-1/+1
It is possible for the sky2 driver NAPI poll routine to be called with IRQ's disabled if netpoll is trying to make space in the tx queue. This is an obscure path, but if it happens, the kfree_skb needs to happen via softirq. Calling kfree_skb with IRQ's disabled is a not allowed. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-02[PATCH] sky2: fixes for Yukon EC_U chip revisionsStephen Hemminger1-7/+6
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[PATCH] sky2: add Dlink 560SX idStephen Hemminger1-0/+1
Add new PCI ID for DLink 560SX. This from the latest SysKonnect vendor driver (version 8.41). Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-02[PATCH] sky2: receive error handling fixStephen Hemminger1-3/+3
If sky2 detects out of memory, or gets a bad frame, it reuses the same receive buffer, but forgets to poke the hardware. This could lead to the receiver getting stuck if there were lots of errors. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-31[PATCH] sky2: netpoll on dual port cardsStephen Hemminger1-1/+5
The sky2 driver uses a single NAPI poll routine for both ports on dual ported cards (because there is a single IRQ and status ring). Netpoll makes assumptions about the relationship between network device and NAPI that aren't correct on the second port, this will cause the port to never clear work. Most systems, just have single port, so not a big issue. The easy fix is just make the second port, not netpoll capable. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-31[PATCH] skge, sky2, et all. gplv2 onlyStephen Hemminger1-2/+1
I don't want my code to downgraded to GPLv3 because of cut-n-pasted the comments. These files which I hold copyright on were started before it was clear what GPLv3 was going to be. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-21[PATCH] sky2: 88E803X transmit lockupStephen Hemminger1-21/+12
The reason sky2 driver was locking up on transmit on the Yukon-FE chipset is that it was misconfiguring the internal RAM buffer so the transmitter and receiver were sharing the same space. The code assumed there was 16K of RAM on Yukon-FE (taken from vendor driver sk98lin which is even more f*cked up on this). Then it assigned based on that. The giveaway was that the registers would only hold 9bits so both RX/TX had 0..1ff for space. It is a wonder it worked at all! This patch addresses this, and fixes an easily reproducible hang on Transmit. Only the Yukon-FE chip is Marvell 88E803X (10/100 only) are affected. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-17sky2: accept multicast pause framesStephen Hemminger1-6/+18
When using flow control, the PHY needs to accept multicast pause frames. Without this fix, these frames were getting discarded by the PHY before doing any flow control. Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-10-17sky2: version 1.9Stephen Hemminger1-1/+1
Mark version, this has been a lot of patches. Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-10-17sky2: no message on rx fifo overflowStephen Hemminger1-2/+4
Under high load it is possible to make the receiver FIFO get overloaded. The driver/hardware recover properly, so there is no reason to fill the log with lots of extra messages, just update counter. Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-10-17sky2: flow control setting fixesStephen Hemminger1-43/+72
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-17sky2: don't reset PHY twiceStephen Hemminger1-12/+1
Don't need to reset PHY twice on startup. Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-10-17sky2: use duplex result bitsStephen Hemminger1-20/+1
The result of duplex negotiation is avaliable in the phy status register, so use that to simplify code and avoid rereading the PHY. Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-10-17sky2: fiber pause bitsStephen Hemminger1-8/+19
The advertisement bits for flow control are located in different location on fiber (1000baseX) Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-10-17sky2: phy irq on shutdownStephen Hemminger1-8/+8
When PHY is turned off on shutdown, it causes the IRQ to get stuck on. Make sure and disable the IRQ first, and if IRQ occurs when device is not running, don't access PHY because that will hang. Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-10-17sky2: turn of workaround timerStephen Hemminger1-2/+2
The workaround timer is not needed in most systems with proper IRQ routing and by perodically waking up it adds to laptop power consumption. Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-10-17sky2: MSI test is only a warningStephen Hemminger1-3/+3
Some motherboards don't implement MSI correctly. The driver handles this but the warning is too verbose and overly cautious. Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-10-11[PATCH] sky2: set lower pause threshold to prevent overrunStephen Hemminger1-1/+1
Adjust the pause threshold on slower systems to keep from getting overrun. Since FIFO is 2K bytes, don't send XON pause until there is space for a full frame. Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-11[PATCH] sky2: revert pci express extensionsStephen Hemminger1-22/+8
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 91aeb3edbcf4e6ed72d138ac8c22fd68e6d717c3 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-11Merge branch 'master' into upstream-fixesJeff Garzik1-3/+2
2006-10-05IRQ: Maintain regs pointer globally rather than passing to IRQ handlersDavid Howells1-3/+2
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead of passing regs around manually through all ~1800 interrupt handlers in the Linux kernel. The regs pointer is used in few places, but it potentially costs both stack space and code to pass it around. On the FRV arch, removing the regs parameter from all the genirq function results in a 20% speed up of the IRQ exit path (ie: from leaving timer_interrupt() to leaving do_IRQ()). Where appropriate, an arch may override the generic storage facility and do something different with the variable. On FRV, for instance, the address is maintained in GR28 at all times inside the kernel as part of general exception handling. Having looked over the code, it appears that the parameter may be handed down through up to twenty or so layers of functions. Consider a USB character device attached to a USB hub, attached to a USB controller that posts its interrupts through a cascaded auxiliary interrupt controller. A character device driver may want to pass regs to the sysrq handler through the input layer which adds another few layers of parameter passing. I've build this code with allyesconfig for x86_64 and i386. I've runtested the main part of the code on FRV and i386, though I can't test most of the drivers. I've also done partial conversion for powerpc and MIPS - these at least compile with minimal configurations. This will affect all archs. Mostly the changes should be relatively easy. Take do_IRQ(), store the regs pointer at the beginning, saving the old one: struct pt_regs *old_regs = set_irq_regs(regs); And put the old one back at the end: set_irq_regs(old_regs); Don't pass regs through to generic_handle_irq() or __do_IRQ(). In timer_interrupt(), this sort of change will be necessary: - update_process_times(user_mode(regs)); - profile_tick(CPU_PROFILING, regs); + update_process_times(user_mode(get_irq_regs())); + profile_tick(CPU_PROFILING); I'd like to move update_process_times()'s use of get_irq_regs() into itself, except that i386, alone of the archs, uses something other than user_mode(). Some notes on the interrupt handling in the drivers: (*) input_dev() is now gone entirely. The regs pointer is no longer stored in the input_dev struct. (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does something different depending on whether it's been supplied with a regs pointer or not. (*) Various IRQ handler function pointers have been moved to type irq_handler_t. Signed-Off-By: David Howells <dhowells@redhat.com> (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
2006-10-05[PATCH] sky2: incorrect length on receive packetsStephen Hemminger1-2/+2
The previous change to do fragmented receive (post 2.6.18) introduced a bug where packets are passed up with size set to the size of the receive buffer not the actual received data. IP silently trims this so it didn't show up right away. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-09-27[PATCH] sky2: version 1.9Stephen Hemminger1-1/+1
Version 1.9 is for 2.6.19. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-09-27[PATCH] sky2: fragmented receive for large MTUStephen Hemminger1-79/+211
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[PATCH] sky2: use netif_tx_lock instead of LLTXStephen Hemminger1-40/+17
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[PATCH] sky2: incremental transmit completionStephen Hemminger1-48/+47
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[PATCH] sky2: name irq after eth for irqbalanceStephen Hemminger1-21/+16
Use the ethernet device name when requesting the irq because the irqbalance daemon looks for the name when deciding policy. Better to play along with this dubious heuristic. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>