aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sundance.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-01-07drivers/net/: use DEFINE_PCI_DEVICE_TABLE()Alexey Dobriyan1-1/+1
Use DEFINE_PCI_DEVICE_TABLE() so we get place PCI ids table into correct section in every case. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-03drivers/net: Move && and || to end of previous lineJoe Perches1-8/+8
Only files where David Miller is the primary git-signer. wireless, wimax, ixgbe, etc are not modified. Compile tested x86 allyesconfig only Not all files compiled (not x86 compatible) Added a few > 80 column lines, which I ignored. Existing checkpatch complaints ignored. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-18drivers/net: request_irq - Remove unnecessary leading & from second argJoe Perches1-1/+1
Not as fancy as coccinelle. Checkpatch errors ignored. Compile tested allyesconfig x86, not all files compiled. grep -rPl --include=*.[ch] "\brequest_irq\s*\([^,\)]+,\s*\&" drivers/net | while read file ; do \ perl -i -e 'local $/; while (<>) { s@(\brequest_irq\s*\([^,\)]+,\s*)\&@\1@g ; print ; }' $file ;\ done Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-09-01netdev: convert bulk of drivers to netdev_tx_tStephen Hemminger1-2/+2
In a couple of cases collapse some extra code like: int retval = NETDEV_TX_OK; ... return retval; into return NETDEV_TX_OK; Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller1-3/+3
Conflicts: arch/microblaze/include/asm/socket.h
2009-07-08Remove multiple KERN_ prefixes from printk formatsJoe Perches1-3/+3
Commit 5fd29d6ccbc98884569d6f3105aeca70858b3e0f ("printk: clean up handling of log-levels and newlines") changed printk semantics. printk lines with multiple KERN_<level> prefixes are no longer emitted as before the patch. <level> is now included in the output on each additional use. Remove all uses of multiple KERN_<level>s in formats. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-07-05net: use NETDEV_TX_OK instead of 0 in ndo_start_xmit() functionsPatrick McHardy1-1/+1
This patch is the result of an automatic spatch transformation to convert all ndo_start_xmit() return values of 0 to NETDEV_TX_OK. Some occurences are missed by the automatic conversion, those will be handled in a seperate patch. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-27net: use netdev stats in b44, sundance, via-rhine and via-velocityEric Dumazet1-25/+28
Use struct net_device_stats provided in struct net_device instead of private ones. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-26sundance: fix non-constant printk warningsStephen Hemminger1-2/+3
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-20sundance: missing parentheses?Roel Kluin1-1/+1
Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-07sundance: update to net_device_opsStephen Hemminger1-8/+15
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-03drivers/net: Kill now superfluous ->last_rx stores.David S. Miller1-1/+0
The generic packet receive code takes care of setting netdev->last_rx when necessary, for the sake of the bonding ARP monitor. Drivers need not do it any more. Some cases had to be skipped over because the drivers were making use of the ->last_rx value themselves. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-27net: convert print_mac to %pMJohannes Berg1-3/+2
This converts pretty much everything to print_mac. There were a few things that had conflicts which I have just dropped for now, no harm done. I've built an allyesconfig with this and looked at the files that weren't built very carefully, but it's a huge patch. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-24sundance: set carrier status on link change eventsDan Nicholson1-33/+62
Check if the link is available when a changed interrupt has been received and set the carrier status appropriately. The code is copied nearly verbatim from the dl2k module. The link status could be used in more places in the driver, but this is enough to get the carrier status reported to userspace. Fixes kernel bug #7487: http://bugzilla.kernel.org/show_bug.cgi?id=7487 [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-01-28sundance: SIOCDEVPRIVATE pollutionFrancois Romieu1-26/+0
To quote one of my favorite contemporary author: [include/linux/sockios.h] * THESE IOCTLS ARE _DEPRECATED_ AND WILL DISAPPEAR IN 2.5.X -DaveM */ #define SIOCDEVPRIVATE 0x89F0 /* to 89FF */ [...] Gentoo's snmpd trips up over this code when trying to figure if the driver supports the non-SIOCDEVPRIVATE API or not. One can argue over its choice of heuristic but there no reason to make ioctl more ugly than needed. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Cc: Jesse Huang <jesse@icplus.com.tw> Tested-by: Volker Sauer <vsauer@dvs.tu-darmstadt.de> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-12-14sundance fixesAl Viro1-17/+17
* all places where we assign ->addr get cpu_to_le32(pci_map_single(....)), so we ought to convert back to host-endian before doing pci_unmap_single() et.al. * poisoning addresses in netdev_close() should be done _after_ unmapping them, not before it... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10[netdrvr] sundance: fix phy scanning on IP100AJeff Garzik1-3/+11
Based on a based from Jesse Huang <jesse@icplus.com.tw>. Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10[NET]: Introduce and use print_mac() and DECLARE_MAC_BUF()Joe Perches1-6/+4
This is nicer than the MAC_FMT stuff. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10[NET]: Nuke SET_MODULE_OWNER macro.Ralf Baechle1-1/+0
It's been a useless no-op for long enough in 2.6 so I figured it's time to remove it. The number of people that could object because they're maintaining unified 2.4 and 2.6 drivers is probably rather small. [ Handled drivers added by netdev tree and some missed IRDA cases... -DaveM ] Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-07-31[NET]: ethtool_perm_addr only has one implementationMatthew Wilcox1-1/+0
All drivers implement ethtool get_perm_addr the same way -- by calling the generic function. So we can inline the generic function into the caller and avoid going through the drivers. Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-07-12Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6Linus Torvalds1-5/+2
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: (34 commits) PCI: Only build PCI syscalls on architectures that want them PCI: limit pci_get_bus_and_slot to domain 0 PCI: hotplug: acpiphp: avoid acpiphp "cannot get bridge info" PCI hotplug failure PCI: hotplug: acpiphp: remove hot plug parameter write to PCI host bridge PCI: hotplug: acpiphp: fix slot poweroff problem on systems without _PS3 PCI: hotplug: pciehp: wait for 1 second after power off slot PCI: pci_set_power_state(): check for PM capabilities earlier PCI: cpci_hotplug: Convert to use the kthread API PCI: add pci_try_set_mwi PCI: pcie: remove SPIN_LOCK_UNLOCKED PCI: ROUND_UP macro cleanup in drivers/pci PCI: remove pci_dac_dma_... APIs PCI: pci-x-pci-express-read-control-interfaces cleanups PCI: Fix typo in include/linux/pci.h PCI: pci_ids, remove double or more empty lines PCI: pci_ids, add atheros and 3com_2 vendors PCI: pci_ids, reorder some entries PCI: i386: traps, change VENDOR to DEVICE PCI: ATM: lanai, change VENDOR to DEVICE PCI: Change all drivers to use pci_device->revision ...
2007-07-11PCI: Change all drivers to use pci_device->revisionAuke Kok1-5/+2
Instead of all drivers reading pci config space to get the revision ID, they can now use the pci_device->revision member. This exposes some issues where drivers where reading a word or a dword for the revision number, and adding useless error-handling around the read. Some drivers even just read it for no purpose of all. In devices where the revision ID is being copied over and used in what appears to be the equivalent of hotpath, I have left the copy code and the cached copy as not to influence the driver's performance. Compile tested with make all{yes,mod}config on x86_64 and i386. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Acked-by: Dave Jones <davej@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-10[NET]: Kill eth_copy_and_sum().David S. Miller1-1/+1
It hasn't "summed" anything in over 7 years, and it's just a straight mempcy ala skb_copy_to_linear_data() so just get rid of it. Signed-off-by: David S. Miller <davem@davemloft.net>
2007-05-09remove broken URLs from net drivers' outputMarkus Dahms1-2/+1
Remove broken URLs (www.scyld.com) from network drivers' logging output. URLs in comments and other strings are left intact. Signed-off-by: Markus Dahms <dahms@fh-brandenburg.de> Acked-by: Jesper Juhl <jesper.juhl@gmail.com> Acked-by: Alan Cox <alan@redhat.com> igned-off-by: Adrian Bunk <bunk@stusta.de>
2007-04-25[ETH]: Make eth_type_trans set skb->dev like the other *_type_transArnaldo Carvalho de Melo1-1/+0
One less thing for drivers writers to worry about. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2006-12-02[PATCH] sundance: use NULL for pointerRandy Dunlap1-2/+2
Use NULL instead of 0 for pointers (cures sparse warnings). drivers/net/sundance.c:1106:16: warning: Using plain integer as NULL pointer drivers/net/sundance.c:1652:16: warning: Using plain integer as NULL pointer Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-02[PATCH] sundance: solve host error problem in low performance embedded system when continune down and upJesse Huang1-3/+23
Solve host error problem in low performance embedded system when continune down and up. It will cause IP100A DMA TargetAbort. So we need more safe process to up and down IP100A with wait hardware completely stop and software cur_tx/ dirty_tx/cur_task/last_tx be clear. Signed-off-by: Jesse Huang <jesse@icplus.com.tw> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-02[PATCH] sundance: correct initial and close hardware step.Jesse Huang1-0/+8
Correct initial and close hardware step. In some embedded system down and up IP100A will cause DMA crash. We add some for safe down and up IP100A. Signed-off-by: Jesse Huang <jesse@icplus.com.tw> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-02[PATCH] subdance: fix TX Pause bug (reset_tx, intr_handler)Jesse Huang1-2/+14
Fix TX Pause bug (reset_tx, intr_handler). When MaxCollisions occurred, need to re-enable Tx. But just after re-enable, MaxCollisions maybe occurred again and with TxStatusOverflow. This will cause driver can't check new MaxCollisions to re-enable Tx again, because TxStatusOverflow. For this reason, after re-enable Tx, we need to make sure Tx was actually enabled. Signed-off-by: Jesse Huang <jesse@icplus.com.tw> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-02[PATCH] sundance: remove TxStartThresh and RxEarlyThreshJesse Huang1-6/+2
For patent issue need to remove TxStartThresh and RxEarlyThresh. This patent is cut-through patent. If use this function, Tx will start to transmit after few data be move in to Tx FIFO. We are not allow to use those function in DFE530/DFE550/DFE580/DL10050/IP100/IP100A. It will decrease a little performance. Signed-off-by: Jesse Huang <jesse@icplus.com.tw> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-05IRQ: Maintain regs pointer globally rather than passing to IRQ handlersDavid Howells1-2/+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-09-13drivers/net: const-ify ethtool_ops declarationsJeff Garzik1-2/+2
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-09-13drivers/net: Trim trailing whitespaceJeff Garzik1-22/+22
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-09-12Merge branch 'tmp' into upstreamJeff Garzik1-4/+2
2006-09-12[PATCH] Remove more unnecessary driver printk'sAndy Gospodarek1-4/+2
As I promised last week, here is the first pass at removing all unnecessary printk's that exist in network device drivers currently in promiscuous mode. The duplicate messages are not needed so they have been removed. Some of these drivers are quite old and might not need an update, but I did them all anyway. I am currently auditing the remaining conditional printk's and will send out a patch for those soon. Signed-off-by: Andy Gospodarek <andy@greyhouse.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-08-19drivers/net: Remove deprecated use of pci_module_init()Jeff Garzik1-1/+1
From: Michal Piotrowski <michal.k.k.piotrowski@gmail.com> Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-08-19Merge branch 'upstream-fixes' into upstreamJeff Garzik1-1/+1
2006-08-19[PATCH] sundance section fixAndrew Morton1-1/+1
drivers/net/sundance.c:110: error: version causes a section type conflict I don't understand this error. It's referred to from both __init and __devinit code. With CONFIG_HOTPLUG=n, version[] is placed in .init.data and is referred to from .init.text. Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-08-09[PATCH] sundance: small cleanupPhilippe De Muyter1-8/+5
This patch uses the sundance_reset function everywhere a reset is done, and adds a link to the archives of the original mailing list. Signed-off-by: Philippe De Muyter <phdm@macqel.be> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-05[netdrvr] minor cleanups in Becker-derived driversJeff Garzik1-11/+11
- fealnx: convert #define to enum - fealnx, sundance: mark chip info table __devinitdata - fealnx: use dev_printk() during probe - fealnx: formatting cleanups - starfire: remove obsolete comment - sundance, via-rhine: add some whitespace where useful, in tables - sundance: prefer "{ }" table terminator - via-rhine: mark PCI probe table const Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-05[netdrvr] Remove Linux-specific changelogs from several Becker template driversJeff Garzik1-81/+3
When in-kernel net drivers branched from Donald Becker's vanilla driver set, in the days before BitKeeper and git, a driver changelog was maintained in the driver source code. These days, the kernel's changelog is far superior and much more accurate, so the in-driver changelogs are removed. Another relic of the Becker/kernel split was version numbering, using "foo-LKx.y.z" notation, resulting in weird version numbers like "1.17b-LK1.1.9". These drivers are for older hardware, and see few changes these days, so the version numbers were all bumped to something more simple. Finally, in xircom_tulip_cb specifically, an additional cleanup removes the always-enabled CARDBUS cpp macro. Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-02[PATCH] irq-flags: drivers/net: Use the new IRQF_ constantsThomas Gleixner1-1/+1
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: "David S. Miller" <davem@davemloft.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-15sundance: PCI ID for ip100aPedro Alejandro López-Valencia1-2/+6
Patch provided by Pedro Alejandro López-Valencia in http://bugzilla.kernel.org/show_bug.cgi?id=6691 The patch is derived from IC+ GPL'ed rework of sundance driver available at http://www.icplus.com.tw/pp-IP100A.html Patch closes http://bugzilla.kernel.org/show_bug.cgi?id=5858 as well. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Cc: Pedro Alejandro López-Valencia <palopezv@gmail.com>
2006-03-03Merge branch 'net-const'Jeff Garzik1-2/+2
2006-03-03Massive net driver const-ification.Arjan van de Ven1-2/+2
2006-01-26sundance: Really read addr 0Arnaldo Carvalho de Melo1-1/+5
Make phy 0 actually be read, as it is not being right now as we have: int mii_status = mdio_read(dev, phy, MII_BMSR); int phyx = phy & 0x1f; When we should have instead: int phyx = phy & 0x1f; int mii_status = mdio_read(dev, phyx, MII_BMSR); so that when phy, in the end of the (phy = 1; phy <= 32...) loop gets to 32 phyx gets to 0, i.e. we were reading at 32, when the intended read was for 0. Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-10-28[PATCH] sundance: fix DFE-580TX Tx UnderrunPhilippe De Muyter1-14/+48
Under heavy PCI bus load, ports of the DFE-580TX 4-ethernet port board stop working, with currently no other cure than a powercycle. Here is a tested fix. By the way, I also fixed some references and attribution. Signed-off-by: Philippe De Muyter <phdm@macqel.be> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-10-20[PATCH] sundance: include MII address 0 in PHY probeJohn W. Linville1-4/+5
Include MII address 0 at the end of the PHY scan. This covers the entire range of possible MII addresses. Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-10-18[PATCH] sundance: expand reset maskJohn W. Linville1-1/+1
Expand the mask used when reseting the chip to include the GlobalReset bit. This fix comes from ICPlus and seems to be required for some cards. Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-10-18[PATCH] sundance: remove if (1) { ... } block in sundance_probe1John W. Linville1-23/+21
Remove an if (1) { ... } block in sundance_probe1. Its purpose seems to be only to allow for delaring some extra local variables. But, it also adds ugly indentation without adding any meaning to the code. Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>