aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/oki-semi (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-12-15net: Rename NETIF_F_ALL_CSUM to NETIF_F_CSUM_MASKTom Herbert1-1/+1
The name NETIF_F_ALL_CSUM is a misnomer. This does not correspond to the set of features for offloading all checksums. This is a mask of the checksum offload related features bits. It is incorrect to set both NETIF_F_HW_CSUM and NETIF_F_IP_CSUM or NETIF_F_IPV6 at the same time for features of a device. This patch: - Changes instances of NETIF_F_ALL_CSUM to NETIF_F_CSUM_MASK (where NETIF_F_ALL_CSUM is being used as a mask). - Changes bonding, sfc/efx, ipvlan, macvlan, vlan, and team drivers to use NEITF_F_HW_CSUM in features list instead of NETIF_F_ALL_CSUM. Signed-off-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-16drivers/net: get rid of unnecessary initializations in .get_drvinfo()Ivan Vecera1-1/+0
Many drivers initialize uselessly n_priv_flags, n_stats, testinfo_len, eedump_len & regdump_len fields in their .get_drvinfo() ethtool op. It's not necessary as these fields is filled in ethtool_get_drvinfo(). v2: removed unused variable v3: removed another unused variable Signed-off-by: Ivan Vecera <ivecera@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-06-23drivers/net: remove all references to obsolete Ethernet-HOWTOPaul Gortmaker1-3/+1
This howto made sense in the 1990s when users had to manually configure ISA cards with jumpers or vendor utilities, but with the implementation of PCI it became increasingly less and less relevant, to the point where it has been well over a decade since I last updated it. And there is no value in anyone else taking over updating it either. However the references to it continue to spread as boiler plate text from one Kconfig file into the next. We are not doing end users any favours by pointing them at this old document, so lets kill it with fire, once and for all, to hopefully stop any further spread. No code is changed in this commit, just Kconfig help text. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-08ethernet: codespell comment spelling fixesJoe Perches1-1/+1
To test a checkpatch spelling patch, I ran codespell against drivers/net/ethernet/. $ git ls-files drivers/net/ethernet/ | \ while read file ; do \ codespell -w $file; \ done I removed a false positive in e1000_hw.h Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-22pch_gbe: 'select' NET_PTP_CLASSIFY.David S. Miller1-0/+1
Fixes the following randconfig build failure: > drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c: In function > ‘pch_ptp_match’: > drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:130:2: error: > implicit declaration of function ‘ptp_classify_raw’ > [-Werror=implicit-function-declaration] > if (ptp_classify_raw(skb) == PTP_CLASS_NONE) > ^ > cc1: some warnings being treated as errors > make[5]: *** [drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.o] Error 1 Reported-by: Jim Davis <jim.epost@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-12PCI: Remove DEFINE_PCI_DEVICE_TABLE macro useBenoit Taine1-1/+1
We should prefer `struct pci_device_id` over `DEFINE_PCI_DEVICE_TABLE` to meet kernel coding style guidelines. This issue was reported by checkpatch. A simplified version of the semantic patch that makes this change is as follows (http://coccinelle.lip6.fr/): // <smpl> @@ identifier i; declarer name DEFINE_PCI_DEVICE_TABLE; initializer z; @@ - DEFINE_PCI_DEVICE_TABLE(i) + const struct pci_device_id i[] = z; // </smpl> [bhelgaas: add semantic patch] Signed-off-by: Benoit Taine <benoit.taine@lip6.fr> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2014-06-06net: use SPEED_UNKNOWN and DUPLEX_UNKNOWN when appropriateJiri Pirko1-1/+1
Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-05-16net: pch_gbe depends on x86_32Jean Delvare1-1/+1
The pch_gbe driver is for a companion chip to the Intel Atom E600 series processors. These are 32-bit x86 processors so the driver is only needed on X86_32. Signed-off-by: Jean Delvare <jdelvare@suse.de> Cc: Jiri Slaby <jslaby@suse.cz> Cc: David S. Miller <davem@davemloft.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-05-13net: get rid of SET_ETHTOOL_OPSWilfried Klaebe1-1/+1
net: get rid of SET_ETHTOOL_OPS Dave Miller mentioned he'd like to see SET_ETHTOOL_OPS gone. This does that. Mostly done via coccinelle script: @@ struct ethtool_ops *ops; struct net_device *dev; @@ - SET_ETHTOOL_OPS(dev, ops); + dev->ethtool_ops = ops; Compile tested only, but I'd seriously wonder if this broke anything. Suggested-by: Dave Miller <davem@davemloft.net> Signed-off-by: Wilfried Klaebe <w-lkml@lebenslange-mailadresse.de> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-03-31net: ptp: do not reimplement PTP/BPF classifierDaniel Borkmann1-10/+1
There are currently pch_gbe, cpts, and ixp4xx_eth drivers that open-code and reimplement a BPF classifier for the PTP protocol. Since all of them effectively do the very same thing and load the very same PTP/BPF filter, we can just consolidate that code by introducing ptp_classify_raw() in the time-stamping core framework which can be used in drivers. As drivers get initialized after bootstrapping the core networking subsystem, they can make use of ptp_insns wrapped through ptp_classify_raw(), which allows to simplify and remove PTP classifier setup code in drivers. Joint work with Alexei Starovoitov. Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Signed-off-by: Alexei Starovoitov <ast@plumgrid.com> Cc: Richard Cochran <richard.cochran@omicron.at> Cc: Jiri Benc <jbenc@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-06ethernet: Fix FSF address in file headersJeff Kirsher8-16/+8
Several files refer to an old address for the Free Software Foundation in the file header comment. Resolve by replacing the address with the URL <http://www.gnu.org/licenses/> so that we do not have to keep updating the header comments anytime the address changes. CC: Santosh Raspatur <santosh@chelsio.com> CC: Dimitris Michailidis <dm@chelsio.com> CC: Michael Chan <mchan@broadcom.com> CC: Santiago Leon <santil@linux.vnet.ibm.com> CC: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> CC: Olof Johansson <olof@lixom.net> CC: Manish Chopra <manish.chopra@qlogic.com> CC: Sony Chacko <sony.chacko@qlogic.com> CC: Rajesh Borundia <rajesh.borundia@qlogic.com> CC: Nicolas Pitre <nico@fluxnic.net> CC: Steve Glendinning <steve.glendinning@shawell.net> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-11-14pch_gbe: Validate hwtstamp_config completely before applying itBen Hutchings1-9/+3
hwtstamp_ioctl() should validate all fields of hwtstamp_config before making any changes. Currently it sets the TX configuration before validating the rx_filter field. Compile-tested only. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-09-24oki-semi: Remove extern from function prototypesJoe Perches1-28/+28
There are a mix of function prototypes with and without extern in the kernel sources. Standardize on not using extern for function prototypes. Function prototypes don't need to be written with extern. extern is assumed by the compiler. Its use is as unnecessary as using auto to declare automatic/local variables in a block. Signed-off-by: Joe Perches <joe@perches.com>
2013-08-29drivers:net: Convert dma_alloc_coherent(...__GFP_ZERO) to dma_zalloc_coherentJoe Perches1-9/+7
__GFP_ZERO is an uncommon flag and perhaps is better not used. static inline dma_zalloc_coherent exists so convert the uses of dma_alloc_coherent with __GFP_ZERO to the more common kernel style with zalloc. Remove memset from the static inline dma_zalloc_coherent and add just one use of __GFP_ZERO instead. Trivially reduces the size of the existing uses of dma_zalloc_coherent. Realign arguments as appropriate. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Acked-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-20pch_gbe: ethtool cannot change parameters when link is downAnders Larsen1-0/+1
When attempting to change e.g. the advertising mask when the link is down ecmd->speed is -1 causing mii_ethtool_sset() to bail out. This bug bit when connecting to a gigabit switch through a 4-pin (industrial) cable, since link negotiation would not complete (both endpoints claimed to be gigabit-capable, but this is not possible with only 4 pins). Any attempt to fix this by setting autonegation to not offer 1000Mbps failed as the setting would not be accepted while the link was still down... Set ecmd->speed to SPEED_1000 to satisfy mii_ethtool_sset() (the actual value of ecmd->speed doesn't matter as long as it is valid, since a re-negotation is forced afterwards). Signed-off-by: Anders Larsen <al@alarsen.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-03Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-1/+1
Merge net into net-next to setup some infrastructure Eric Dumazet needs for usbnet changes. Signed-off-by: David S. Miller <davem@davemloft.net>
2013-07-25pch_gbe: Add MinnowBoard supportDarren Hart4-0/+163
The MinnowBoard uses an AR803x PHY with the PCH GBE which requires special handling. Use the MinnowBoard PCI Subsystem ID to detect this and add a pci_device_id.driver_data structure and functions to handle platform setup. The AR803x does not implement the RGMII 2ns TX clock delay in the trace routing nor via strapping. Add a detection method for the board and the PHY and enable the TX clock delay via the registers. This PHY will hibernate without link for 10 seconds. Ensure the PHY is awake for probe and then disable hibernation. A future improvement would be to convert pch_gbe to using PHYLIB and making sure we can wake the PHY at the necessary times rather than permanently disabling it. Signed-off-by: Darren Hart <dvhart@linux.intel.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Peter Waskiewicz <peter.p.waskiewicz.jr@intel.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Joe Perches <joe@perches.com> Cc: netdev@vger.kernel.org
2013-07-24pch_gbe: Use PCH_GBE_PHY_REGS_LEN instead of 32Darren Hart1-1/+1
Avoid using magic numbers when we have perfectly good defines just lying around. Signed-off-by: Darren Hart <dvhart@linux.intel.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Peter Waskiewicz <peter.p.waskiewicz.jr@intel.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: netdev@vger.kernel.org
2013-07-22net: pch_gbe depends on x86Jiri Slaby1-1/+1
Since 4bb1667255a86360721291fe59991d033bbc2f2a (build some drivers only when compile-testing), PTP_1588_CLOCK_PCH depends on (X86 || COMPILE_TEST). But PCH_GBE selects PTP_1588_CLOCK_PCH without depending on x86. Fix this by adding the same dependency here. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Reported-by: <fengguang.wu@intel.com> [intel's build test robot] Cc: "David S. Miller" <davem@davemloft.net> Cc: Ben Hutchings <ben@decadent.org.uk> Cc: netdev@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: kbuild-all@01.org Signed-off-by: David S. Miller <davem@davemloft.net>
2013-06-28pch_gbe: use managed functions pcim_* and devm_*Andy Shevchenko1-35/+15
This makes the error handling much more simpler than open-coding everything and in addition makes the probe function smaller an tidier. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-06-28pch_gbe: convert pr_* to netdev_*Andy Shevchenko6-164/+250
We may use nice macros to prefix our messages with proper device name. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-06-28pch_gbe: remove inline keyword for exported functionsAndy Shevchenko3-13/+13
There is no much sense to mark functions inline that are going to be used in the other compile modules. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-06-19net: Move MII out from under NET_CORE and hide itBen Hutchings1-1/+0
All drivers that select MII also need to select NET_CORE because MII depends on it. This is a bit ridiculous because NET_CORE is just a menu option that doesn't enable any code by itself. There is also no need for it to be a visible option, since its users all select it. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-16pch_gbe: minor: report the actual error on MTU changeVeaceslav Falico1-1/+1
If we can't _up() after changing the MTU, report the actual error instead of -ENOMEM. It can be really misleading cause pch_gbe is usually used in scenarios where the memory amount is really small, and thus hiding the real cause. Signed-off-by: Veaceslav Falico <vfalico@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-03-27Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-2/+2
Conflicts: include/net/ipip.h The changes made to ipip.h in 'net' were already included in 'net-next' before that header was moved to another location. Signed-off-by: David S. Miller <davem@davemloft.net>
2013-03-26pch_gbe: fix ip_summed checksum reporting on rxVeaceslav Falico1-2/+2
skb->ip_summed should be CHECKSUM_UNNECESSARY when the driver reports that checksums were correct and CHECKSUM_NONE in any other case. They're currently placed vice versa, which breaks the forwarding scenario. Fix it by placing them as described above. Signed-off-by: Veaceslav Falico <vfalico@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-03-17drivers:net: dma_alloc_coherent: use __GFP_ZERO instead of memset(, 0)Joe Perches1-6/+5
Reduce the number of calls required to alloc a zeroed block of memory. Trivially reduces overall object size. Other changes around these removals o Neaten call argument alignment o Remove an unnecessary OOM message after dma_alloc_coherent failure o Remove unnecessary gfp_t stack variable Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-03-15drivers:net: Remove dma_alloc_coherent OOM messagesJoe Perches1-8/+4
I believe these error messages are already logged on allocation failure by warn_alloc_failed and so get a dump_stack on OOM. Remove the unnecessary additional error logging. Around these deletions: o Alignment neatening. o Remove unnecessary casts of dma_alloc_coherent. o Hoist assigns from ifs. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-17pch_gbe, ptp_pch: Fix the dependency direction between these driversBen Hutchings1-0/+1
In commit a24006ed12616bde1bbdb26868495906a212d8dc ('ptp: Enable clock drivers along with associated net/PHY drivers') I wrongly made PTP_1588_CLOCK_PCH depend on PCH_GBE. The dependency is really the other way around. Therefore make PCH_GBE select PTP_1588_CLOCK_PCH and remove the 'default y' from the latter. Reported-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Acked-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-10Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-79/+37
Conflicts: drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c Minor conflict between the BCM_CNIC define removal in net-next and a bug fix added to net. Based upon a conflict resolution patch posted by Stephen Rothwell. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01ptp: Enable clock drivers along with associated net/PHY driversBen Hutchings3-30/+0
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 Hutchings1-1/+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 Hutchings1-1/+0
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-10-24pch_gbe: fix error handling in pch_gbe_up()Veaceslav Falico1-6/+11
If we fail to allocate rx buffers pool by any reason, we'll just return with an error, however we've previously successfully requested an irq. Fix this by releasing the irq before returning the error. Signed-off-by: Veaceslav Falico <vfalico@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-23pch_gbe: don't reset MAC_RX on FIFO overflowVeaceslav Falico1-60/+6
Currently, when FIFO_ERR happens, we stop the dma, wait for it to become idle and then reset the whole MAC_RX logic (and after that we must re-set multicast addresses and also re-enable MAC_RX when we're finally ready to accept new packets). This leads to CRC errors on high number of incoming packets and is not needed according to the datasheet. This patch fixes it by the following steps: 1) remove this reset in pch_gbe_stop_receive(), which causes some functions to not be used anywhere 2) remove already unused functions pch_gbe_wait_clr_bit_irq() and pch_gbe_mac_reset_rx() to correctly build 3) move pch_gbe_enable_mac_rx() out of pch_gbe_start_receive() to pch_gbe_up() where it's only needed after we've removed the MAC_RX reset 4) rename pch_gbe_start/stop_receive() to pch_gbe_enable/disable_dma_rx() to more precisely reflect what the functions are now doing. After these changes we already don't see the CRC errors and gain some increase in RX processing speed. Signed-off-by: Veaceslav Falico <vfalico@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-23pch_gbe: don't re-set RX_FIFO_ERR flag in napi_pollVeaceslav Falico1-13/+6
If we were in RX_FIFO_ERR state and entered pch_gbe_napi_poll(), we'll anyway clean some rx space and thus can continue to receive more packets. Currently, we re-set the RX_FIFO_ERR in situations when we've exhausted our budget for RX cleaning or cleaned some TX packets. Removing it gives us +20%-40% speed increase and a lot less of RX_FIFO_ERRors reported. Signed-off-by: Veaceslav Falico <vfalico@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-23pch_gbe: create functions for MAC_RX {en,dis}ableVeaceslav Falico1-6/+20
Move MAC_RX-related bits into separate functions. Signed-off-by: Veaceslav Falico <vfalico@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-09pch_gbe: Fix build error by selecting all the possible dependencies.Haicheng Li1-0/+3
Fengguang reported a kernel build failure as following: drivers/built-in.o: In function `pch_gbe_ioctl': pch_gbe_main.c:(.text+0x510370): undefined reference to `pch_ch_control_write' pch_gbe_main.c:(.text+0x510393): undefined reference to `pch_ch_control_write' pch_gbe_main.c:(.text+0x5103b3): undefined reference to `pch_ch_control_write' ... It's a regression by commit da1586461. The root cause is that the CONFIG_PPS is not set there, consequently CONFIG_PTP_1588_CLOCK can not be set anyway, which finally causes ptp_pch and pch_gbe_main build failures. As David prefers to use *select* to fix such module co-dependency issues, this patch explicitly selects all the possible dependencies of PCH_PTP. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Reviewed-by: David S. Miller <davem@davemloft.net> Signed-off-by: Haicheng Li <haicheng.lee@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-02pch_gbe: Fix PTP dependencies.David S. Miller1-1/+1
The config combination: CONFIG_PCH_GBE=y CONFIG_PCH_PTP=y CONFIG_PTP_1588_CLOCK=m doesn't work, because then you have a built-in kernel object (the PCH_PTP code) referring to symbols in a module (PTP_1588_CLOCK). Fix this like IXGBE, by using "select PTP_1588_CLOCK" instead of a "depends on". Reported-by: Haicheng Li <haicheng.li@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-07netdev: make pci_error_handlers constStephen Hemminger1-1/+1
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2012-07-26pch_gbe: vlan skb len fixAndy Cress1-7/+0
pch_gbe_xmit_frame skb->len verification was incorrect in vlan case causing bogus transfer length errors. One correction could be: offset = skb->protocol == htons(ETH_P_8021Q) ? 0 : 4; if (unlikely(skb->len > (adapter->hw.mac.max_frame_size - offset))) However, this verification is not necessary, so remove it. Signed-off-by: Andy Cress <andy.cress@us.kontron.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-26pch_gbe: add extra clean txAndy Cress1-13/+44
This adds extra cleaning to the pch_gbe_clean_tx routine to avoid transmit timeouts on some BCM PHYs that have different timing. Also update the DRV_VERSION to 1.01, and show it. Signed-off-by: Andy Cress <andy.cress@us.kontron.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-26pch_gbe: fix transmit watchdog timeoutAndy Cress1-1/+1
An extended ping test with 6 vlans resulted in a driver oops with a netdev transmit timeout. Fix WATCHDOG_TIMEOUT to be more like e1000e at 5 * HZ, to avoid unnecessary transmit timeouts. Signed-off-by: Andy Cress <andy.cress@us.kontron.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-25net/pch_gpe: Cannot disable ethernet autonegationWei Yang2-2/+3
When attempting to disable ethernet autonegation via ethtool, the pch_gpe driver will set software reset bit of PHY chip, But control register of PHY chip of FRI2 will reenable ethernet autonegation. Signed-off-by: Wei Yang <w90p710@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-10drivers/net/ethernet: Fix (nearly-)kernel-doc comments for various functionsBen Hutchings4-34/+34
Fix incorrect start markers, wrapped summary lines, missing section breaks, incorrect separators, and some name mismatches. Delete a few that are content-free. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-16Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2-16/+11
2012-05-15pch_gbe: fix transmit racesEric Dumazet2-16/+11
Andy reported pch_gbe triggered "NETDEV WATCHDOG" errors. May 11 11:06:09 kontron kernel: WARNING: at net/sched/sch_generic.c:261 dev_watchdog+0x1ec/0x200() (Not tainted) May 11 11:06:09 kontron kernel: Hardware name: N/A May 11 11:06:09 kontron kernel: NETDEV WATCHDOG: eth0 (pch_gbe): transmit queue 0 timed out It seems pch_gbe has a racy tx path (races with TX completion path) Remove tx_queue_lock lock since it has no purpose, we must use tx_lock instead. Signed-off-by: Eric Dumazet <edumazet@google.com> Reported-by: Andy Cress <andy.cress@us.kontron.com> Tested-by: Andy Cress <andy.cress@us.kontron.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-30pch_gbe: reprogram multicast address register on resetRongQing.Li1-55/+5
The reset logic after a Rx FIFO overrun will clear the programmed multicast addresses. This patch fixes the issue by reprogramming the registers after the reset. The commit eefc48b ("pch_gbe: reprogram multicast address register on reset") tried to fix this problem, but it introduces unnecessary codes. In fact, all multicast addresses have been saved in netdev->mc, So we can call pch_gbe_set_multi() directly after reset_hw and reset_rx. This commit kills 50+ line codes Cc: Richard Cochran <richardcochran@gmail.com> Cc: Takahiro Shimizu <tshimizu818@gmail.com> Signed-off-by: RongQing.Li <roy.qing.li@gmail.com> Acked-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-28drivers/net/oki-semi: Donot recompute IP header checksumRongQing.Li1-2/+0
If I understand correct, NETIF_F_IP_CSUM only means the hardware will compute the TCP/UDP checksum, IP checksum is always computed in software So as a workround of hardware unable to compute small packages checksum, do not need to compute IP header checksum. Signed-off-by: RongQing.Li <roy.qing.li@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-28drivers/net/oki-semi: Remove the definition of PCH_GBE_ETH_ALENRongQing.Li1-2/+1
PCH_GBE_ETH_ALEN is equal to ETH_ALEN, so we can replace it with ETH_ALEN. If they are not equal, it must be a bug, since this is ethernet, and the address has been already stored to mc_addr_list as ETH_ALEN bytes when call pch_gbe_mac_mc_addr_list_update. Signed-off-by: RongQing.Li <roy.qing.li@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>