aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/fec.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2009-07-16Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller1-0/+1
Conflicts: drivers/net/wireless/orinoco/main.c
2009-07-12netdev: restore MTU change operationBen Hutchings1-0/+1
alloc_etherdev() used to install a default implementation of this operation, but it must now be explicitly installed in struct net_device_ops. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
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-06-13net: use symbolic values for ndo_start_xmit() return codesPatrick McHardy1-2/+2
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-16Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller1-0/+1
2009-04-16fec: call fec_restart() in fec_open()Sascha Hauer1-10/+8
We called fec_stop() in fec_enet_close(), thus we have to call fec_restart() in fec_enet_open(). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-04-16FEC Buffer reworkSascha Hauer1-51/+88
Allocate buffers in fec_open and free them again in fec_close. This makes it possible to use this driver as a module. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-04-16fec: switch to net_device_opsSascha Hauer1-16/+20
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-04-16fec: remove debugging printksSascha Hauer1-33/+0
These printks in fec_timeout do not give useful information in a production kernel. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-04-16fec: align receive packetsSascha Hauer1-2/+3
Otherwise we get a lot of alignment errors Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-04-16fec: refactor init functionSascha Hauer1-35/+4
fec_enet_init() does the hardware initialisation and then calls fec_restart() which does the same initialisation again, so we can safely remove the initialisation from fec_enet_init(). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-04-16fec: refactor set_multicast_list() to make it more readableSascha Hauer1-48/+51
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-04-16fec: Codingstyle cleanupsSascha Hauer1-215/+139
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-04-16fec: remove unnecessary castSascha Hauer1-9/+5
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-04-16fec: do not typedef struct typesSascha Hauer1-17/+20
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-04-16fec: switch to writel/readlSascha Hauer1-164/+115
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-04-08FEC driver: add missing #endifSascha Hauer1-0/+1
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-26m68knommu: remove ColdFire specific setup code from FEC driverGreg Ungerer1-500/+12
Remove the ColdFire CPU specific setup from here. The ColdFire CPU platform code now sets up all this. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-03Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller1-1/+1
Conflicts: drivers/net/Kconfig
2009-02-01FEC: Turn FEC driver into platform device driverSascha Hauer1-29/+220
This turns the fec driver into a platform device driver for new platforms. Old platforms are still supported through a FEC_LEGACY define till they are also ported. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-01fec: Add support for Freescale MX27Sascha Hauer1-2/+13
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-01fec: replace flush_dcache_range with dma_sync_singleSascha Hauer1-2/+5
flush_dcache_range is not portable across architectures. Use dma_sync_single instead. Also, the memory must be synchronised in the receive path aswell. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-01fec: Fix KS8721BL_ICSR phy register offsetSascha Hauer1-1/+1
According to the datasheet the ICSR register is at offset 27, not 22. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-01fec: use dma_alloc_coherent for descriptor ringSascha Hauer1-5/+9
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-01fec: do not use memcpy on physical addressesSascha Hauer1-1/+1
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-01fec: use linux/*.h instead of asm/*.hSascha Hauer1-5/+3
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-01fec: remove empty functionsSascha Hauer1-65/+0
There are some architecture specific functions which are all empty. Remove them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-01fec: remove unused #else branchesSascha Hauer1-92/+0
The #else branches throughout this driver belong to a PowerPC 8xx for which this driver is not used. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-27m68knommu: correct the mii calculations for 532x ColdFire FECMatt Waddel1-1/+1
Signed-off-by: Matt Waddel <Matt.Waddel@freescale.com> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2008-11-12netdevice: safe convert to netdev_priv() #part-2Wang Chen1-1/+1
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-10-27net: convert print_mac to %pMJohannes Berg1-3/+1
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-07-23m68knommu: remove last use of CONFIG_FADS and CONFIG_RPXCLASSICGreg Ungerer1-1/+1
They have never been used in this port of the driver. It is has only ever been used on the ColdFire SoC ethernet core. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2008-07-23m68knommu: remove RPXCLASSIC from the m68k treeSebastian Siewior1-42/+0
This ifdefs are leftovers from the time as the driver was running on a ppc. Signed-off-by: Sebastian Siewior <bigeasy@linutronix.de> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2008-07-23m68knommu: fec: remove FADSSebastian Siewior1-10/+0
I found config FADS only in ppc/Kconfig. Bye bye relic. Signed-off-by: Sebastian Siewior <bigeasy@linutronix.de> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2008-05-01m68knommu: fix FEC driver lockingSebastian Siewior1-22/+33
It's easy: grab locks before talking to hardware and realease them afterwards. The one big lock has been splitted into a hw_lock and mii_lock. Signed-off-by: Sebastian Siewior <bigeasy@linutronix.de> Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-05-01m68knommu: kill warnings in FEC driverSebastian Siewior1-2/+8
linux-2.6-mk68/drivers/net/fec.c: In function 'fec_enet_module_init': linux-2.6-mk68/drivers/net/fec.c:2627: warning: unused variable 'j' linux-2.6-mk68/drivers/net/fec.c: At top level: linux-2.6-mk68/drivers/net/fec.c:2136: warning: 'mii_link_interrupt' defined but not used Signed-off-by: Sebastian Siewior <bigeasy@linutronix.de> Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-05-01m68knommu: remove unused interrupts in FEC driverGreg Ungerer1-34/+2
Remove the acquisition of unused interrupt types. We don't need to register all the TX and RX varients used on some ColdFire FEC hardware. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-05-01m68knommu: fix ColdFire 5272 fec driver hash registersGreg Ungerer1-10/+14
Renamed the 5272 hash_table registers to match the "grp" hash_table registers of the other ColdFire parts. They are actually a group hash. The makes for consistent setup across all ColdFire parts. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-03-04m68knommu: fix fec driver interrupt racesGreg Ungerer1-4/+4
The FEC driver has a common interrupt handler for all interrupt event types. It is raised on a number of distinct interrupt vectors. This handler can't be re-entered while processing an interrupt, so make sure all requested vectors are flagged as IRQF_DISABLED. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-23m68knommu: improve mii_do_cmd code in FEC driverPhilippe De Muyter1-5/+2
Improve the readability of mii_do_cmd(). Signed-off-by: Philippe De Muyter <phdm@macqel.be> Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-23m68knommu: improve code formating FEC driverPhilippe De Muyter1-12/+5
Indent all the `else' the same way. Remove some unecesary white space. Signed-off-by: Philippe De Muyter <phdm@macqel.be> Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-10[NET]: Introduce and use print_mac() and DECLARE_MAC_BUF()Joe Perches1-4/+3
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] drivers/net: statistics cleanup #1 -- save memory and shrink codeJeff Garzik1-30/+20
We now have struct net_device_stats embedded in struct net_device, and the default ->get_stats() hook does the obvious thing for us. Run through drivers/net/* and remove the driver-local storage of statistics, and driver-local ->get_stats() hook where applicable. This was just the low-hanging fruit in drivers/net; plenty more drivers remain to be updated. [ Resolved conflicts with napi_struct changes and fix sunqe build regression... -DaveM ] Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-07-30setup and detect 2nd phy on MCF5275 in FEC driverMike Cruse1-0/+23
Added code to recognize the second interface on M5275 boards. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-30clean up reading of ICR register in FEC driverGreg Ungerer1-3/+3
On the MCF5272, there is no need to read the ICR before writing it : the bit 4n+3 is a write-enable for the bits 4n,4n+1 and 4n+2. Signed-off-by: Philippe De Muyter <phdm@macqel.be> Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-30fix work queues in FEC driverGreg Ungerer1-6/+11
Fix the work queue code in the FEC driver. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-30remove unused config symbol from FEC driverGreg Ungerer1-2/+0
Removed unused CONFIG symbol and its conditional code from FEC driver. Pointed out by Robert P. J. Day <rpjday@mindspring.com>. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-30include cacheflush.h in FEC driverGreg Ungerer1-0/+1
Include cacheflush.h to get definitions for cache functions used in this code. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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-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>