aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/skge.h
Commit message (Collapse)AuthorAge
* skge: use the DMA state API instead of the pci equivalentsFUJITA Tomonori2010-05-16
| | | | | | | | | | | | | | | This replace the PCI DMA state API (include/linux/pci-dma.h) with the DMA equivalents since the PCI DMA state API will be obsolete. No functional change. For further information about the background: http://marc.info/?l=linux-netdev&m=127037540020276&w=2 Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* skge: use unique IRQ nameMichal Schmidt2009-10-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most network drivers request their IRQ when the interface is activated. skge does it in ->probe() instead, because it can work with two-port cards where the two net_devices use the same IRQ. This works fine most of the time, except in some situations when the interface gets renamed. Consider this example: 1. modprobe skge The card is detected as eth0 and requests IRQ 17. Directory /proc/irq/17/eth0 is created. 2. There is an udev rule which says this interface should be called eth1, so udev renames eth0 -> eth1. 3. modprobe 8139too The Realtek card is detected as eth0. It will be using IRQ 17 too. 4. ip link set eth0 up Now 8139too requests IRQ 17. The result is: WARNING: at fs/proc/generic.c:590 proc_register ... proc_dir_entry '17/eth0' already registered ... And "ls /proc/irq/17" shows two subdirectories, both called eth0. Fix it by using a unique name for skge's IRQ, based on the PCI address. The naming from the example then looks like this: $ grep skge /proc/interrupts 17: 169 IO-APIC-fasteoi skge@pci:0000:00:0a.0, eth0 irqbalance daemon will have to be taught to recognize "skge@" as an Ethernet interrupt. This will be a one-liner addition in classify.c. I will send a patch to irqbalance if this change is accepted. Signed-off-by: Michal Schmidt <mschmidt@redhat.com> Acked-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* skge: add a debug interfaceStephen Hemminger2007-10-16
| | | | | | | Add a debugfs interface to look at internal ring state. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* skge: eeprom supportStephen Hemminger2007-10-16
| | | | | | | Add ability to read/write EEPROM Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* skge: internal statsStephen Hemminger2007-10-16
| | | | | | | Use internal stats structure Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* skge: XM PHY handling fixesStephen Hemminger2007-10-16
| | | | | | | | Change how PHY is managed on SysKonnect fibre based boards. Poll for PHY coming up 1 per second, but use interrupt to detect loss. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* skge: remove broken and unused PHY_M_PC_MDI_XMODE macroMariusz Kozlowski2007-10-10
| | | | | | | | Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Cc: Stephen Hemminger <shemminger@linux-foundation.org> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [NET]: Make NAPI polling independent of struct net_device objects.Stephen Hemminger2007-10-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several devices have multiple independant RX queues per net device, and some have a single interrupt doorbell for several queues. In either case, it's easier to support layouts like that if the structure representing the poll is independant from the net device itself. The signature of the ->poll() call back goes from: int foo_poll(struct net_device *dev, int *budget) to int foo_poll(struct napi_struct *napi, int budget) The caller is returned the number of RX packets processed (or the number of "NAPI credits" consumed if you want to get abstract). The callee no longer messes around bumping dev->quota, *budget, etc. because that is all handled in the caller upon return. The napi_struct is to be embedded in the device driver private data structures. Furthermore, it is the driver's responsibility to disable all NAPI instances in it's ->stop() device close handler. Since the napi_struct is privatized into the driver's private data structures, only the driver knows how to get at all of the napi_struct instances it may have per-device. With lots of help and suggestions from Rusty Russell, Roland Dreier, Michael Chan, Jeff Garzik, and Jamal Hadi Salim. Bug fixes from Thomas Graf, Roland Dreier, Peter Zijlstra, Joseph Fannin, Scott Wood, Hans J. Koch, and Michael Chan. [ Ported to current tree and all drivers converted. Integrated Stephen's follow-on kerneldoc additions, and restored poll_list handling to the old style to fix mutual exclusion issues. -DaveM ] Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* skge: rearrange fieldsStephen Hemminger2007-04-28
| | | | | | | | Do some minor rearrangement of data structures to try and optimize cache usage. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* skge: ignore unused error interruptsStephen Hemminger2007-04-28
| | | | | | | | The following hardware error bits only show up on Genesis chipset and are handled elsewhere, so they can be masked off. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* skge: use per-port phy lockingStephen Hemminger2007-03-23
| | | | | | | | | Rather than a workqueue and a per-board mutex to control PHY, use a tasklet and spinlock. Tasklet is lower overhead and works just as well for this. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* skge: fix transmitter flow controlStephen Hemminger2007-02-27
| | | | | | | | | | | | It looks like the skge driver inherited another bug from the sk98lin code. If I send from 1000mbit port to a machine on 100mbit port, the switch should be doing hardware flow control, but no pause frames show up in the statistics. This is the analog of the recent sky2 fixes. The device needs to listen for multicast pause frames and then not discard them. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* skge: WOL supportStephen Hemminger2007-02-06
| | | | | | | Add WOL support for Yukon chipsets in skge device. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [PATCH] skge: fix sparse warningsStephen Hemminger2006-12-07
| | | | | | | | Fix sparse warnings from using enum as part of arithmetic expression, and comment indentation fixes Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* WorkStruct: make allyesconfigDavid Howells2006-11-22
| | | | | | Fix up for make allyesconfig. Signed-Off-By: David Howells <dhowells@redhat.com>
* [PATCH] skge: better flow control negotiationStephen Hemminger2006-10-11
| | | | | | | | | Do flow control negotiation properly. Don't let auto negotiation status limit renegotiation. Separate desired pause values from the result of auto negotiation. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [PATCH] skge: fix stuck irq when fiber downStephen Hemminger2006-10-11
| | | | | | | | | The PHY interrupt from the internal fiber is getting stuck on when the link is down. Add code to handle the transition and mask it. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [PATCH] skge: fiber supportStephen Hemminger2006-09-25
| | | | | | | | | Add support for older fiber versions of the SysKonnect board. These chipsets use an internal PHY so they require special handling. The older sk98lin driver already supported these Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [PATCH] skge: use NAPI for transmit completeStephen Hemminger2006-09-06
| | | | | | | | | The skge driver has much better performance if transmit done is handled in NAPI softirq. Change from doing transmit locking in driver (LLTX) and use device lock. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [PATCH] skge: fix truncated collision threshold maskStephen Hemminger2006-07-12
| | | | | | | | | Patch to correct broken collision threshold mask in (same problem as sky2 driver). Should be three bits wide, but the mask only allows for 1 bit to be set. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [PATCH] skge: transmit complete via IRQ not NAPIStephen Hemminger2006-06-08
| | | | | | | | | The transmit side code has a number of ring problems that caused some of the Bugzilla reports. Rather than trying to fix the details, it is safer to rewrite the code that handles transmit completion and freeing. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [PATCH] skge: use workq for PHY handlingStephen Hemminger2006-06-08
| | | | | | | | Since accessing the PHY can take 100's of usecs, use a work queue to allow spinning in outside of soft/hard irq. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [PATCH] skge: compute available ring buffersStephen Hemminger2006-03-23
| | | | | | | | | Don't need to keep track of available buffers, it is simpler to just compute the value (ala e1000). Don't need tes on link up because should always have available buffers then. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [PATCH] skge: use auto masking of irqsStephen Hemminger2006-03-21
| | | | | | | | | Improve performance of skge driver by not touching irq mask register as much. Since the interrupt source auto-masks, the driver can just leave it disabled until the end of the soft irq. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* skge: protect interrupt maskStephen Hemminger2006-02-23
| | | | | | | | There is a race between updating the irq mask and setting it which can be triggered on SMP with a bad cable. Similar patch from Ingo Molnar and Thomas Gleixner Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
* [PATCH] skge: get rid of Yukon2 definesStephen Hemminger2005-12-24
| | | | | | | | Don't need to keep Yukon-2 related definitions around for Skge driver that is only for Yukon-1 and Genesis. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* [PATCH] skge: clear PCI PHY COMA mode on bootStephen Hemminger2005-11-08
| | | | | | | | When skge is booted up, the PHY may be stuck in power down state by the previous OS. So we may need to turn it on. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* [PATCH] skge: check length from PHYStephen Hemminger2005-09-21
| | | | | | Cleanup receive buffer allocation and management, Add more error handling checks from PHY and bump version. Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* [PATCH] skge: gmac register access errors in dual portStephen Hemminger2005-09-14
| | | | | | | | | | | | | Merge of four previous patches and the Kconfig fix * Remove debug printk's * whitespace cleanup and version number change * clear interrupts, reset phy, and reset hardware on shutdown * ignore 64bit counter overflow interrupts * fix a couple of places where second port could clobber state of first port. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* [PATCH] skge: fibre vs copper detection cleanupStephen Hemminger2005-08-16
| | | | | | | | | | | Cleanup the code that handles fibre vs copper detection. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> drivers/net/skge.c | 26 ++++++++++++-------------- drivers/net/skge.h | 11 ++--------- 2 files changed, 14 insertions(+), 23 deletions(-) Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* [PATCH] skge: stop bogus sensor messagesStephen Hemminger2005-08-16
| | | | | | | | | | | | | | | Some versions of the Marvell yukon generate bogus sensor warning interrupts. The driver would flood log with these messages. Handle this situation cleanly by masking away at boot time. Fixes: http://bugs.gentoo.org/show_bug.cgi?id=87182 Signed-off-by: Stephen Hemminger <shemminger@osdl.org> drivers/net/skge.c | 24 ++++++++++-------------- drivers/net/skge.h | 8 ++++++-- 2 files changed, 16 insertions(+), 16 deletions(-) Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* [PATCH] skge: led toggle cleanupStephen Hemminger2005-07-31
| | | | | | | | | Cleanup code that is used to toggle LED's. Since we get called from ethtool, can use that thread rather than setting up a timer. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* [PATCH] skge: ignore phy interrupts during negotiationStephen Hemminger2005-07-31
| | | | | | | | During autonegotiation set PHY interrupt mask to ignore bogus speed change interrupts. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* [PATCH] skge: fifo control register access fixStephen Hemminger2005-07-31
| | | | | | | | The code to clear fifo errors was incorrect and sending garbage to the external phy. Removed the no longer used inline's funcs. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* [PATCH] skge: whitespace fixesStephen Hemminger2005-07-31
| | | | | | | Minor whitespace cleanups. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* [SKGE]: Fix build on big-endianDavid S. Miller2005-07-05
| | | | | | Missing PCI_REV_DESC define. Signed-off-by: David S. Miller <davem@davemloft.net>
* [PATCH] skge: Rx buffer optimizationStephen Hemminger2005-06-27
| | | | | | | Optimize the receive buffer management code to replenish the buffers immediately (like tg3). Signed-off-by: Stephen Hemmminger <shemminger@osdl.org>
* [PATCH] skge: handle Tx/Rx arbiter timeoutStephen Hemminger2005-06-27
| | | | | | | | Need to handle receive and transmit packet arbiter timeouts. Transmit arbiter timeouts happens when Gigabit sends to 100Mbit port on same switch and pause occurs. Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
* [PATCH] skge: add PHY related debug messagesStephen Hemminger2005-06-27
| | | | | | | | Cleanup messages (for debug) about PHY interrrupts, because when user can't get driver working that is often the problem. Use a consistent way of enabling interrupts by port. Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
* [PATCH] skge: make Genesis/Broadcom code workStephen Hemminger2005-06-27
| | | | | | | | | Rewrite the code for handling the Broadcom PHY to something that works. Remove link polling because Broadcom and Yukon don't need it. When I wrote initial code, didn't have a genesis chipset based board to test, so it was a non-working guess. Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
* [PATCH] skge: remove unused declarationsStephen Hemminger2005-06-27
| | | | | | | Get rid of definitions for chip versions and PHY chips that this driver does not support. Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
* [PATCH] skge: replace chip_rev() accessorStephen Hemminger2005-06-27
| | | | | | | Replace inline accessor functions for chip revision and number of ports with simple structure members. Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
* [PATCH] skge: function amd macro name changeStephen Hemminger2005-06-27
| | | | | | | | | | | | | | | The inlines and macro's needed some cleanup's and fixes: * change name of macro SKGEMAC_REG to SK_REG to better reflect usage and fix comments * ditto for SK_GEXM_REG -> SK_XMAC_REG and SKGEGMA_REG -> SK_GMA_REG * change skge_gm_ to just gm_ since it is just a local function and long names look ugly. * change skge_xm_ to just xm_ * fix xm_write32 to write as two u16's with correct byte order * fix xm_outaddr to correctly use offset Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
* [PATCH] skge: whietspace cleanupStephen Hemminger2005-06-27
| | | | | | Cleanup whitespace around if() and switch() and end of lines Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
* [netdrvr] new driver skge, for SysKonnect cardsStephen Hemminger2005-05-12