aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-11-06drivers: ethernet: qlogic: qlge_dbg.c: Fixed a coding style issueKumar Amit Mehta1-8/+8
checkpatch.pl throws error message for the current code. This patch fixes this coding style issue. Signed-off-by: Kumar Amit Mehta <gmate.amit@gmail.com> Acked-by: Jitendra Kalsaria <Jitendra.kalsaria@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-04r8169: enable internal ASPM and clock request settingshayeswang1-9/+21
The following chips need to enable internal settings to let ASPM and clock request work. RTL8111E-VL, RTL8111F, RTL8411, RTL8111G RTL8105, RTL8402, RTL8106 Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-03drivers/net/ethernet/ibm/emac/mal.c: use WARNJulia Lawall1-4/+2
Use WARN rather than printk followed by WARN_ON(1), for conciseness. A simplified version of the semantic patch that makes this transformation is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression list es; @@ -printk( +WARN(1, es); -WARN_ON(1); // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-03atp: remove set_rx_mode_8012()Paul Bolle2-58/+2
Building atp.o triggers this GCC warning: drivers/net/ethernet/realtek/atp.c: In function ‘set_rx_mode’: drivers/net/ethernet/realtek/atp.c:871:26: warning: ‘mc_filter[0]’ may be used uninitialized in this function [-Wuninitialized] GCC is correct. In promiscuous mode 'mc_filter' will be used uninitialized in set_rx_mode_8012(), which is apparently inlined into set_rx_mode(). But it turns out set_rx_mode_8012() will never be called, since net_local.chip_type will always be RTL8002. So we can just remove set_rx_mode_8012() and do some related cleanups. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-03cpsw: fix leaking IO mappingsRichard Cochran1-9/+8
The CPSW driver remaps two different IO regions, but fails to unmap them both. This patch fixes the issue by calling iounmap in the appropriate places. Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-03cpsw: rename register banks to match the reference manual, part 2Richard Cochran1-13/+13
The code mixes up the CPSW_SS and the CPSW_WR register naming. This patch changes the names to conform to the published Technical Reference Manual from TI, in order to make working on the code less confusing. Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-03macb: Keep driver's speed/duplex in sync with actual NCFGRVitalii Demianets1-0/+2
When underlying phy driver restores its state very fast after being brought down and up so that macb driver function macb_handle_link_change() was never called with link state "down", driver's internal representation of phy speed and duplex (bp->speed and bp->duplex) didn't change. So, macb driver sees no reason to perform actual write to the NCFGR register, although the speed and duplex settings in that register were reset when interface was brought down and up. In that case actual phy speed and duplex differ from NCFGR settings. The patch fixes that by keeping internal driver representation of speed and duplex in sync with actual content of NCFGR. Signed-off-by: Vitalii Demianets <vitas@nppfactor.kiev.ua> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-03net: neterion: Do not break word unregister.YOSHIFUJI Hideaki / 吉藤英明1-1/+2
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-03net: sh_eth: Fix a typo - replace regist with register.YOSHIFUJI Hideaki / 吉藤英明1-1/+1
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-03ptp: fixup Kconfig for two PHC drivers.Richard Cochran2-2/+2
Ben Hutchings recently came up with a better way to handle the kconfig dependencies for the PTP hardware clocks. This patch converts one new and one older driver to the new scheme. Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-03r8169: Kill SafeMtu macroKirill Smelkov1-1/+0
After d58d46b5 (r8169: jumbo fixes.) max frame len is stored in rtl_chip_infos[].jumbo_max for each chip and SafeMtu should be gone. Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-02eth: Make is_link_local() consistent with other address testsBen Hutchings3-3/+3
Function name should include '_ether_addr'. Return type should be bool. Parameter name should be 'addr' not 'dest' (also matching kernel-doc). Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Acked-by: John Fastabend <john.r.fastabend@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-02sfc: Select PTP_1588_CLOCKBen Hutchings1-0/+1
This was missed in commit a24006ed12616bde1bbdb26868495906a212d8dc ('ptp: Enable clock drivers along with associated net/PHY drivers') which enabled sfc's clock driver unconditionally. Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-02Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-nextDavid S. Miller9-33/+155
Jeff Kirsher says: ==================== This series contains updates to igb, ixgbe and e1000. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01FEC: Add time stamping code and a PTP hardware clockFrank Li5-1/+520
This patch adds a driver for the FEC(MX6) that offers time stamping and a PTP haderware clock. Because FEC\ENET(MX6) hardware frequency adjustment is complex, we have implemented this in software by changing the multiplication factor of the timecounter. Signed-off-by: Frank Li <Frank.Li@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01net: fec: move fec_enet_private to header fileFrank Li2-73/+81
A new file fec_ptp.c will use fec_enet_private to support 1588 PTP move such structure to common header file fec.h Signed-off-by: Frank Li <Frank.Li@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01cpsw: support the HWTSTAMP ioctl and the CPTSRichard Cochran1-0/+182
This patch hooks into the CPTS code and adds support for the HWTSTAMP ioctl. The patch includes code for the CPSW version found in the dm814x even though the background device tree support for this board is still missing. Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01cpts: specify the input clock frequency via DTRichard Cochran1-0/+14
This patch adds a way to configure the CPTS input clock scaling factors via the device tree. Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01cpsw: add a DT field for the active time stamping portRichard Cochran1-0/+7
Because time stamping on both external ports of the switch simultaneously is positively useless from the application's point of view, this patch provides a DT configuration method to choose the active port. Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01cpsw: add a DT field for the cpts offsetRichard Cochran1-0/+7
Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01cpts: introduce time stamping code and a PTP hardware clock.Richard Cochran4-1/+582
This patch adds a driver for the CPTS that offers time stamping and a PTP hardware clock. Because some of the CPTS hardware variants (like the am335x) do not support frequency adjustment, we have implemented this in software by changing the multiplication factor of the timecounter. Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01cpsw: support both silicon versionsRichard Cochran1-16/+90
This patch fixes the cpsw driver to operate correctly with both the dm814x and the am335x versions of the switch hardware. Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01cpsw: remember the silicon versionRichard Cochran1-0/+4
This patch lets the CPSW driver remember the version number in order to support the two different variants already in the wild. Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01cpsw: add missing fields to the CPSW_SS register bank.Richard Cochran1-0/+8
Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01cpsw: rename register banks to match the reference manualRichard Cochran1-9/+9
The code mixes up the CPSW_SS and the CPSW_WR register naming. This patch changes the names to conform to the published Technical Reference Manual from TI, in order to make working on the code less confusing. Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01drivers: net: ethernet: cpsw: add multicast address to ALE tableMugunthan V N3-3/+56
Adding multicast address to ALE table via netdev ops to subscribe, transmit or receive multicast frames to and from the network Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Acked-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01net/macb: add pinctrl consumer supportJean-Christophe PLAGNIOL-VILLARD1-0/+11
If no pinctrl available just report a warning as some architecture may not need to do anything. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> [nicolas.ferre@atmel.com: adapt the error path, remove unneeded headers] Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Tested-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01net/macb: Offset first RX buffer by two bytesHavard Skinnemoen1-7/+16
Make the ethernet frame payload word-aligned, possibly making the memcpy into the skb a bit faster. This will be even more important after we eliminate the copy altogether. Also eliminate the redundant RX_OFFSET constant -- it has the same definition and purpose as NET_IP_ALIGN. Signed-off-by: Havard Skinnemoen <havard@skinnemoen.net> [nicolas.ferre@atmel.com: adapt to newer kernel] Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Tested-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01net/macb: better manage tx errorsNicolas Ferre2-54/+113
Handle all TX errors, not only underruns. TX error management is deferred to a dedicated workqueue. Reinitialize the TX ring after treating all remaining frames, and restart the controller when everything has been cleaned up properly. Napi is not stopped during this task as the driver only handles napi for RX for now. With this sequence, we do not need a special check during the xmit method as the packets will be caught by TX disable during workqueue execution. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Tested-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01net/macb: ethtool interface: add register dump featureNicolas Ferre2-0/+43
Add macb_get_regs() ethtool function and its helper function: macb_get_regs_len(). The version field is deduced from the IP revision which gives the "MACB or GEM" information. An additional version field is reserved. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Reviewed-by: Ben Hutchings <bhutchings@solarflare.com> Tested-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01net/macb: clean up ring buffer logicHavard Skinnemoen3-73/+127
Instead of masking head and tail every time we increment them, just let them wrap through UINT_MAX and mask them when subscripting. Add simple accessor functions to do the subscripting properly to minimize the chances of messing this up. This makes the code slightly smaller, and hopefully faster as well. Also, doing the ring buffer management this way will simplify things a lot when making the ring sizes configurable in the future. Available number of descriptors in ring buffer function by David Laight. Signed-off-by: Havard Skinnemoen <havard@skinnemoen.net> [nicolas.ferre@atmel.com: split patch in topics, adapt to newer kernel] Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Tested-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01net/macb: tx status is more than 8 bits nowNicolas Ferre1-1/+1
On some revision of GEM, TSR status register has more information. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Tested-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01net/macb: remove macb_get_drvinfo()Nicolas Ferre1-11/+0
This function has little meaning so remove it altogether and let ethtool core fill in the fields automatically. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Reviewed-by: Ben Hutchings <bhutchings@solarflare.com> Tested-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01net/macb: change debugging messagesHavard Skinnemoen1-10/+12
Convert some noisy netdev_dbg() statements to netdev_vdbg(). Defining DEBUG will no longer fill up the logs; VERBOSE_DEBUG still does. Add one more verbose debug for ISR status. Signed-off-by: Havard Skinnemoen <havard@skinnemoen.net> [nicolas.ferre@atmel.com: split patch in topics, add ISR status] Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Tested-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01net/macb: memory barriers cleanupHavard Skinnemoen1-4/+14
Remove a couple of unneeded barriers and document the remaining ones. Signed-off-by: Havard Skinnemoen <havard@skinnemoen.net> [nicolas.ferre@atmel.com: split patch in topics] Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Tested-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01net/macb: Add support for Gigabit Ethernet modePatrice Vilchez2-3/+16
Add Gigabit Ethernet mode to GEM cadence IP and enable RGMII connection. Signed-off-by: Patrice Vilchez <patrice.vilchez@atmel.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Tested-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01bfin_mac: offer a PTP Hardware Clock.Richard Cochran3-3/+175
The BF518 has a PTP time unit that works in a similar way to other MAC based clocks, like gianfar, ixp46x, and igb. This patch adds support for using the blackfin as a PHC. Although the blackfin hardware does offer a few ancillary features, this patch implements only the basic operations. Compile tested only. Signed-off-by: Richard Cochran <richardcochran@gmail.com> Tested-by: Bob Liu <lliubbo@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01bfin_mac: replace sys time stamps with raw ones instead.Richard Cochran2-70/+28
This patch replaces the sys time stamps and timecompare code with simple raw hardware time stamps in nanosecond resolution. The only tricky bit is to find a PTP Hardware Clock period slower than the input clock period and a power of two. Compile tested only. Signed-off-by: Richard Cochran <richardcochran@gmail.com> Tested-by: Bob Liu <lliubbo@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01bfin_mac: only advertise hardware time stamped when enabled.Richard Cochran1-0/+4
The hardware time stamping code is a compile time option for the blackfin. When it is not enabled, the driver should fall back to the standard ethtool reply to the get_ts_info query. Compile tested only. Signed-off-by: Richard Cochran <richardcochran@gmail.com> Tested-by: Bob Liu <lliubbo@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01ptp: Enable clock drivers along with associated net/PHY driversBen Hutchings16-168/+5
Where a PTP clock driver is associated with a net or PHY driver, it should be enabled automatically whenever that driver is enabled. Therefore: - Make PTP clock drivers select rather than depending on PTP_1588_CLOCK - Remove separate boolean options for PTP clock drivers that are built as part of net driver modules. (This also fixes cases where the PTP subsystem is wrongly forced to be built-in.) - Set 'default y' for PTP clock drivers that depend on specific net drivers but are built separately Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01ptp: Make PTP_1588_CLOCK select rather than depend on PPSBen Hutchings2-3/+0
PTP hardware clock drivers that select PTP_1588_CLOCK must currently also select PPS. For those drivers that don't, the user must enable PPS, then enable PTP_1588_CLOCK, then the driver. Simplify things for developers and users by putting this selection in one place. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01pps, ptp: Remove dependencies on EXPERIMENTALBen Hutchings2-3/+2
These are now established subsystems, and we want drivers to be able to select PPS and PTP_1588_CLOCK without depending on EXPERIMENTAL. Further, the use of EXPERIMENTAL is now deprecated in general. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01e1000: fix concurrent accesses to PHY from watchdog and ethtoolMaxime Bizon1-2/+15
The e1000 driver currently does not protect concurrent accesses to the PHY from both the ethtool callbacks, and from the e1000_watchdog function. This patchs adds a new spinlock which is used by e1000_{read,write}_phy_reg in order to serialize concurrent accesses to the PHY. Signed-off-by: Maxime Bizon <mbizon@freebox.fr> Signed-off-by: Florian Fainelli <ffainelli@freebox.fr> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-11-01igb: Fix EEPROM writes via ethtool on i210Carolyn Wyborny1-0/+1
This patch fixes a problem where the driver would crash when trying to write a word to the EEPROM on i210 devices. Reported-by: Ekman Tsang <Ekman.Tsang@riverbed.com> Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-11-01igb: Add function to read i211's invm versionCarolyn Wyborny4-0/+107
The i211's one-time programmable (invm) version field is different than the other fields contained in it. This patch adds a function to get the invm version of it and store it for output from ethtool. Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-11-01igb: Remove workaround for EEE configuration on i210/I211Carolyn Wyborny1-11/+8
This patch removes a workaround that was needed on pre-release hardware. Released hardware should not have this setting, but any devices that do will get a warning message instead. Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-11-01ixgbe: fix default setting of TXDCTL.WTHRESHEmil Tantilov2-20/+15
The q_vector->itr check in ixgbe_configure_tx_ring() was done prior to it being set, which resulted in TXDCTL.WTHRESH always being set to 1 on driver load, while consequent resets would set it to 8. This patch moves the setting of q_vector->itr in ixgbe_alloc_q_vector() to make sure that TXDCTL.WTHRESH is set to 8 by default. Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-11-01ixgbe: fix uninitialized event.type in ixgbe_ptp_check_pps_eventJacob Keller1-0/+9
This patch fixes a bug in ixgbe_ptp_check_pps_event where the type was uninitialized and could cause unknown event outcomes. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-10-31Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-nextDavid S. Miller16-134/+397
Jeff Kirsher says: ==================== This series contains updates to ixgbe, ixgbevf, igbvf, igb and networking core (bridge). Most notably is the addition of support for local link multicast addresses in SR-IOV mode to the networking core. Also note, the ixgbe patch "ixgbe: Add support for pipeline reset" and "ixgbe: Fix return value from macvlan filter function" is revised based on community feedback. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-31ethernet: Convert dev_printk(KERN_<LEVEL> to dev_<level>(Joe Perches2-8/+6
dev_<level> calls take less code than dev_printk(KERN_<LEVEL> and reducing object size is good. Coalesce formats for easier grep. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>