summaryrefslogtreecommitdiff
path: root/drivers/net/au1000_eth.c
AgeCommit message (Collapse)Author
2011-08-10amd: Move AMD (Lance) chipset driversJeff Kirsher
Moves the drivers for the AMD chipsets into drivers/net/ethernet/amd/ and the necessary Kconfig and Makfile changes. The au1000 (Alchemy) driver was also moved into the same directory even though it is not a "Lance" driver. CC: Peter Maydell <pmaydell@chiark.greenend.org.uk> CC: Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de> CC: "Maciej W. Rozycki" <macro@linux-mips.org> CC: Donald Becker <becker@scyld.com> CC: Sam Creasey <sammy@users.qual.net> CC: Miguel de Icaza <miguel@nuclecu.unam.mx> CC: Thomas Bogendoerfer <tsbogend@alpha.franken.de> CC: Don Fry <pcnet32@frontier.com> CC: Geert Uytterhoeven <geert@linux-m68k.org> CC: Russell King <linux@arm.linux.org.uk> CC: David Davies <davies@maniac.ultranet.com> CC: "M.Hipp" <hippm@informatik.uni-tuebingen.de> CC: Pete Popov <ppopov@embeddedalley.com> CC: David Hinds <dahinds@users.sourceforge.net> CC: "Roger C. Pao" <rpao@paonet.org> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2010-12-11net: au1000_eth: remove unused global variable.Manuel Lauss
The driver global au_macs[] is unused in the entire kernel tree, so remove it. Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-11-28au1000_eth: fix invalid address accessing the MAC enable registerWolfgang Grandegger
"aup->enable" holds already the address pointing to the MAC enable register. The bug was introduced by commit d0e7cb: "au1000-eth: remove volatiles, switch to I/O accessors". CC: Florian Fainelli <florian@openwrt.org> Signed-off-by: Wolfgang Grandegger <wg@denx.de> Acked-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-09au1000-eth: change multi-line comments styleFlorian Fainelli
Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-09au1000-eth: remove volatiles, switch to I/O accessorsFlorian Fainelli
Remove all the volatile keywords where they were used, switch to using the proper readl/writel accessors. Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-09au1000-eth: fix asm -> linux headers inclusionFlorian Fainelli
Replace asm/io.h and asm/cpu.h wih linux/io.h and linux/cpu.h Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-09au1000-eth: fix bad printk usagesFlorian Fainelli
Use pr_(info|err) and pr_cont where required instead of calls to printk. Add missing pr_fmt to the driver. Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-09au1000-eth: fix all but one "line over 80 characters warnings"Florian Fainelli
One line has not been changed because it would not improve readability. Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-09au1000-eth: stylistic fixesFlorian Fainelli
This patch fixes the following checkpatch.pl warnings: - spaces after tabs - space between function and arguments - one-line statement braces - tabs instead of spaces Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-09au1000-eth: typedefs removalFlorian Fainelli
Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-05Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linusLinus Torvalds
* 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus: (150 commits) MIPS: PowerTV: Separate PowerTV USB support from non-USB code MIPS: strip the un-needed sections of vmlinuz MIPS: Clean up the calculation of VMLINUZ_LOAD_ADDRESS MIPS: Clean up arch/mips/boot/compressed/decompress.c MIPS: Clean up arch/mips/boot/compressed/ld.script MIPS: Unify the suffix of compressed vmlinux.bin MIPS: PowerTV: Add Gaia platform definitions. MIPS: BCM47xx: Fix nvram_getenv return value. MIPS: Octeon: Allow more than 3.75GB of memory with PCIe MIPS: Clean up notify_die() usage. MIPS: Remove unused task_struct.trap_no field. Documentation: Mention that KProbes is supported on MIPS SAMPLES: kprobe_example: Make it print something on MIPS. MIPS: kprobe: Add support. MIPS: Add instrunction format for BREAK and SYSCALL MIPS: kprobes: Define regs_return_value() MIPS: Ritually kill stupid printk. MIPS: Octeon: Disallow MSI-X interrupt and fall back to MSI interrupts. MIPS: Octeon: Support 256 MSI on PCIe MIPS: Decode core number for R2 CPUs. ...
2010-08-05MIPS: au1000_eth: Get ethernet address from platform_dataManuel Lauss
au1000_eth uses firmware calls to get a valid MAC address, and changes it depending on platform device id. This patch moves this logic out of the driver into the platform device registration part, where boards with supported chips can use whatever firmware interface they need; the default implementation maintains compatibility with existing, YAMON-based firmware. Tested-by: Wolfgang Grandegger <wg@denx.de> Acked-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com> To: Linux-MIPS <linux-mips@linux-mips.org> Cc: netdev@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/1481/ Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2010-07-18net: preserve ifreq parameter when calling generic phy_mii_ioctl().Richard Cochran
The phy_mii_ioctl() function unnecessarily throws away the original ifreq. We need access to the ifreq in order to support PHYs that can perform hardware time stamping. Two maverick drivers filter the ioctl commands passed to phy_mii_ioctl(). This is unnecessary since phylib will check the command in any case. Signed-off-by: Richard Cochran <richard.cochran@omicron.at> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-10net: trans_start cleanupsEric Dumazet
Now that core network takes care of trans_start updates, dont do it in drivers themselves, if possible. Drivers can avoid one cache miss (on dev->trans_start) in their start_xmit() handler. Exceptions are NETIF_F_LLTX drivers Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-07au1000-eth: bump to 1.7Florian Fainelli
Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-07au1000-eth: Use (dev|netdev|netif)_<level> macro helpersFlorian Fainelli
Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-07au1000-eth: implement set/get_msglevelFlorian Fainelli
{set,get}_msglevel is required to use netif_{err,dbg} macros. Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-07au1000-eth: fix checkpatch errors.Florian Fainelli
This patch fixes multiple errors reported by checkpatch: - else not on the ending brace of an if { } - multiple occurences of for( instead of for ( - c99 comments - assignment and tests on the same line - test and statements on the same line - macro with complex value not between parenthesis - static variable with initialization value No functionnal change. Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-07au1000-eth: prefix all functions with au1000_Florian Fainelli
In order to avoid namespace clashes, prefix all internal driver functions with au1000_. Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-07au1000-eth: set MODULE_VERSIONFlorian Fainelli
Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-03net: convert multicast list to list_headJiri Pirko
Converts the list and the core manipulating with it to be the same as uc_list. +uses two functions for adding/removing mc address (normal and "global" variant) instead of a function parameter. +removes dev_mcast.c completely. +exposes netdev_hw_addr_list_* macros along with __hw_addr_* functions for manipulation with lists on a sandbox (used in bonding and 80211 drivers) Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-28Merge branch 'master' of /home/davem/src/GIT/linux-2.6/David S. Miller
Conflicts: drivers/firmware/iscsi_ibft.c
2010-02-27NET: au1000-eth: Convert to platform_driver modelFlorian Fainelli
This patch converts the au1000-eth driver to become a full platform-driver as it ought to be. We now pass PHY-speficic configurations through platform_data but for compatibility the driver still assumes the default settings (search for PHY1 on MAC0) when no platform_data is passed. Tested on my MTX-1 board. Signed-off-by: Florian Fainelli <florian@openwrt.org> Cc: linux-mips@linux-mips.org Cc: netdev@vger.kernel.org Acked-by: David S. Miller <davem@davemloft.net> Patchwork: http://patchwork.linux-mips.org/patch/619/ Patchwork: http://patchwork.linux-mips.org/patch/963/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2010-02-22net: convert multiple drivers to use netdev_for_each_mc_addr, part3Jiri Pirko
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12net: use netdev_mc_count and netdev_mc_empty when appropriateJiri Pirko
This patch replaces dev->mc_count in all drivers (hopefully I didn't miss anything). Used spatch and did small tweaks and conding style changes when it was suitable. Jirka Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-29Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/ieee802154/fakehard.c drivers/net/e1000e/ich8lan.c drivers/net/e1000e/phy.c drivers/net/netxen/netxen_nic_init.c drivers/net/wireless/ath/ath9k/main.c
2009-11-22Au1x00: fix crash when trying register_netdev()Alexander Beregalov
Andreas Lohre reported that the driver crashes when trying to register_netdev(), he sugessted to move dev->netdev_ops initialization before calling register_netdev(), it worked for him. Reported-by: Andreas Lohre <alohre@gmail.com> Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-18drivers/net: request_irq - Remove unnecessary leading & from second argJoe Perches
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-10-22net: au1000_eth: add missing capability.hManuel Lauss
fixes the following build failure: CC drivers/net/au1000_eth.o /drivers/net/au1000_eth.c: In function 'au1000_set_settings': /drivers/net/au1000_eth.c:623: error: implicit declaration of function 'capable' /drivers/net/au1000_eth.c:623: error: 'CAP_NET_ADMIN' undeclared (first use in this function) /drivers/net/au1000_eth.c:623: error: (Each undeclared identifier is reported only once /drivers/net/au1000_eth.c:623: error: for each function it appears in. Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-07au1000_eth: Duplicate test of RX_OVERLEN bit in update_rx_stats()roel kluin
in update_rx_stats() the RX_OVERLEN bit is set twice, replace it by RX_RUNT. in au1000_rx() the RX_MISSED_FRAME bit was tested a few lines earlier already Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Manuel Lauss <manuel.lauss@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-09-01au1000_eth: possible NULL dereference of aup->mii_bus->irq in au1000_probe()roel kluin
aup->mii_bus->irq allocation may fail, prevent a dereference of NULL. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-09-01netdev: convert bulk of drivers to netdev_tx_tStephen Hemminger
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-07-05net: use NETDEV_TX_OK instead of 0 in ndo_start_xmit() functionsPatrick McHardy
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-06-13net: use symbolic values for ndo_start_xmit() return codesPatrick McHardy
Convert magic values 1 and -1 to NETDEV_TX_BUSY and NETDEV_TX_LOCKED respectively. 0 (NETDEV_TX_OK) is not changed to keep the noise down, except in very few cases where its in direct proximity to one of the other values. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-04-14au1000: convert to net_device_opsAlexander Beregalov
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-26net: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-22au1000: reorder functionsFlorian Fainelli
This patch reorders functions so that we do longer need forward declarations. Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-25drivers/net/au1000_eth.c: Remove redundant testJulia Lawall
phydev is checked to be not NULL a few lines above. A simplified version of the semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @r exists@ local idexpression x; expression E; position p1,p2; @@ if (x@p1 == NULL || ...) { ... when forall return ...; } ... when != \(x=E\|x--\|x++\|--x\|++x\|x-=E\|x+=E\|x|=E\|x&=E\|&x\) ( x@p2 == NULL | x@p2 != NULL ) // another path to the test that is not through p1? @s exists@ local idexpression r.x; position r.p1,r.p2; @@ ... when != x@p1 ( x@p2 == NULL | x@p2 != NULL ) @fix depends on !s@ position r.p1,r.p2; expression x,E; statement S1,S2; @@ ( - if ((x@p2 != NULL) || ...) S1 | - if ((x@p2 == NULL) && ...) S1 | - BUG_ON(x@p2 == NULL); ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-12netdevice: safe convert to netdev_priv() #part-1Wang Chen
We have some reasons to kill netdev->priv: 1. netdev->priv is equal to netdev_priv(). 2. netdev_priv() wraps the calculation of netdev->priv's offset, obviously netdev_priv() is more flexible than netdev->priv. But we cann't kill netdev->priv, because so many drivers reference to it directly. This patch is a safe convert for netdev->priv to netdev_priv(netdev). Since all of the netdev->priv is only for read. But it is too big to be sent in one mail. I split it to 4 parts and make every part smaller than 100,000 bytes, which is max size allowed by vger. Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-03drivers/net: Kill now superfluous ->last_rx stores.David S. Miller
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-12net/au1000_eth.c MDIO namespace fixesAdrian Bunk
Commit 2e888103295f47b8fcbf7e9bb8c5da97dd2ecd76 (phylib: add mdiobus_{read,write}) causes the following compile error: <-- snip --> ... CC drivers/net/au1000_eth.o drivers/net/au1000_eth.c:252: error: conflicting types for 'mdiobus_read' include/linux/phy.h:130: error: previous declaration of 'mdiobus_read' was here drivers/net/au1000_eth.c:263: error: conflicting types for 'mdiobus_write' include/linux/phy.h:131: error: previous declaration of 'mdiobus_write' was here ... make[3]: *** [drivers/net/au1000_eth.o] Error 1 <-- snip --> This patch prefixes the driver functions with au1000_ Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-08phylib: move to dynamic allocation of struct mii_busLennert Buytenhek
This patch introduces mdiobus_alloc() and mdiobus_free(), and makes all mdio bus drivers use these functions to allocate their struct mii_bus'es dynamically. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net> Acked-by: Andy Fleming <afleming@freescale.com>
2008-09-24[netdrvr] au1000_eth: Spinlock initialisation fixMartin Gebert
Seems like the spinlock for the AU1x00 ethernet device is initialised too late, as it is already used in enable_mac(), which is called via mii_probe() before the init takes place. The attached patch is working here for a Linux Au1100 2.6.22.6 kernel, and as far as I checked should also be applicable to the current head (just line numbers differ). Signed-off-by: Martin Gebert <Martin.Gebert@alpha-bit.de> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-08-14au1000_eth: use 'unsigned long' for irqflagsVegard Nossum
The patch was generated using the Coccinelle semantic patch framework. Cc: Julia Lawall <julia@diku.dk> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-07-22netdev: bunch of drivers: avoid WARN at net/core/dev.c:1328Anton Vorontsov
The drivers were touching net queue before it has been started, so without this patch, the drivers will potentially WARN at net/core/dev.c:1328. I don't have the hardware for the drivers below, so this patch is untested, and thus should be carefully peer reviewed. tc35815.c au1000_eth.c bfin_mac.c macb.c ^ The four drivers are using phylib, they're calling netif_start_queue() in open() callback. So trivially remove netif_tx_schedule_all(). Phylib will handle netif_carrier_*(). cpmac.c fec_mpc52xx.c fs_enet/fs_enet-main.c sh_eth.c ^ The same as above, but these were also needlessly calling netif_carrier_*() functions. So removed queue calls and also remove carrier calls, since phylib will handle it. fs_enet-main.c also didn't call netif_start_queue() at open(), this is fixed now. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-17netdev: Convert all drivers away from netif_schedule().David S. Miller
They logically all want to trigger a schedule for all device TX queues. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-05-22au1000_eth: remove useless checkFrancois Romieu
The lifespan of the device covers the request_irq .. free_irq interval. The cast of a void * pointer is not needed either. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16phy: Change mii_bus id field to a stringAndy Fleming
Having the id field be an int was making more complex bus topologies excessively difficult. For now, just convert it to a string, and change all instances of "bus->id = val" to snprintf(id, MII_BUS_ID_LEN, "%x", val). Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2007-10-19Fix misspellings of "system", "controller", "interrupt" and "necessary".Robert P. J. Day
Fix the various misspellings of "system", controller", "interrupt" and "[un]necessary". Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-15add new prom.h for AU1x00Yoichi Yuasa
Add new prom.h for AU1x00. Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> Acked-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>