aboutsummaryrefslogtreecommitdiff
path: root/drivers/net
AgeCommit message (Collapse)AuthorFilesLines
2016-11-16virtio-net: add a missing synchronize_net()Eric Dumazet1-0/+5
It seems many drivers do not respect napi_hash_del() contract. When napi_hash_del() is used before netif_napi_del(), an RCU grace period is needed before freeing NAPI object. Fixes: 91815639d880 ("virtio-net: rx busy polling support") Signed-off-by: Eric Dumazet <[email protected]> Cc: Jason Wang <[email protected]> Cc: Michael S. Tsirkin <[email protected]> Acked-by: Michael S. Tsirkin <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-16amd-xgbe: Fix maximum GPIO value checkLendacky, Thomas1-2/+2
The GPIO support in the hardware allows for up to 16 GPIO pins, enumerated from 0 to 15. The driver uses the wrong value (16) to validate the GPIO pin range in the routines to set and clear the GPIO output pins. Update the code to use the correct value (15). Reported-by: Colin Ian King <[email protected]> Signed-off-by: Tom Lendacky <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-16amd-xgbe: Fix possible uninitialized variableLendacky, Thomas1-1/+1
The debugfs support in the driver uses a common routine to write the debugfs values. In this routine, if the input file position is non-zero then the write routine will not return an error and an output parameter will not have been set. Because an error isn't returned an uninitialized value will be written into a register. Fix the common write routine to return an error if the input file position is non-zero, which will propagate back to the caller. Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Tom Lendacky <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-16net: ethernet: marvell: pxa168_eth: Implement ethtool::nway_resetFlorian Fainelli1-0/+1
Implement ethtool::nway_reset using phy_ethtool_nway_reset. We are already using dev->phydev all over the place so this comes for free. Signed-off-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-16net: ethernet: mvpp2: Implement ethtool::nway_resetFlorian Fainelli1-0/+1
Implement ethtool::nway_reset using phy_ethtool_nway_reset. We are already using dev->phydev all over the place so this comes for free. Signed-off-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-16net: ethernet: mvneta: Implement ethtool::nway_resetFlorian Fainelli1-0/+1
Implement ethtool::nway_reset using phy_ethtool_nway_reset. We are already using dev->phydev all over the place so this comes for free. Signed-off-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-16net: ethoc: Implement ethtool::nway_resetFlorian Fainelli1-0/+1
Implement ethtool::nway_reset using phy_ethtool_nway_reset. We are already using dev->phydev all over the place so this comes for free. Signed-off-by: Florian Fainelli <[email protected]> Reviewed-by: Tobias Klauser <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-16net: stmmac: Implement ethtool::nway_resetFlorian Fainelli1-0/+1
Utilize the generic phy_ethtool_nway_reset() helper function to implement an autonegotiation restart. Signed-off-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-16bnx2x: switch to napi_complete_done()Eric Dumazet1-7/+8
Switch from napi_complete() to napi_complete_done() for better GRO support (gro_flush_timeout) and core NAPI features. Do not rearm interrupts if we are busy polling, to reduce bus and interrupts overhead. Signed-off-by: Eric Dumazet <[email protected]> Cc: Willem de Bruijn <[email protected]> Cc: Adam Belay <[email protected]> Cc: Tariq Toukan <[email protected]> Cc: Yuval Mintz <[email protected]> Cc: Ariel Elior <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-16net/mlx4_en: use napi_complete_done() return valueEric Dumazet1-2/+2
Do not rearm interrupts if we are busy polling. mlx4 uses separate CQ for TX and RX, so number of TX interrupts does not change, unfortunately. Signed-off-by: Eric Dumazet <[email protected]> Cc: Willem de Bruijn <[email protected]> Cc: Adam Belay <[email protected]> Cc: Tariq Toukan <[email protected]> Cc: Yuval Mintz <[email protected]> Cc: Ariel Elior <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-16net: thunderx: Fix memory leak and other issues upon interface toggleSunil Goutham2-7/+18
This patch fixes the following 1. When interface is being teardown and queues are being cleaned up, free pending SKBs that are in SQ which are either not transmitted or freed as NAPI is disabled by that time. 2. While interface initialization, delay CFG_DONE notification till the end to avoid corner cases where TXQs are enabled but CQ interrupts are not which results blocking transmission and kicking off watchdog. 3. Check for IFF_UP while re-enabling RBDR interrupts from tasklet. Signed-off-by: Sunil Goutham <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-16net: thunderx: Fix VF driver's interface statisticsSunil Goutham6-196/+197
This patch fixes multiple issues 1. Convert all driver statistics to percpu counters for accuracy. 2. To avoid multiple CQEs posted by a TSO packet appended to HW, TSO pkt's SQE has 'post_cqe' not set but a dummy SQE is added for getting HW transmit completion notification. This dummy SQE has 'dont_send' set and HW drops the pkt pointed to in this thus Tx drop counter increases. This patch fixes this by subtracting SW tx tso counter from HW Tx drop counter for actual packet drop counter. 3. Reset all individual queue's and VNIC HW stats when interface is going down. 4. Getrid off unnecessary counters in hot path. 5. Bringout all CQE error stats i.e both Rx and Tx. Signed-off-by: Sunil Goutham <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-16net: thunderx: Fix configuration of L3/L4 length checkingSunil Goutham1-2/+5
This patch fixes enabling of HW verification of L3/L4 length and TCP/UDP checksum which is currently being cleared. Also fixed VLAN stripping config which is being cleared when multiqset is enabled. Signed-off-by: Sunil Goutham <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-16net: thunderx: Program LMAC credits based on MTUSunil Goutham6-30/+53
Programming LMAC credits taking 9K frame size by default is incorrect as for an interface which is one of the many on the same BGX/QLM no of credits available will be less as Tx FIFO will be divided across all interfaces. So let's say a BGX with 40G interface and another BGX with multiple 10G, bandwidth of 10G interfaces will be effected when traffic is running on both 40G and 10G interfaces simultaneously. This patch fixes this issue by programming credits based on netdev's MTU. Also fixed configuring MTU to HW and added CQE counter for pkts which exceed this value. Signed-off-by: Sunil Goutham <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-16net: thunderx: Introduce BGX_ID_MASK macro to extract bgx_idRadha Mohan Chintakuntla2-2/+4
This patch fixes the 'bgx_id' determination on 83xx where there are 4 BGX blocks instead of 2 on other platforms. Signed-off-by: Radha Mohan Chintakuntla <[email protected]> Signed-off-by: Sunil Goutham <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-16ptp_clock: Allow for it to be optionalNicolas Pitre15-21/+23
In order to break the hard dependency between the PTP clock subsystem and ethernet drivers capable of being clock providers, this patch provides simple PTP stub functions to allow linkage of those drivers into the kernel even when the PTP subsystem is configured out. Drivers must be ready to accept NULL from ptp_clock_register() in that case. And to make it possible for PTP to be configured out, the select statement in those driver's Kconfig menu entries is converted to the new "imply" statement. This way the PTP subsystem may have Kconfig dependencies of its own, such as POSIX_TIMERS, without having to make those ethernet drivers unavailable if POSIX timers are cconfigured out. And when support for POSIX timers is selected again then the default config option for PTP clock support will automatically be adjusted accordingly. The pch_gbe driver is a bit special as it relies on extra code in drivers/ptp/ptp_pch.c. Therefore we let the make process descend into drivers/ptp/ even if PTP_1588_CLOCK is unselected. Signed-off-by: Nicolas Pitre <[email protected]> Acked-by: Richard Cochran <[email protected]> Acked-by: Edward Cree <[email protected]> Acked-by: Thomas Gleixner <[email protected]> Acked-by: John Stultz <[email protected]> Reviewed-by: Josh Triplett <[email protected]> Cc: Paul Bolle <[email protected]> Cc: [email protected] Cc: [email protected] Cc: Michal Marek <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2016-11-15alx: enable multiple tx queuesTobias Regnery1-2/+6
Enable multiple tx queues by default based on the number of online cpus. The hardware supports up to four tx queues. Based on the downstream driver at github.com/qca/alx Signed-off-by: Tobias Regnery <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-15alx: enable msi-x interrupts by defaultTobias Regnery1-5/+1
Remove the module parameter to enable msi-x support and enable msi-x interrupts unconditionally by default. This is a preparatory step to enable multi queue support by default, because this is only working with msi-x interrupts. Signed-off-by: Tobias Regnery <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-15alx: prepare tx path for multi queue supportTobias Regnery1-13/+45
This patch prepares the tx path to send data on multiple tx queues. It introduces per queue register adresses and uses them in the alx_tx_queue structs. There are new helper functions for the queue mapping in the tx path. Based on the downstream driver at github.com/qca/alx Signed-off-by: Tobias Regnery <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-15alx: prepare resource allocation for multi queue supportTobias Regnery1-52/+97
Allocate, initialise and free alx_tx_queue structs based on the number of alx_napi structures. Also increase the size of the descriptor memory based on the number of tx queues in use. Based on the downstream driver at github.com/qca/alx Signed-off-by: Tobias Regnery <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-15alx: prepare interrupt functions for multiple queuesTobias Regnery1-27/+105
Extend the interrupt bringup code and the interrupt handler for msi-x interrupts in order to handle multiple queues. We must change the poll function because with multiple queues it is possible that an alx_napi structure has only a tx or only a rx queue pointer. Based on the downstream driver at github.com/qca/alx Signed-off-by: Tobias Regnery <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-15alx: switch to per queue data structuresTobias Regnery2-95/+93
Remove the tx and rx queue structures from the alx_priv structure and switch everything over to the queue pointers in the alx_napi structure. Based on the downstream driver at github.com/qca/alx Signed-off-by: Tobias Regnery <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-15alx: add ability to allocate and free alx_napi structuresTobias Regnery1-21/+78
Add new functions to allocate and free the alx_napi structures and use them in __alx_open and __alx_stop. We only allocate one of these structures for now, as the rest of the driver is not yet ready for multiple queues. We switch over the setup of the interrupt mask and the call to netif_napi_add to the new function because we must adjust these later on a per queue basis. Based on the downstream driver at github.com/qca/alx Signed-off-by: Tobias Regnery <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-15alx: extend data structures for multi queue supportTobias Regnery1-0/+31
Extend the driver data structures to be able to handle multiple queues. Based on the downstream driver at github.com/qca/alx Signed-off-by: Tobias Regnery <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-15alx: refactor descriptor allocationTobias Regnery1-44/+53
Split the allocation of descriptor memory and the buffer allocation into a tx and rx function. This is in preparation for multiple queues where we need to iterate over the new functions. While at it drop the unneeded casting on the rx side. Signed-off-by: Tobias Regnery <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-15dpaa_eth: add trace pointsMadalin Bucur4-0/+158
Add trace points on the hot processing path. Signed-off-by: Ruxandra Ioana Radulescu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-15dpaa_eth: add sysfs exportsMadalin Bucur4-1/+174
Export Frame Queue and Buffer Pool IDs through sysfs. Signed-off-by: Madalin Bucur <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-15dpaa_eth: add ethtool statisticsMadalin Bucur3-2/+284
Add a series of counters to be exported through ethtool: - add detailed counters for reception errors; - add detailed counters for QMan enqueue reject events; - count the number of fragmented skbs received from the stack; - count all frames received on the Tx confirmation path; - add congestion group statistics; - count the number of interrupts for each CPU. Signed-off-by: Ioana Ciornei <[email protected]> Signed-off-by: Madalin Bucur <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-15dpaa_eth: add ethtool functionalityMadalin Bucur4-1/+224
Add support for basic ethtool operations. Signed-off-by: Madalin Bucur <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-15dpaa_eth: add support for DPAA EthernetMadalin Bucur6-0/+2850
This introduces the Freescale Data Path Acceleration Architecture (DPAA) Ethernet driver (dpaa_eth) that builds upon the DPAA QMan, BMan, PAMU and FMan drivers to deliver Ethernet connectivity on the Freescale DPAA QorIQ platforms. Signed-off-by: Madalin Bucur <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-15liquidio CN23XX: fix for new check patch errorsRaghu Vatsavayi15-180/+155
New checkpatch script shows some errors with pre-existing driver. This patch provides fix for those errors. Signed-off-by: Raghu Vatsavayi <[email protected]> Signed-off-by: Derek Chickles <[email protected]> Signed-off-by: Satanand Burla <[email protected]> Signed-off-by: Felix Manlunas <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-15liquidio CN23XX: copyrights changes and alignmentRaghu Vatsavayi30-480/+352
Updated copyrights comments and also changed some other comments alignments. Signed-off-by: Raghu Vatsavayi <[email protected]> Signed-off-by: Derek Chickles <[email protected]> Signed-off-by: Satanand Burla <[email protected]> Signed-off-by: Felix Manlunas <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-15liquidio CN23XX: code cleanupRaghu Vatsavayi13-70/+23
Cleaned up unnecessary comments and added some minor macros. Signed-off-by: Raghu Vatsavayi <[email protected]> Signed-off-by: Derek Chickles <[email protected]> Signed-off-by: Satanand Burla <[email protected]> Signed-off-by: Felix Manlunas <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-15liquidio CN23XX: device statesRaghu Vatsavayi6-31/+64
Cleaned up resource leaks during destroy resources by introducing more device states. Signed-off-by: Raghu Vatsavayi <[email protected]> Signed-off-by: Derek Chickles <[email protected]> Signed-off-by: Satanand Burla <[email protected]> Signed-off-by: Felix Manlunas <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-15liquidio CN23XX: VF related operationsRaghu Vatsavayi5-0/+251
Adds support for VF related operations like mac address vlan and link changes. Signed-off-by: Raghu Vatsavayi <[email protected]> Signed-off-by: Derek Chickles <[email protected]> Signed-off-by: Satanand Burla <[email protected]> Signed-off-by: Felix Manlunas <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-15liquidio CN23XX: mailbox interrupt processingRaghu Vatsavayi4-7/+184
Adds support for mailbox interrupt processing of various commands. Signed-off-by: Raghu Vatsavayi <[email protected]> Signed-off-by: Derek Chickles <[email protected]> Signed-off-by: Satanand Burla <[email protected]> Signed-off-by: Felix Manlunas <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-15liquidio CN23XX: Mailbox supportRaghu Vatsavayi7-3/+474
Adds support for mailbox communication between PF and VF. Signed-off-by: Raghu Vatsavayi <[email protected]> Signed-off-by: Derek Chickles <[email protected]> Signed-off-by: Satanand Burla <[email protected]> Signed-off-by: Felix Manlunas <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-15liquidio CN23XX: sysfs VF config supportRaghu Vatsavayi3-0/+117
Adds sysfs based support for enabling or disabling VFs. Signed-off-by: Raghu Vatsavayi <[email protected]> Signed-off-by: Derek Chickles <[email protected]> Signed-off-by: Satanand Burla <[email protected]> Signed-off-by: Felix Manlunas <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-15liquidio CN23XX: HW config for VF supportRaghu Vatsavayi3-34/+74
Adds support for configuring HW for creating VFs. Signed-off-by: Raghu Vatsavayi <[email protected]> Signed-off-by: Derek Chickles <[email protected]> Signed-off-by: Satanand Burla <[email protected]> Signed-off-by: Felix Manlunas <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-15amd-xgbe: Fix up some coccinelle identified warningsLendacky, Thomas1-3/+2
Fix up some warnings that were identified by coccinelle: Clean up an if/else block that can look confusing since the same statement is executed in an "else if" check and the final "else" statement. Change a variable from unsigned int to int since it is used in an if statement checking the value to be less than 0. Reported-by: Julia Lawall <[email protected]> Signed-off-by: Tom Lendacky <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-15amd-xgbe: Fix mask appliciation for Clause 37 registerLendacky, Thomas1-2/+2
The application of a mask to clear an area of a clause 37 register value was not properly applied. Update the code to do the proper application of the mask. Reported-by: Marion & Christophe JAILLET <[email protected]> Signed-off-by: Tom Lendacky <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-15net: ethernet: sun4i-emac: Read rxhdr in CPU byte-orderMichael Weiser1-2/+1
The EMAC EMAC_RX_IO_DATA_REG data register is dual-purpose: On one hand it is used to move actual packet data off the wire. This will be in wire-format and accepted as such by higher layers such as IP. Therefore it is correctly read as-is (i.e. raw) using readsl. On the other hand it provides metadata about incoming transfers to the driver such as length and checksum validation status. This data is little-endian, always and it is interpreted by the driver. Therefore it needs to be swapped to CPU endianness to make sense to the driver. This is already done for the "receive header" but not rxhdr. Read rxhdr using readl in order for sun4i-emac to work correctly when running a big-endian kernel. Signed-off-by: Michael Weiser <[email protected]> Cc: Maxime Ripard <[email protected]> Cc: [email protected] Signed-off-by: David S. Miller <[email protected]>
2016-11-15net: ethernet: sun4i-emac: Allow to enable netif messagesMichael Weiser1-0/+22
sun4i-emac has the ability to print a number of diagnostic messages using dev_dbg depending on message level settings implemented using netif_msg_* macros. But there's no way to actually enable them. Add the ability to switch diagnostic messages on using either a module parameter debug or ethtool -s <netif> msglvl <flags>. Signed-off-by: Michael Weiser <[email protected]> Cc: Maxime Ripard <[email protected]> Cc: [email protected] Signed-off-by: David S. Miller <[email protected]>
2016-11-15net: ethernet: stmmac: change dma descriptors to __le32Michael Weiser8-181/+195
The stmmac driver does not take into account the processor may be big endian when writing the DMA descriptors. This causes the ethernet interface not to be initialised correctly when running a big-endian kernel. Change the descriptors for DMA to use __le32 and ensure they are suitably swapped before writing. Tested successfully on the Cubieboard2. Signed-off-by: Michael Weiser <[email protected]> Cc: Giuseppe Cavallaro <[email protected]> Cc: Alexandre Torgue <[email protected]> Cc: [email protected] Signed-off-by: David S. Miller <[email protected]>
2016-11-15net: bcm63xx_enet: Fix build failure with phy_ethtool_nway_resetFlorian Fainelli1-1/+1
Introduced a typo making the driver no longer build, *sigh*. Fixes: 42469bf5d9bb ("net: bcm63xx_enet: Utilize phy_ethtool_nway_reset") Signed-off-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-15net: arc_emac: don't pass multicast packets to kernel in non-multicast modeAlexander Kochetkov1-1/+4
The patch disable capturing multicast packets when multicast mode disabled for ethernet ('ifconfig eth0 -multicast'). In that case no multicast packet will be passed to kernel. Signed-off-by: Alexander Kochetkov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-15net: arc_emac: annonce IFF_MULTICAST supportAlexander Kochetkov1-2/+0
Multicast support was implemented by commit 775dd682e2b0ec7 ('arc_emac: implement promiscuous mode and multicast filtering'). It can be enabled explicity using 'ifconfig eth0 multicast'. The patch is needed in order to remove explicit configuration as most devices has multicast mode enabled by default. Signed-off-by: Alexander Kochetkov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-15stmmac: fix PTP type ethtool statsGiuseppe CAVALLARO5-44/+69
This patch fixes the ethtool stats for PTP frames; previous version does not take care about some message types: i.e. announce, management and signaling. It also provided a broken statistic in case of "No PTP message received". Signed-off-by: Giuseppe Cavallaro <[email protected]> Acked-by: Rayagond Kokatanur <[email protected]> Acked-by: Alexandre TORGUE <[email protected]> Acked-by: Richard Cochran <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-15stmmac: fix PTP support for GMAC4Giuseppe CAVALLARO7-73/+154
Due to bad management of the descriptors, when use ptp4l, kernel panics as shown below: ----------------------------------------------------------- Unable to handle kernel NULL pointer dereference at virtual address 000001ac ... Internal error: Oops: 17 [#1] SMP ARM ... Hardware name: STi SoC with Flattened Device Tree task: c0c05e80 task.stack: c0c00000 PC is at dwmac4_wrback_get_tx_timestamp_status+0x0/0xc LR is at stmmac_tx_clean+0x2f8/0x4d4 ----------------------------------------------------------- In case of GMAC4 the extended descriptor pointers were used for getting the timestamp. These are NULL for this HW, and the normal ones must be used. The PTP also had problems on this chip due to the bad register management and issues on the algo adopted to setup the PTP and getting the timestamp values from the descriptors. Signed-off-by: Giuseppe Cavallaro <[email protected]> Acked-by: Rayagond Kokatanur <[email protected]> Acked-by: Alexandre TORGUE <[email protected]> Acked-by: Richard Cochran <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-15stmmac: update the PTP header fileGiuseppe CAVALLARO1-35/+37
This patch is to update this file by using BIT macros, removing not used defines and fixes some typos. Signed-off-by: Giuseppe Cavallaro <[email protected]> Acked-by: Rayagond Kokatanur <[email protected]> Acked-by: Alexandre TORGUE <[email protected]> Acked-by: Richard Cochran <[email protected]> Signed-off-by: David S. Miller <[email protected]>