aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/freescale (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-05-02ucc_geth: Add 16 bytes to max TX frame for VLANsJoakim Tjernlund1-3/+3
Creating a VLAN interface on top of ucc_geth adds 4 bytes to the frame and the HW controller is not prepared to TX a frame bigger than 1518 bytes which is 4 bytes too small for a full VLAN frame. Add 16 bytes which will handle the a simple VLAN and leaves 12 bytes for future expansion. Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-02net: ucc_geth, increase no. of HW RX descriptorsJoakim Tjernlund1-1/+1
In a busy network we see ucc_geth is dropping RX pkgs every now and then. Increase the RX queues HW descriptors from 16 to 32 to deal with this. Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-02Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netLinus Torvalds1-6/+6
Pull networking fixes from David Miller: 1) Provide device string properly for USB i2400m wimax devices, also don't OOPS when providing firmware string. From Phil Sutter. 2) Add support for sh_eth SH7734 chips, from Nobuhiro Iwamatsu. 3) Add another device ID to USB zaurus driver, from Guan Xin. 4) Loop index start in pool vector iterator is wrong causing MAC to not get configured in bnx2x driver, fix from Dmitry Kravkov. 5) EQL driver assumes HZ=100, fix from Eric Dumazet. 6) Now that skb_add_rx_frag() can specify the truesize increment separately, do so in f_phonet and cdc_phonet, also from Eric Dumazet. 7) virtio_net accidently uses net_ratelimit() not only on the kernel warning but also the statistic bump, fix from Rick Jones. 8) ip_route_input_mc() uses fixed init_net namespace, oops, use dev_net(dev) instead. Fix from Benjamin LaHaise. 9) dev_forward_skb() needs to clear the incoming interface index of the SKB so that it looks like a new incoming packet, also from Benjamin LaHaise. 10) iwlwifi mistakenly initializes a channel entry as 2GHZ instead of 5GHZ, fix from Stanislav Yakovlev. 11) Missing kmalloc() return value checks in orinoco, from Santosh Nayak. 12) ath9k doesn't check for HT capabilities in the right way, it is checking ht_supported instead of the ATH9K_HW_CAP_HT flag. Fix from Sujith Manoharan. 13) Fix x86 BPF JIT emission of 16-bit immediate field of AND instructions, from Feiran Zhuang. 14) Avoid infinite loop in GARP code when registering sysfs entries. From David Ward. 15) rose protocol uses memcpy instead of memcmp in a device address comparison, oops. Fix from Daniel Borkmann. 16) Fix build of lpc_eth due to dev_hw_addr_rancom() interface being renamed to eth_hw_addr_random(). From Roland Stigge. 17) Make ipv6 RTM_GETROUTE interpret RTA_IIF attribute the same way that ipv4 does. Fix from Shmulik Ladkani. 18) via-rhine has an inverted bit test, causing suspend/resume regressions. Fix from Andreas Mohr. 19) RIONET assumes 4K page size, fix from Akinobu Mita. 20) Initialization of imask register in sky2 is buggy, because bits are "or'd" into an uninitialized local variable. Fix from Lino Sanfilippo. 21) Fix FCOE checksum offload handling, from Yi Zou. 22) Fix VLAN processing regression in e1000, from Jiri Pirko. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (52 commits) sky2: dont overwrite settings for PHY Quick link tg3: Fix 5717 serdes powerdown problem net: usb: cdc_eem: fix mtu net: sh_eth: fix endian check for architecture independent usb/rtl8150 : Remove duplicated definitions rionet: fix page allocation order of rionet_active via-rhine: fix wait-bit inversion. ipv6: Fix RTM_GETROUTE's interpretation of RTA_IIF to be consistent with ipv4 net: lpc_eth: Fix rename of dev_hw_addr_random net/netfilter/nfnetlink_acct.c: use linux/atomic.h rose_dev: fix memcpy-bug in rose_set_mac_address Fix non TBI PHY access; a bad merge undid bug fix in a previous commit. net/garp: avoid infinite loop if attribute already exists x86 bpf_jit: fix a bug in emitting the 16-bit immediate operand of AND bonding: emit event when bonding changes MAC mac80211: fix oper channel timestamp updation ath9k: Use HW HT capabilites properly MAINTAINERS: adding maintainer for ipw2x00 net: orinoco: add error handling for failed kmalloc(). net/wireless: ipw2x00: fix a typo in wiphy struct initilization ...
2012-04-02Merge remote-tracking branch 'kumar/next' into mergeBenjamin Herrenschmidt1-2/+4
2012-04-01Fix non TBI PHY access; a bad merge undid bug fix in a previous commit.Kenth Eriksson1-6/+6
The merge done in commit b26e478f undid bug fix in commit c3e072f8 ("net: fsl_pq_mdio: fix non tbi phy access"), with the result that non TBI (e.g. MDIO) PHYs cannot be accessed. Signed-off-by: Kenth Eriksson <kenth.eriksson@transmode.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-29powerpc/qe: Update the SNUM table for MPC8569 Rev2.0Dave Liu1-2/+4
The MPC8569 Rev2.0 has the correct SNUM table as QE Reference Manual, we must follow it. However the Rev1.0 silicon need the old SNUM table as workaround due to Rev1.0 silicon SNUM erratum. So, we support both snum table, and choose the one FDT tell us. And u-boot will fixup FDT according to SPRN_SVR. Signed-off-by: Liu Yu <yu.liu@freescale.com> Signed-off-by: Dave Liu <daveliu@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2012-03-25gianfar: Fix possible overrun and simplify interrupt name field creationJoe Perches2-33/+8
Space allocated for int_name_<foo> is insufficient for maximal device name, expand it. Code to create int_name_<foo> is obscure, simplify it by using sprintf. Found by looking for unnecessary \ line continuations. Signed-off-by: Joe Perches <joe@perches.com> Tested-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-19fs_enet: Add MPC5125 FEC support and PHY interface selectionVladimir Ermakov3-7/+28
Add compatible string for MPC5125 FEC. The FEC on MPC5125 additionally supports RMII PHY interface. Configure controller/PHY interface type according to the optional phy-connection-type property in the ethernet node. This property should be either "rmii" or "mii". Signed-off-by: Vladimir Ermakov <vooon341@gmail.com> Signed-off-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-19Merge branch 'gianfar-bql' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linuxDavid S. Miller3-10/+17
2012-03-18gianfar: use netif_tx_queue_stopped instead of __netif_subqueue_stoppedPaul Gortmaker1-1/+1
The __netif_subqueue_stopped() just does the following: struct netdev_queue *txq = netdev_get_tx_queue(dev, queue_index); return netif_tx_queue_stopped(txq); and since we already have the txq in scope, we can just call that directly in this case. Suggested-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2012-03-17phc: Update author's email address.Richard Cochran1-1/+1
This commit brings the author email address macros up to date for four modules in the PTP Hardware Clock subsystem. Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-15gianfar: delete orphaned version strings and dead macrosPaul Gortmaker2-6/+0
There were two version strings, and neither one was being used. Also in the same proximity were some unused #define that were left over from the past. Delete them all. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2012-03-15gianfar: constify giant block of status descriptor stringsPaul Gortmaker1-1/+1
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2012-03-15gianfar: Add support for byte queue limits.Paul Gortmaker1-3/+16
Add support for byte queue limits (BQL), based on the similar modifications made to intel/igb/igb_main.c from Eric Dumazet in commit bdbc063129e811264cd6c311d8c2d9b95de01231 "igb: Add support for byte queue limits." A local variable for tx_queue->qindex was introduced in gfar_clean_tx_ring, since it is now used often enough to warrant it, and it cleans up the readability somewhat as well. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2012-03-04ucc_geth: separate out rx/tx ring alloc and free operationsPaul Gortmaker1-196/+257
Factor out the the existing allocation and free operations so that they can be used individually. This is to improve code readability, and also to prepare for possible future changes like better error recovery and more dynamic configuration (e.g on-the-fly resizing of the rings). This change represents a straight up relocation of the existing code into separate routines without changing any of the contained code itself. Local variables are relocated as necessary. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-19Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-1/+1
Conflicts: drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c Small minor conflict in bnx2x, wherein one commit changed how statistics were stored in software, and another commit fixed endianness bugs wrt. reading the values provided by the chip in memory. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-13fec: fix PHY name to match fixed MDIO bus nameFlorian Fainelli1-1/+1
Commit "391420f7: fec: use an unique MDIO bus name" first modified the MDIO bus name to include the platform name, then in commit "a7ed07d5: net: fec: correct phy_name buffer length when init phy_name" the PHY name formatting was fixed in the case the PHY matches a PHY driver. The FEC driver however, also handles the case where we want to attach to the fixed MDIO bus name, which was previously named "0", and now "fixed-0". Change the PHY formatting logic to account for that. Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-07net: fec: Fix build due to wrong dev annotationFabio Estevam1-2/+2
commit 21a4e469 (netdev: ethernet dev_alloc_skb to netdev_alloc_skb) should have used "ndev" instead of "dev". This causes the following build errors: drivers/net/ethernet/freescale/fec.c: In function 'fec_enet_rx': drivers/net/ethernet/freescale/fec.c:714: error: 'dev' undeclared (first use in this function) drivers/net/ethernet/freescale/fec.c:714: error: (Each undeclared identifier is reported only once drivers/net/ethernet/freescale/fec.c:714: error: for each function it appears in.) drivers/net/ethernet/freescale/fec.c: In function 'fec_enet_alloc_buffers': drivers/net/ethernet/freescale/fec.c:1213: error: 'dev' undeclared (first use in this function) Fix it, so that fec driver can be built again. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-06netdev: ethernet dev_alloc_skb to netdev_alloc_skbPradeep A Dalvi4-14/+13
Replaced deprecating dev_alloc_skb with netdev_alloc_skb in drivers/net/ethernet - Removed extra skb->dev = dev after netdev_alloc_skb Signed-off-by: Pradeep A Dalvi <netdev@pradeepdalvi.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-04Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-1/+1
2012-01-31net: fec: correct phy_name buffer length when init phy_nameRichard Zhao1-1/+1
Fix the bug that we got wrong phy_name on imx6q sabrelite board. snprintf used wrong length of phy_name. phy_name length is MII_BUS_ID_SIZE + 3 rather not MII_BUS_ID_SIZE. I change it to sizeof(phy_name). Signed-off-by: Richard Zhao <richard.zhao@linaro.org> Acked-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-30drivers/net: fix up stale paths from driver reorgPaul Gortmaker5-5/+5
The reorganization of the driver layout in drivers/net left behind some stale paths in comments and in Kconfig help text. Bring them up to date. No actual change to any code takes place here. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-24net: fec: use module_platform_driverFabio Estevam1-16/+1
Using module_platform_driver can make the code smaller. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-12net: fsl: fec: handle 10Mbps speed in RMII modeEric Benard2-3/+10
when the link is 10 Mbps and the mode is RMII, it's necessary to set FRCONT to 1 in MIIGSK_CFGR to divide the RMII source clock by 10 in order to support 10 Mbps operations. Signed-off-by: Eric Bénard <eric@eukrea.com> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-12gianfar: Fix invalid TX frames returned on error queue when time stampingManfred Rudigier2-10/+23
When TX time stamping for PTP messages is enabled on a socket, a time stamp is returned on the socket error queue to the user space application after the frame was transmitted. The transmitted frame is also returned on the error queue so that an application knows to which frame the time stamp belongs. In the current implementation the TxFCB is immediately followed by the frame. Since the eTSEC inserts the TX time stamp 8 bytes after the TxFCB, parts of the frame have been overwritten and an invalid frame was returned on the socket error queue. This patch fixes the described problem by adding additional 16 padding bytes between the TxFCB and the frame for all messages sent from a time stamping enabled socket (other sockets are not affected). Signed-off-by: Manfred Rudigier <manfred.rudigier@omicron.at> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-12gianfar: Fix missing sock reference when processing TX time stampsManfred Rudigier1-0/+4
When there is not enough headroom in the skb a private copy will be made. However, the private copy had no reference to the socket and consequently no time stamp could be queued on the socket error queue during the skb_tstamp_tx function. This patch fixes this issue by also stealing the sock reference from the original skb after making the private copy. Signed-off-by: Manfred Rudigier <manfred.rudigier@omicron.at> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-10fec: use an unique MDIO bus name.Florian Fainelli1-1/+2
Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-09Merge tag 'clk' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-socLinus Torvalds1-5/+5
clock management changes for i.MX Another simple series related to clock management, this time only for imx. * tag 'clk' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: mxs: select HAVE_CLK_PREPARE for clock clk: add config option HAVE_CLK_PREPARE into Kconfig ASoC: mxs-saif: convert to clk_prepare/clk_unprepare video: mxsfb: convert to clk_prepare/clk_unprepare serial: mxs-auart: convert to clk_prepare/clk_unprepare net: flexcan: convert to clk_prepare/clk_unprepare mtd: gpmi-lib: convert to clk_prepare/clk_unprepare mmc: mxs-mmc: convert to clk_prepare/clk_unprepare dma: mxs-dma: convert to clk_prepare/clk_unprepare net: fec: add clk_prepare/clk_unprepare ARM: mxs: convert platform code to clk_prepare/clk_unprepare clk: add helper functions clk_prepare_enable and clk_disable_unprepare Fix up trivial conflicts in drivers/net/ethernet/freescale/fec.c due to commit 0ebafefcaa7a ("net: fec: add clk_prepare/clk_unprepare") clashing trivially with commit e163cc97f9ac ("net/fec: fix the .remove code").
2012-01-05net: make ethtool_ops conststephen hemminger1-1/+1
Auditing all usage of ethtool_ops found several drivers that are not declaring the struct const when it should be. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-04Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-2/+2
2012-01-04gianfar: Reject out-of-range RX NFC locationsBen Hutchings1-2/+3
Currently the driver only uses location values to maintain an ordered list of filters. Make it reject location values >= MAX_FILER_IDX passed to the ETHTOOL_SRXCLSRLINS command, consistent with the range it reports for the ETHTOOL_GRXCLSRLALL command. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Acked-by: Sebastian Pöhn <sebastian.poehn@googlemail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-03net: fsl: fec: fix build for mx23-only kernelWolfram Sang1-2/+2
If one only selects mx23-based boards, compile fails: drivers/net/ethernet/freescale/fec.c:410:2: error: 'FEC_HASH_TABLE_HIGH' undeclared (first use in this function) drivers/net/ethernet/freescale/fec.c:411:2: error: 'FEC_HASH_TABLE_LOW' undeclared (first use in this function) This is because fec.h uses CONFIG_SOC_IMX28 to determine the register layout of the core which makes sense since the MX23 does not have a fec. However, Kconfig uses the broader ARCH_MXS symbol and this way even makes the fec-driver default for MX23. Adapt Kconfig to use the more precise SOC_IMX28 as well. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Cc: Fabio Estevam <fabio.estevam@freescale.com> Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Cc: Shawn Guo <shawn.guo@linaro.org> Cc: David S. Miller <davem@davemloft.net> Acked-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-28net: fec: Adjust ENET MDIO timeoutsRogerio Pimentel1-1/+1
On extensive NFS boots on a mx6qsabrelite board it was noted that "FEC: MDIO read timeout" were occuring, which caused failure on loading the FEC driver. The original FEC_MII_TIMEOUT was set to 1 ms, which is too low when passed to the usecs_to_jiffies macro. On ARM one jiffy is 10ms, so use a timeout of 30ms, which corresponds to 3 jiffies. After running extensive NFS boots, the MDIO timeouts do not occur anymore with this change. Signed-off-by: Rogerio Pimentel <rogerio.pimentel@freescale.com> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-28net: fec: add clk_prepare/clk_unprepareRichard Zhao1-5/+5
It's for migrating to generic clk framework API. Signed-off-by: Richard Zhao <richard.zhao@linaro.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Cc: David S. Miller <davem@davemloft.net> Acked-by: Marek Vasut <marek.vasut@gmail.com>
2011-12-16Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2-11/+13
Conflicts: drivers/net/ethernet/freescale/fsl_pq_mdio.c net/batman-adv/translation-table.c net/ipv6/route.c
2011-12-08net/fec: make FEC driver buildable as moduleLothar Waßmann1-1/+1
Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Tested-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-08net/fec: fix the .remove codeLothar Waßmann1-9/+22
The .remove code is broken in several ways. - mdiobus_unregister() is called twice for the same object in case of dual FEC - phy_disconnect() is being called when the PHY is already disconnected - the requested IRQ(s) are not freed - fec_stop() is being called with the inteface already stopped All of those lead to kernel crashes if the remove function is actually used. Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Tested-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-08net/fec: preserve MII/RMII setting in fec_stop()Lothar Waßmann1-1/+4
Additionally to setting the ETHER_EN bit in FEC_ECNTRL the MII/RMII setting in FEC_R_CNTRL needs to be preserved to keep the MII interface functional. Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Tested-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-08net/fec: don't munge MAC address from platform dataLothar Waßmann1-1/+1
When the MAC address is supplied via platform_data it should be OK as it is and should not be modified in case of a dual FEC setup. Also copying the MAC from platform_data to the single 'macaddr' variable will overwrite the MAC for the first interface in case of a dual FEC setup. Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-08net/fec: don't request invalid IRQLothar Waßmann1-2/+6
prevent calling request_irq() with a known invalid IRQ number and preserve the return value of the platform_get_irq() function Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-08net/fec: prevent dobule restart of interface on FDX/HDX changeLothar Waßmann1-0/+2
Upon detection of a FDX/HDX change the interface is restarted twice. Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-08net/fec: set con_id in clk_get() call to NULLLothar Waßmann1-1/+1
The con_id is actually not needed for clk_get(). Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-08net/fec: misc cleanupsLothar Waßmann1-6/+8
- remove some bogus whitespace - remove line wraps from printk messages Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-07fsl_pq_mdio: Clean up tbi address configurationAndy Fleming1-45/+8
The code for setting the address of the internal TBI PHY was convoluted enough without a maze of ifdefs. Clean it up a bit so we allow the logic to fail down to -ENODEV at the end of the if/else ladder, rather than using ifdefs to repeat the same failure code over and over. Also, remove the support for the auto-configuration. I'm not aware of anyone using it, and it ends up using the bus mutex before it's been initialized. Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-07net/fec: fix the use of pdev->idShawn Guo1-4/+7
The pdev->id is used in several places for different purpose. All these uses assume it's always the id of fec device which is >= 0. However this is only true for non-DT case. When DT plays, pdev->id is always -1, which will break these pdev->id users. Instead of fixing all these users one by one, this patch introduces a new member 'dev_id' to 'struct fec_enet_private' for holding the correct fec device id, and replaces all the existing uses of pdev->id with this dev_id. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-02Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-0/+1
2011-11-30net: fec: Select the FEC driver by default for i.MX SoCsFabio Estevam1-0/+1
Since commit 230dec6 (net/fec: add imx6q enet support) the FEC driver is no longer built by default for i.MX SoCs. Let the FEC driver be built by default again. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Suggested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-29net/ethernet: convert drivers/net/ethernet/* to use module_platform_driver()Axel Lin6-76/+6
This patch converts the drivers in drivers/net/ethernet/* to use the module_platform_driver() macro which makes the code smaller and a bit simpler. Cc: "David S. Miller" <davem@davemloft.net> Cc: Pantelis Antoniou <pantelis.antoniou@gmail.com> Cc: Vitaly Bordug <vbordug@ru.mvista.com> Cc: Wan ZongShun <mcuos.com@gmail.com> Cc: Nicolas Pitre <nico@fluxnic.net> Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com> Cc: Marc Kleine-Budde <mkl@pengutronix.de> Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Cc: Jiri Pirko <jpirko@redhat.com> Cc: Daniel Hellstrom <daniel@gaisler.com> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: Tobias Klauser <tklauser@distanz.ch> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Jiri Kosina <jkosina@suse.cz> Cc: Richard Cochran <richard.cochran@omicron.at> Cc: Jonas Bonn <jonas@southpole.se> Cc: Sebastian Poehn <sebastian.poehn@belden.com> Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Cc: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Cc: "Michał Mirosław" <mirq-linux@rere.qmqm.pl> Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Wan ZongShun <mcuos.com@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-21gianfar: Use kmemdup rather than duplicating its implementationThomas Meyer1-2/+1
The semantic patch that makes this change is available in scripts/coccinelle/api/memdup.cocci. Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-16ucc_geth: Convert ENET_NUM_OCTETS_PER_ADDRESS uses to ETH_ALENJoe Perches2-4/+4
Reduce the number of #defines, use the normal #define from if_ether.h Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>