summaryrefslogtreecommitdiffstats
path: root/drivers/net/fec.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' of ↵David S. Miller2011-03-031-1/+2
|\ | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/bnx2x/bnx2x.h
| * net/fec: fix unterminated platform_device_id tableAxel Lin2011-02-281-1/+2
| | | | | | | | | | | | | | The platform_device_id table is supposed to be zero-terminated. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | net/fec: remove unused driver dataUwe Kleine-König2011-02-171-2/+0
| | | | | | | | | | | | | | | | Apart from not being used the first argument isn't even a struct platform_device *. Reported-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
* | net/fec: enable flow control and length check on enet-macUwe Kleine-König2011-02-151-11/+13
| | | | | | | | | | | | Also optimize not to reread the value written to FEC_R_CNTRL. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
* | net/fec: postpone unsetting driver data until the hardware is stoppedUwe Kleine-König2011-02-151-2/+2
| | | | | | | | | | Reported-by: Lothar Waßmann <LW@KARO-electronics.de> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
* | net/fec: provide device for dma functions and matching sizes for map and unmapUwe Kleine-König2011-02-151-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes warnings when CONFIG_DMA_API_DEBUG=y: NULL NULL: DMA-API: device driver tries to free DMA memory it has not allocated [device address=0x000000004781a020] [size=64 bytes] net eth0: DMA-API: device driver frees DMA memory with different size [device address=0x000000004781a020] [map size=2048 bytes] [unmap size=64 bytes] Moreover pass the platform device to dma_{,un}map_single which makes more sense because the logical network device doesn't know anything about dma. Passing the platform device was a suggestion by Lothar Waßmann. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
* | net/fec: reorder functions a bit allows removing forward declarationsUwe Kleine-König2011-02-151-179/+174
| | | | | | | | Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
* | net/fec: some whitespace cleanupUwe Kleine-König2011-02-151-11/+11
| | | | | | | | | | | | A few of these were found and reported by Lothar Waßmann. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
* | net/fec: consistenly name struct net_device pointers "ndev"Uwe Kleine-König2011-02-151-121/+121
| | | | | | | | | | | | | | A variable named "dev" usually (usually subjective) points to a struct device. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
* | net/fec: add phy_stop to fec_enet_closeUwe Kleine-König2011-02-151-1/+3
| | | | | | | | | | | | | | This undoes the effects of phy_start in fec_enet_open. Reported-by: Lothar Waßmann <LW@KARO-electronics.de> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
* | net/fec: consolidate all i.MX options to CONFIG_ARMUwe Kleine-König2011-02-151-3/+2
| | | | | | | | | | | | | | | | | | | | Moreover stop listing all i.MX platforms featuring a FEC, and use the platform's config symbol that selects registration of a fec device instead. This might make it easier to add new platforms. Set default = y for ARMs having a fec to reduce defconfig sizes. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
* | net/fec: put the ioremap cookie immediately into a void __iomem pointerUwe Kleine-König2011-02-151-5/+4
| | | | | | | | | | | | | | | | Saving it first into struct net_device->base_addr (which is an unsigned long) is pointless and only needs to use more casts than necessary. Reported-by: Lothar Waßmann <LW@KARO-electronics.de> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
* | net/fec: no need to memzero private dataUwe Kleine-König2011-02-151-1/+0
| | | | | | | | | | | | | | | | alloc_etherdev internally uses kzalloc, so the private data is already zerod out. Reported-by: Lothar Waßmann <LW@KARO-electronics.de> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
* | net/fec: no need to check for validity of ndev in suspend and resumeUwe Kleine-König2011-02-151-16/+12
| | | | | | | | | | | | | | | | dev_set_drvdata is called unconditionally in the probe function and so it cannot be NULL. Reported-by: Lothar Waßmann <LW@KARO-electronics.de> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
* | net/fec: don't free an irq that failed to be requestedUwe Kleine-König2011-02-151-2/+1
| | | | | | | | | | Reported-by: Lothar Waßmann <LW@KARO-elektronics.de> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
* | net/fec: release mem_region requested in probe in error path and removeUwe Kleine-König2011-02-151-2/+12
| | | | | | | | | | Reported-by: Lothar Waßmann <LW@KARO-electronics.de> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
* | net/fec: no need to cast arguments for memcpyUwe Kleine-König2011-02-151-1/+1
|/ | | | | | | memcpy takes a const void * as 2nd argument. So the argument is converted automatically to void * anyhow. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
* net/fec: add dual fec support for mx28Shawn Guo2011-01-091-16/+132
| | | | | | | | | | | | | | | | | | | | | | This patch is to add mx28 dual fec support. Here are some key notes for mx28 fec controller. - The mx28 fec controller naming ENET-MAC is a different IP from FEC used on other i.mx variants. But they are basically compatible on software interface, so it's possible to share the same driver. - ENET-MAC design on mx28 made an improper assumption that it runs on a big-endian system. As the result, driver has to swap every frame going to and coming from the controller. - The external phys can only be configured by fec0, which means fec1 can not work independently and both phys need to be configured by mii_bus attached on fec0. - ENET-MAC reset will get mac address registers reset too. - ENET-MAC MII/RMII mode and 10M/100M speed are configured differently FEC. - ETHER_EN bit must be set to get ENET-MAC interrupt work. Signed-off-by: Shawn Guo <shawn.guo@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net/fec: improve pm for better suspend/resumeShawn Guo2011-01-091-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | The following commit made a fix to use fec_enet_open/fec_enet_close over fec_enet_init/fec_stop for suspend/resume, because fec_enet_init does not allow to have a working network interface at resume. e3fe8558c7fc182972c3d947d88744482111f304 net/fec: fix pm to survive to suspend/resume This fix works for i.mx/mxc fec controller, but fails on mx28 fec which gets a different interrupt logic design. On i.mx fec, interrupt can be triggered even bit ETHER_EN of ECR register is not set. But on mx28 fec, ETHER_EN must be set to get interrupt work. Meanwhile, MII interrupt is mandatory to resume the driver, because MDIO read/write changed to interrupt mode by commit below. 97b72e4320a9aaa4a7f1592ee7d2da7e2c9bd349 fec: use interrupt for MDIO completion indication fec_restart/fec_stop comes out as the solution working for both cases. Signed-off-by: Shawn Guo <shawn.guo@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net/fec: add mac field into platform data and consolidate fec_get_macShawn Guo2011-01-091-43/+38
| | | | | | | | | | | | | Add mac field into fec_platform_data and consolidate function fec_get_mac to get mac address in following order. 1) module parameter via kernel command line fec.macaddr=0x00,0x04,... 2) from flash in case of CONFIG_M5272 or fec_platform_data mac field for others, which typically have mac stored in fuse 3) fec mac address registers set by bootloader Signed-off-by: Shawn Guo <shawn.guo@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net/fec: remove the use of "index" which is legacyShawn Guo2011-01-091-6/+3
| | | | | | | | | | | | | | | | | The "index" becomes legacy since fep->pdev->id starts working to identify the instance. Moreover, the call of fec_enet_init(ndev, 0) always passes 0 to fep->index. This makes the following code in fec_get_mac buggy. /* Adjust MAC if using default MAC address */ if (iap == fec_mac_default) dev->dev_addr[ETH_ALEN-1] = fec_mac_default[ETH_ALEN-1] + fep->index; It may be the time to remove "index" and use fep->pdev->id instead. Signed-off-by: Shawn Guo <shawn.guo@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net/fec: fix MMFR_OP type in fec_enet_mdio_writeShawn Guo2011-01-091-2/+2
| | | | | | | | | | | | | FEC_MMFR_OP_WRITE should be used than FEC_MMFR_OP_READ in a mdio write operation. It's probably a typo introduced by commit: e6b043d512fa8d9a3801bf5d72bfa3b8fc3b3cc8 netdev/fec.c: add phylib supporting to enable carrier detection (v2) Signed-off-by: Shawn Guo <shawn.guo@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: allow FEC driver to use fixed PHY supportGreg Ungerer2010-10-131-14/+27
| | | | | | | | | | | | | | | | | | | At least one board using the FEC driver does not have a conventional PHY attached to it, it is directly connected to a somewhat simple ethernet switch (the board is the SnapGear/LITE, and the attached 4-port ethernet switch is a RealTek RTL8305). This switch does not present the usual register interface of a PHY, it presents nothing. So a PHY scan will find nothing - it finds ID's of 0 for each PHY on the attached MII bus. After the FEC driver was changed to use phylib for supporting PHYs it no longer works on this particular board/switch setup. Add code support to use a fixed phy if no PHY is found on the MII bus. This is based on the way the cpmac.c driver solved this same problem. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* net/fec: carrier off initially to avoid root mount failureOskar Schirmer2010-10-101-0/+3
| | | | | | | | | | | | | | | | with hardware slow in negotiation, the system did freeze while trying to mount root on nfs at boot time. the link state has not been initialised so network stack tried to start transmission right away. this caused instant retries, as the driver solely stated business upon link down, rendering the system unusable. notify carrier off initially to prevent transmission until phylib will report link up. Signed-off-by: Oskar Schirmer <oskar@linutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* net/fec: restore interrupt mask after software-reset in fec_stop()Wolfram Sang2010-07-221-3/+4
| | | | | | | | | | | After the change from mdio polling to irq, it became necessary to restore the interrupt mask after resetting the chip in fec_stop(). Otherwise, with all irqs disabled, no communication with the PHY will be possible after e.g. un-/replugging the cable and the device gets stalled. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: preserve ifreq parameter when calling generic phy_mii_ioctl().Richard Cochran2010-07-181-1/+1
| | | | | | | | | | | | 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>
* fec: use interrupt for MDIO completion indicationBaruch Siach2010-07-121-30/+25
| | | | | | | | | | | | With the move to phylib (commit e6b043d) I was seeing sporadic "MDIO write timeout" messages. Measure of the actual time spent showed latency times of more than 1600us. This patch uses the MII event indication of the FEC hardware to detect completion of MDIO transactions. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
* net/fec: clean suspend/resumeEric Benard2010-06-251-18/+12
| | | | | | | | | | | | | | | | Commit 59d4289b83b11379d867e2f7146904b19cc96404 converted fec to dev_pm_ops but didn't update the suspend/resume functions thus leading to the following warning : "initialization from incompatible pointer type" when CONFIG_PM is set. This patch also fixe a few indentation and style around CONFIG_PM area. Signed-off-by: Eric Bénard <eric@eukrea.com> Cc: netdev@vger.kernel.org Cc: davem@davemloft.net Cc: amit.kucheria@canonical.com Cc: s.hauer@pengutronix.de Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' of ↵David S. Miller2010-06-061-8/+8
|\ | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/sfc/net_driver.h drivers/net/sfc/siena.c
| * net/fec: fix pm to survive to suspend/resumeEric Bénard2010-06-021-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | * in the actual driver, calling fec_stop and fec_enet_init doesn't allow to have a working network interface at resume (where a ifconfig down and up is required to recover the interface) * by using fec_enet_close and fec_enet_open, this patch solves this problem and handle the case where the link changed between suspend and resume * this patch also disable clock at suspend and reenable it at resume Signed-off-by: Eric Bénard <eric@eukrea.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | fec: convert legacy PM hooks to dem_pm_opsDenis Kirjanov2010-06-051-2/+20
| | | | | | | | | | | | | | | | This patch compile tested only. Convert legacy PM hooks to dev_pm_ops Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | fec: Cleanup PHY probingDenis Kirjanov2010-06-031-11/+5
| | | | | | | | | | | | | | Cleanup PHY probing: use helpers from phylib Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | fec: convert TX hook to netdev_tx_tDenis Kirjanov2010-06-031-1/+1
|/ | | | | | | Convert TX hook return value to netdev_tx_t Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* netdev/fec: fix ifconfig eth0 down hang issueBryan Wu2010-05-281-12/+16
| | | | | | | | | | | | | BugLink: http://bugs.launchpad.net/bugs/559065 In fec open/close function, we need to use phy_connect and phy_disconnect operation before we start/stop phy. Otherwise it will cause system hang. Only call fec_enet_mii_probe() in open function, because the first open action will cause NULL pointer error. Signed-off-by: Bryan Wu <bryan.wu@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* fec: add support for PHY interface platform dataBaruch Siach2010-05-241-0/+22
| | | | | | | | | The i.MX25 PDK uses RMII to communicate with its PHY. This patch adds the ability to configure RMII, based on platform data. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Acked-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' of ↵David S. Miller2010-05-121-1/+1
|\ | | | | | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: Documentation/feature-removal-schedule.txt drivers/net/wireless/ath/ar9170/usb.c drivers/scsi/iscsi_tcp.c net/ipv4/ipmr.c
| * FEC: Fix kernel panic in fec_set_mac_address.Mattias Walström2010-05-051-1/+1
| | | | | | | | | | | | | | Fix memory corruption that sometimes result in kernel panic. Signed-off-by: Mattias Walström <mattias@vmlinux.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | net: trans_start cleanupsEric Dumazet2010-05-101-2/+0
| | | | | | | | | | | | | | | | | | | | | | 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>
* | net: convert multicast list to list_headJiri Pirko2010-04-031-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | netdev/fec.c: add phylib supporting to enable carrier detection (v2)Bryan Wu2010-04-011-877/+251
|/ | | | | | | | | | | | | | | | | | | | | | | BugLink: http://bugs.launchpad.net/bugs/457878 v2: - remove duplicated phy_speed caculation - fix the phy_speed caculation according to the DataSheet v1: - removed old MII phy control code - add phylib supporting - add ethtool interface to make user space NetworkManager works Tested on Freescale i.MX51 Babbage board. This patch is based on a patch from Frederic Rodo <fred.rodo@gmail.com> Cc: Frederic Rodo <fred.rodo@gmail.com> Signed-off-by: Bryan Wu <bryan.wu@canonical.com> Acked-by: Amit Kucheria <amit.kucheria@canonical.com> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: convert multiple drivers to use netdev_for_each_mc_addr, part4Jiri Pirko2010-02-221-4/+2
| | | | | Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: use netdev_mc_count and netdev_mc_empty when appropriateJiri Pirko2010-02-121-1/+1
| | | | | | | | | | | 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>
* fec: Add LAN8700 phy supportAmit Kucheria2010-02-101-0/+21
| | | | | | | | | | The i.MX51 babbage board has a FEC ethernet controller with this phy. In the long term we should resurrect the phylib patches for fec. Signed-off-by: Amit Kucheria <amit.kucheria@canonical.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: David S. Miller <davem@davemloft.net>
* fec: fix uninitialized rx buffer usageRob Herring2010-02-101-28/+29
| | | | | | | | | | | | | | | | The fec driver was enabling receive buffer descriptor without allocating the buffers. Make sure the buffer descriptors are initialized to not start receiving packets. Open also calls fec_restart after the rx buffers are allocated. With the code in fec_restart, it zeroes out the buffer descriptors that have just been setup. Signed-off-by: Rob Herring <r.herring@freescale.com> Signed-off-by: Amit Kucheria <amit.kucheria@canonical.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: fix section mismatch in fec.cSteven King2009-10-201-1/+1
| | | | | | | | fec_enet_init is called by both fec_probe and fec_resume, so it shouldn't be marked as __init. Signed-off-by: Steven King <sfking@fdwdc.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'for-linus' of ↵Linus Torvalds2009-09-171-15/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: (53 commits) m68knommu: Make PAGE_SIZE available to assembly files. m68knommu: fix ColdFire definition of CLOCK_TICK_RATE m68knommu: set multi-function pins for ethernet when enabled m68knommu: remove special interrupt handling code for ne2k support m68knommu: relax IO_SPACE_LIMIT setting m68knommu: remove ColdFire direct interrupt register access m68knommu: create a speciailized ColdFire 5272 interrupt controller m68knommu: add support for second interrupt controller of ColdFire 5249 m68knommu: clean up old ColdFire timer irq setup m68knommu: map ColdFire interrupts to correct masking bits m68knommu: clean up ColdFire 532x CPU timer setup m68knommu: simplify ColdFire "timers" clock initialization m68knommu: support code to mask external interrupts on old ColdFire CPU's m68knommu: merge old ColdFire interrupt controller masking macros m68knommu: remove duplicate ColdFire mcf_autovector() code m68knommu: move ColdFire INTC definitions to new include file m68knommu: mask off all interrupts in ColdFire intc-simr controller m68knommu: remove timer device interrupt setup for ColdFire 532x m68knommu: remove interrupt masking from ColdFire pit timer m68knommu: remove unecessary interrupt level setting in ColdFire 520x setup ...
| * m68knommu: remove ColdFire direct interrupt register accessGreg Ungerer2009-09-161-15/+3
| | | | | | | | | | | | | | | | Now that the ColdFire 5272 has full interrupt controller functionality we can remove all the interrupt masking and acking code from the FEC ethernet driver. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
* | fec: don't enable irqs in hard irq contextUwe Kleine-König2009-09-021-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fec_enet_mii, fec_enet_rx and fec_enet_tx are both only called by fec_enet_interrupt in interrupt context. So they must not use spin_lock_irq/spin_unlock_irq. This fixes: WARNING: at kernel/lockdep.c:2140 trace_hardirqs_on_caller+0x130/0x194() ... Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Cc: Greg Ungerer <gerg@uclinux.org> Cc: Ben Hutchings <ben@decadent.org.uk> Cc: Patrick McHardy <kaber@trash.net> Cc: Sascha Hauer <s.hauer@pengutronix.de> Cc: Matt Waddel <Matt.Waddel@freescale.com> Cc: netdev@vger.kernel.org Cc: Tim Sander <tim01@vlsi.informatik.tu-darmstadt.de> Acked-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | fec: fix recursive locking of mii_lockUwe Kleine-König2009-09-021-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mii_discover_phy is only called by fec_enet_mii (via mip->mii_func). So &fep->mii_lock is already held and mii_discover_phy must not call mii_queue which locks &fep->mii_lock, too. This was noticed by lockdep: ============================================= [ INFO: possible recursive locking detected ] 2.6.31-rc8-00038-g37d0892 #109 --------------------------------------------- swapper/1 is trying to acquire lock: (&fep->mii_lock){-.....}, at: [<c01569f8>] mii_queue+0x2c/0xcc but task is already holding lock: (&fep->mii_lock){-.....}, at: [<c0156328>] fec_enet_interrupt+0x78/0x460 other info that might help us debug this: 2 locks held by swapper/1: #0: (rtnl_mutex){+.+.+.}, at: [<c0183534>] rtnl_lock+0x18/0x20 #1: (&fep->mii_lock){-.....}, at: [<c0156328>] fec_enet_interrupt+0x78/0x460 stack backtrace: Backtrace: [<c00226fc>] (dump_backtrace+0x0/0x108) from [<c01eac14>] (dump_stack+0x18/0x1c) r6:c781d118 r5:c03e41d8 r4:00000001 [<c01eabfc>] (dump_stack+0x0/0x1c) from [<c005bae4>] (__lock_acquire+0x1a20/0x1a88) [<c005a0c4>] (__lock_acquire+0x0/0x1a88) from [<c005bbac>] (lock_acquire+0x60/0x74) [<c005bb4c>] (lock_acquire+0x0/0x74) from [<c01edda8>] (_spin_lock_irqsave+0x54/0x68) r7:60000093 r6:c01569f8 r5:c785e468 r4:00000000 [<c01edd54>] (_spin_lock_irqsave+0x0/0x68) from [<c01569f8>] (mii_queue+0x2c/0xcc) r7:c785e468 r6:c0156b24 r5:600a0000 r4:c785e000 [<c01569cc>] (mii_queue+0x0/0xcc) from [<c0156b78>] (mii_discover_phy+0x54/0xa8) r8:00000002 r7:00000032 r6:c785e000 r5:c785e360 r4:c785e000 [<c0156b24>] (mii_discover_phy+0x0/0xa8) from [<c0156354>] (fec_enet_interrupt+0xa4/0x460) r5:c785e360 r4:c077a170 [<c01562b0>] (fec_enet_interrupt+0x0/0x460) from [<c0066674>] (handle_IRQ_event+0x48/0x120) [<c006662c>] (handle_IRQ_event+0x0/0x120) from [<c0068438>] (handle_level_irq+0x94/0x11c) ... Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Cc: Greg Ungerer <gerg@uclinux.org> Cc: Ben Hutchings <ben@decadent.org.uk> Cc: Patrick McHardy <kaber@trash.net> Cc: Sascha Hauer <s.hauer@pengutronix.de> Cc: Matt Waddel <Matt.Waddel@freescale.com> Cc: netdev@vger.kernel.org Cc: Tim Sander <tim01@vlsi.informatik.tu-darmstadt.de> Acked-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge branch 'master' of ↵David S. Miller2009-08-121-4/+5
|\ \ | |/ | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: arch/microblaze/include/asm/socket.h
OpenPOWER on IntegriCloud