aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet (follow)
AgeCommit message (Collapse)AuthorFilesLines
2016-08-15net: mediatek: remove unnecessary platform_set_drvdata()Wei Yongjun1-1/+0
The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-15net: thunderx: Remove unnecessary pci_set_drvdata()Wei Yongjun1-2/+0
The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-15net: ena: Fix error return code in ena_device_init()Wei Yongjun1-0/+1
Fix to return a negative error code from the invalid dma width error handling case instead of 0. Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-15net: ena: Remove unnecessary pci_set_drvdata()Wei Yongjun1-3/+0
The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-15net: hns: mdio->irq is an array, so no need to check if it is nullColin Ian King1-2/+1
The null check on mdio->irq is redundant since mdio->irq is an array of PHY_MAX_ADDR ints and hence can never be null. Remove the redundant check. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-15qed*: Add and modify some printsYuval Mintz6-24/+53
This patch touches various prints in the driver - it reduces the verbosity of some prints [which were previously logged by default] while adding several new debug prints and modifying others. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-15qed*: Trivial modificationsYuval Mintz6-46/+28
Change qed* code in trivial manner; This isn't necessarily semantic-only, but the end result is the same, i.e., no change should occur from user perspective. Changes include: - Using temporary variables to better fit 80-character restrictions. - Removal of unused variables & code with no effect. [plus some additional minor modifications]. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-15qed*: Semantic changesYuval Mintz13-640/+404
Make semantic-only adjustments to qed* drivers, such as: - Changes in code indentation. - Usage of BIT() macro. - re-naming of variables. - Re-ordering of variable declerations. - Removal of (== 0) and (!= 0) in conditions. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-14net: macb: add missing free_netdev() on error in macb_probe()Wei Yongjun1-1/+1
Add the missing free_netdev() before return from function macb_probe() in the platform_get_irq() error handling case. Fixes: c69618b3e4f2 ("net/macb: fix probe sequence to setup clocks earlier") Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-14qed: Fix possible memory leak in qed_dcbnl_get_ieee_pfc()Wei Yongjun1-0/+1
'dcbx_info is malloced in qed_dcbnl_get_ieee_pfc() and should be freed before leaving from the error handling cases, otherwise it will cause memory leak. Fixes: a1d8d8a51e83 ("qed: Add dcbnl support.") Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-14cxgb4/cxgb4vf: Add set VF mac address supportHariprasad Shenai6-7/+151
Add ndo_set_vf_mac support which allows to set the MAC address for cxgb4vf interfaces from the host Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-14cxgb4: Add control net_device for configuring PCIe VFHariprasad Shenai1-18/+103
Issue: For instance, the current APIs assume a 1-to-1 mapping of Network Ports, Physical Functions and the SR-IOV Virtual Functions of those Physical Functions. This is not the case with our cards where any Virtual Function can be hooked up to any Port -- or any number of Ports the current Linux APIs also assume only 1 Network Interface/Port can be accessed per Virtual Function. Another issue is that these APIs assume that the Administrative Driver is attached to the Physical Function Associated with a Virtual Function. This is not the case with our card where all administration is performed by a Driver which is not attached to any of the Physical Functions which have SR-IOV PCI Capabilities. Another consequence of these assumptions is the inability to utilize all of the cards SR-IOV resources. For instance, our cards have SR-IOV Capabilities on Physical Functions 0..3 and the administrative Driver attaches to Physical Function 4. Each of the Physical Functions 0..3 can support up to 16 Virtual Functions. With the current Linux APIs, a 2-Port card would only be able to use the Virtual Functions on Physical Function 0..1 and not allow the Virtual Functions on Physical Functions 2..3 to be used since there are no Ports 2..3 on a 2-Port card. Fix: Since the control node is always the netdevice for all VF ACL commands. Created a dummy netdevice for each Physical Function from 0 to 3 through which one could control their VFs. The device won't be associated with any port, since it doesn't need to transmit/receive. Its purely used for VF management purpose only. The device will be registered only when VF for a particular PF is configured using PCI sysfs interface and unregistered while pci_disable_sriov() for the PF is called. Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-13net: bfin_mac: Fix a few spelling fixesLABBE Corentin1-4/+4
This patch respell some word badly spelled. - Invidate instead of Invalidate - proble instead of probe Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-13net: fix up a few missing hashtable.h conflict resolutionsJiri Kosina3-7/+7
There are a couple of leftover symbol conflicts caused by hashtable.h being included by netdevice.h; those were not caught as build failure (they're "only" a warning, but in fact real bugs). Fix those up. Fixes: e87a8f24c ("net: resolve symbol conflicts with generic hashtable.h") Reported-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-13net: thunderx: Don't set RX_PACKET_DIS while initializingSunil Goutham1-11/+7
Setting BGXX_SPUX_MISC_CONTROL::RX_PACKET_DIS is not needed as packet reception is anyway disabled by BGXX_CMRX_CONFIG::DATA_PKT_RX_EN. Also setting RX_PACKET_DIS causes a bogus remote fault condition which delays link detection. Signed-off-by: Sunil Goutham <sgoutham@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-13net: thunderx: Use netdev_rss_key_fill() helperSunil Goutham1-7/+1
Use standard API to generate a random RSS hash key on every boot. Signed-off-by: Sunil Goutham <sgoutham@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-13net: thunderx: Configure tunnelling protocol parsingZyta Szpak2-0/+34
This patch enables parsing of inner layers for tunnelled packets. Signed-off-by: Zyta Szpak <zr@semihalf.com> Signed-off-by: Sunil Goutham <sgoutham@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-13net: thunderx: Use napi_consume_skb for bulk freeSunil Goutham1-3/+5
This patch enables bulk freeing on the Tx side. Signed-off-by: Sunil Goutham <sgoutham@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-13net: thunderx: Don't set mac address for secondary Qset VFsSunil Goutham1-1/+1
Set MAC addresses only for primary VF's and don't for secondary VFs. Signed-off-by: Sunil Goutham <sgoutham@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-13net: thunderx: Reset RXQ HW stats when interface is brought downJerin Jacob3-0/+87
When SQ/TXQ is reclaimed i.e reset it's stats also automatically reset by HW. This is not the case with RQ. Also VF doesn't have write access to statistics counter registers. Hence a new Mbox msg is introduced which supports resetting RQ, SQ and full Qset stats. Currently only RQ stats are being reset using this mbox message. Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com> Signed-off-by: Sunil Goutham <sgoutham@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-13net: thunderx: Improvement for MBX interface debug messagesRadoslaw Biernacki2-8/+16
Adding debug messages in case of NACK for a mailbox message, also did small cleanups. Signed-off-by: Radoslaw Biernacki <rad@semihalf.com> Signed-off-by: Sunil Goutham <sgoutham@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-13net: thunderx: Use skb_add_rx_frag() for split buffer Rx pktsSunil Goutham1-18/+6
Instead of a round about way of converting buffers to SKBs and combining them into a frag list, use standard skb_add_rx_frag() API to merge page fragments. This code is useful when incoming packets are of size more than RCV_FRAG_LEN which is currently set to 2048bytes. Signed-off-by: Sunil Goutham <sgoutham@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-13net: thunderx: Use netdev's name for naming VF's interruptsSunil Goutham1-8/+12
This patch changes the way VF's irqs are visible in /proc/interrupts. Instead of VF id, logical interface's netdev name is used for IRQ naming and also all secondary VF's interrupts in multiqset config use primary VF's netdev name. Signed-off-by: Sunil Goutham <sgoutham@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-13net: thunderx: Support for 83xx mixed QLM/DLM configSunil Goutham2-21/+26
83xx has 4 BGX blocks and are enabled mixed QLM/DLM configs. BGX0/BGX1 are from QLM2/QLM3, BGX3 is DLM4 and BGX2 is split across DLM5 & DLM6. This patch adds support for BGX2's split config and also enables all 4 BGXs to be used. Signed-off-by: Sunil Goutham <sgoutham@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-13net: thunderx: Add support for 16 LMACs of 83xxSunil Goutham2-17/+60
83xx will have 4 BGX blocks i.e 16 LMACs, to avoid changing the same with every platform, nicpf struct elements which track LMAC related info are now allocated runtime based on platform's max possible BGX count. Also fixed configuring min packet size for all LMAC's supported on a platform. Signed-off-by: Sunil Goutham <sgoutham@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-13net: thunderx: Add RGMII interface type supportSunil Goutham6-33/+332
This patch adds RGX/RGMII interface type support to BGX driver. This type of interface is supported by 81xx SOC. CN81XX VNIC has 8 VFs and max possible LMAC interfaces are 9, hence RGMII interface will not work if all DLMs are in BGX mode and all 8 LMACs are enabled Signed-off-by: Sunil Goutham <sgoutham@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-13net: thunderx: Add QSGMII interface type supportSunil Goutham2-12/+54
This patch adds support for QSGMII interface type to the BGX driver. This type of interface is supported by 81xx SOC. Signed-off-by: Sunil Goutham <sgoutham@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-13net: thunderx: Add 81xx support to BGX driverSunil Goutham2-10/+113
This patch adds support for BGX module on 81xx where a BGX can be split and have different LMACs configured in different modes. Signed-off-by: Sunil Goutham <sgoutham@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-13net: thunderx: Support for different LMAC types within BGXSunil Goutham2-136/+98
On 88xx all LMACs in a BGX will be in same mode but on 81xx BGX can be split as two and there can be LMACs configured in different modes. These changes move lmac_type, lane2serdes fields into per lmac struct from BGX struct. Got rid of qlm_mode field which has become redundant with these changes. And now no of valid LMACs is read from CSRs configured by low level firmware and figuring out the same based on QLM mode is discarded Signed-off-by: Sunil Goutham <sgoutham@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-13net: thunderx: Enable mailbox interrupts on 81xx/83xxSunil Goutham1-38/+50
88xx has 128 VFs, 81xx has 8 VFs and 83xx will have 32VFs. Made changes to PF driver such that mailbox interrupt enable registers are configuired based on number of VFs HW supports. Also cleanedup mailbox irq handler registration code. Signed-off-by: Sunil Goutham <sgoutham@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-13net: thunderx: Enable CQE_RX desc's extension fieldsSunil Goutham4-2/+27
Unlike 88xx, CQE_RX descriptor's tunnelling extension i.e CQE_RX2_S is always enabled on 81xx/83xx and HW does insert these fields into CQE_RX. As a result receive buffer addresses will now be present at 7th word of CQE_RX instead of 6th. Enable CQE_RX2_S on 88xx pass 2.x as well. Signed-off-by: Sunil Goutham <sgoutham@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-13net: thunderx: Set queue count based on number of CPUsSunil Goutham4-12/+14
81xx has only 4 CPUs, so it doesn't make sense to initialize entire Qset i.e 8 queues by default. Made changes to queue initialization to init queues equal to number of CPUs or 8 queues whichever is lesser. Also this will be applicable to VMs with VNIC VF attached and having less VCPUs Signed-off-by: Sunil Goutham <sgoutham@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-13net: thunderx: Add support for 81xx and 83xx chipsSunil Goutham3-17/+73
This patch adds info on HW maximums of 81xx/83xx and also configures receive and transmit datapaths accordingly. Signed-off-by: Sunil Goutham <sgoutham@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-13net: thunderx: Add VNIC's PCI devid on future chipsSunil Goutham2-3/+21
This patch adds PCI device IDs of VNIC on newer chips and also registers VF driver with them. Device id remains same for all versions of chips but subsystem device id changes. Signed-off-by: Sunil Goutham <sgoutham@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-13net: thunderx: Moved HW capability info from macros to structureSunil Goutham2-52/+85
Current driver has most of the HW maximums info like no of channels, traffic limiters, RSS indices e.t.c in the form of macros. These have been moved into a 'hw_info' structure so that support for VNIC on newer chips with different set of HW maximums can be added. Signed-off-by: Sunil Goutham <sgoutham@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-13drivers: net: xgene: Fix backward compatibilityIyappan Subramanian1-9/+9
This patch fixes the backward compatibility on handling phy_connect(), by iterating over the phy-handle, when new DT is used with older kernel. Signed-off-by: Iyappan Subramanian <isubramanian@apm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-13drivers: net: xgene: Poll link status via GPIOIyappan Subramanian4-0/+23
When 10GbE SFP+ module is not plugged in or cable is not connected, the link status register does not report the proper state due to floating signal. This patch checks the module present status via an GPIO to determine whether to ignore the link status register and report link down. Signed-off-by: Quan Nguyen <qnguyen@apm.com> Signed-off-by: Iyappan Subramanian <isubramanian@apm.com> Tested-by: Fushen Chen <fchen@apm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-13drivers: net: xgene: XFI PCS reset when link is downIyappan Subramanian5-0/+54
This patch fixes the link recovery issue, by doing PCS reset when the link is down. Signed-off-by: Fushen Chen <fchen@apm.com> Signed-off-by: Iyappan Subramanian <isubramanian@apm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-13drivers: net: xgene: Change port init sequenceIyappan Subramanian1-3/+2
This patch rearranges the port initialization sequence as recommended by hardware specification. This patch also removes, mac_init() call from xgene_enet_link_state(), as it was not required. Signed-off-by: Iyappan Subramanian <isubramanian@apm.com> Tested-by: Fushen Chen <fchen@apm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-13drivers: net: xgene: Fix RSS indirection table fieldsIyappan Subramanian2-8/+19
This patch fixes FPSel and NxtFPSel fields length to 5-bit value. Signed-off-by: Quan Nguyen <qnguyen@apm.com> Signed-off-by: Iyappan Subramanian <isubramanian@apm.com> Tested-by: Fushen Chen <fchen@apm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-13drivers: net: xgene: Fix error deconstruction pathIyappan Subramanian1-8/+19
Since register_netdev() call in xgene_enet_probe() was moved down to the end, it doesn't properly handle errors that may occur, by deconstructing everything that was setup before the error occurred. Signed-off-by: Iyappan Subramanian <isubramanian@apm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-13drivers: net: xgene: fix: Delete descriptor rings and buffer poolsIyappan Subramanian1-5/+7
xgene_enet_init_hw() should delete any descriptor rings and buffer pools setup should le_ops->cle_init() return an error. Signed-off-by: Iyappan Subramanian <isubramanian@apm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-13drivers: net: xgene: fix: Add dma_unmap_singleIyappan Subramanian1-2/+12
In addition to xgene_enet_delete_bufpool() freeing skbs, their associated dma memory should also be unmapped. Signed-off-by: Iyappan Subramanian <isubramanian@apm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-13drivers: net: xgene: Fix compiler warningsIyappan Subramanian1-4/+0
Fixed compiler warnings reported with -Wmaybe-uninitialized W=1, /drivers/net/ethernet/apm/xgene/xgene_enet_main.c: In function ‘xgene_enet_rx_frame’: ../drivers/net/ethernet/apm/xgene/xgene_enet_main.c:455:27: warning: variable ‘pdata’ set but not used [-Wunused-but-set-variable] struct xgene_enet_pdata *pdata; ^ ../drivers/net/ethernet/apm/xgene/xgene_enet_main.c: In function ‘xgene_enet_remove’: ../drivers/net/ethernet/apm/xgene/xgene_enet_main.c:1691:30: warning: variable ‘mac_ops’ set but not used [-Wunused-but-set-variable] const struct xgene_mac_ops *mac_ops; ^ Signed-off-by: Iyappan Subramanian <isubramanian@apm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-12sfc: get timer configuration from adapterBert Kenward5-33/+125
On SFN8000 series adapters the MC provides a method to get the timer quantum and the maximum timer setting. We revert to the old values if the new call is unavailable. Signed-off-by: Bert Kenward <bkenward@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-12sfc: set interrupt moderation via MCDIBert Kenward9-62/+103
SFN8000-series NICs require a new method of setting interrupt moderation, via MCDI. This is indicated by a workaround flag. This new MCDI command takes an explicit time value rather than a number of ticks. It therefore makes sense to also store the moderation values in terms of time, since that is what the ethtool interface is interested in. Signed-off-by: Bert Kenward <bkenward@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-12sfc: use new performance based event queue initBert Kenward1-12/+31
Rather than explicitly specifying flags we can now specify a desired performance target to the firmware, ie higher throughput or lower latency. For now we use the default "auto" configuration. Signed-off-by: Bert Kenward <bkenward@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-12sfc: retrieve second word of datapath capabilitiesBert Kenward2-2/+11
Signed-off-by: Bert Kenward <bkenward@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-12sfc: allow asynchronous MCDI without completion functionBert Kenward1-1/+4
Signed-off-by: Bert Kenward <bkenward@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-12sfc: update MCDI protocol headersBert Kenward1-15/+515
Signed-off-by: Bert Kenward <bkenward@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>