aboutsummaryrefslogtreecommitdiff
path: root/drivers/net
AgeCommit message (Collapse)AuthorFilesLines
2016-11-07net: ethernet: ti: cpsw: fix device and of_node leaksJohan Hovold1-0/+3
Make sure to drop the references taken by of_get_child_by_name() and bus_find_device() before returning from cpsw_phy_sel(). Note that holding a reference to the cpsw-phy-sel device does not prevent the devres-managed private data from going away. Fixes: 5892cd135e16 ("drivers: net: cpsw-phy-sel: Add new driver...") Cc: Mugunthan V N <[email protected]> Cc: Grygorii Strashko <[email protected]> Cc: [email protected] Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-07phy: fix device reference leaksJohan Hovold1-0/+2
Make sure to drop the reference taken by bus_find_device_by_name() before returning from phy_connect() and phy_attach(). Note that both function still take a reference to the phy device through phy_attach_direct(). Fixes: e13934563db0 ("[PATCH] PHY Layer fixup") Cc: Florian Fainelli <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-07net: ethernet: bgmac: add NS2 supportJon Mason3-2/+58
Add support for the variant of amac hardware present in the Broadcom Northstar2 based SoCs. Northstar2 requires an additional register to be configured with the port speed/duplexity (NICPM). This can be added to the link callback to hide it from the instances that do not use this. Also, clearing of the pending interrupts on init is required due to observed issues on some platforms. Signed-off-by: Jon Mason <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Acked-by: Rafał Miłecki <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-07net: ethernet: bgmac: device tree phy enablementJon Mason4-25/+56
Change the bgmac driver to allow for phy's defined by the device tree Signed-off-by: Jon Mason <[email protected]> Acked-by: Rafał Miłecki <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-07net: phy: broadcom: Add BCM54810 PHY entryJon Mason2-2/+58
The BCM54810 PHY requires some semi-unique configuration, which results in some additional configuration in addition to the standard config. Also, some users of the BCM54810 require the PHY lanes to be swapped. Since there is no way to detect this, add a device tree query to see if it is applicable. Inspired-by: Vikas Soni <[email protected]> Signed-off-by: Jon Mason <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-07net: phy: broadcom: add bcm54xx_auxctl_readJon Mason1-0/+10
Add a helper function to read the AUXCTL register for the BCM54xx. This mirrors the bcm54xx_auxctl_write function already present in the code. Signed-off-by: Jon Mason <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-07xen: make use of xenbus_read_unsigned() in xen-netfrontJuergen Gross1-49/+18
Use xenbus_read_unsigned() instead of xenbus_scanf() when possible. This requires to change the type of some reads from int to unsigned, but these cases have been wrong before: negative values are not allowed for the modified cases. Cc: [email protected] Signed-off-by: Juergen Gross <[email protected]> Acked-by: David Vrabel <[email protected]>
2016-11-07xen: make use of xenbus_read_unsigned() in xen-netbackJuergen Gross1-36/+14
Use xenbus_read_unsigned() instead of xenbus_scanf() when possible. This requires to change the type of some reads from int to unsigned, but these cases have been wrong before: negative values are not allowed for the modified cases. Cc: [email protected] Cc: [email protected] Cc: [email protected] Signed-off-by: Juergen Gross <[email protected]> Reviewed-by: Paul Durrant <[email protected]> Acked-by: David Vrabel <[email protected]>
2016-11-06stmmac: dwmac-sti: remove unused priv dev memberJoachim Eastwood1-2/+0
The dev member of struct sti_dwmac is not used anywhere in the driver so lets just remove it. Signed-off-by: Joachim Eastwood <[email protected]> Acked-by: Giuseppe Cavallaro <[email protected]> Tested-by: Giuseppe Cavallaro <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-06stmmac: dwmac-sti: clean up and rename sti_dwmac_initJoachim Eastwood1-6/+4
Rename sti_dwmac_init to sti_dwmac_set_mode which is a better description for what it really does. Signed-off-by: Joachim Eastwood <[email protected]> Acked-by: Giuseppe Cavallaro <[email protected]> Tested-by: Giuseppe Cavallaro <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-06stmmac: dwmac-sti: move clk_prepare_enable out of init and add error handlingJoachim Eastwood1-4/+15
Add clock error handling to probe and in the process move clock enabling out of sti_dwmac_init() to make this easier. Signed-off-by: Joachim Eastwood <[email protected]> Acked-by: Giuseppe Cavallaro <[email protected]> Tested-by: Giuseppe Cavallaro <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-06stmmac: dwmac-sti: move st, gmac_en parsing to sti_dwmac_parse_dataJoachim Eastwood1-3/+3
The sti_dwmac_init() function is called both from probe and resume. Since DT properties doesn't change between suspend/resume cycles move parsing of this parameter into sti_dwmac_parse_data() where it belongs. Signed-off-by: Joachim Eastwood <[email protected]> Acked-by: Giuseppe Cavallaro <[email protected]> Tested-by: Giuseppe Cavallaro <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-06stmmac: dwmac-sti: add PM ops and resume functionJoachim Eastwood1-10/+37
Implement PM callbacks and driver remove in the driver instead of relying on the init/exit hooks in stmmac_platform. This gives the driver more flexibility in how the code is organized. Eventually the init/exit callbacks will be deprecated in favor of the standard PM callbacks and driver remove function. Signed-off-by: Joachim Eastwood <[email protected]> Acked-by: Giuseppe Cavallaro <[email protected]> Tested-by: Giuseppe Cavallaro <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-06stmmac: dwmac-sti: remove clk NULL checksJoachim Eastwood1-6/+4
Since sti_dwmac_parse_data() sets dwmac->clk to NULL if not clock was provided in DT and NULL is a valid clock there is no need to check for NULL before using this clock. Signed-off-by: Joachim Eastwood <[email protected]> Acked-by: Giuseppe Cavallaro <[email protected]> Tested-by: Giuseppe Cavallaro <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-06stmmac: dwmac-sti: remove useless of_node checkJoachim Eastwood1-3/+0
Since dwmac-sti is a DT only driver checking for OF node is not necessary. Signed-off-by: Joachim Eastwood <[email protected]> Acked-by: Giuseppe Cavallaro <[email protected]> Tested-by: Giuseppe Cavallaro <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-06Merge branch '10GbE' of ↵David S. Miller13-374/+819
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 10GbE Intel Wired LAN Driver Updates 2016-11-04 This series contains updates to ixgbe and ixgbevf only. Don does cleanup and configuration for our X553 devices, related to LED, auto-negotiation, flow control and SFP+ setup and config. Adds the (not secret) sauce for B0 hardware for X553 hardware. Emil provides several fixes, first replaces the driver specific MDIO defines for the more preferred equivalent kernel ones. Provides a fix for auto-negotiaion status, by reading a PHY register twice. Introduces ixgbe_link_operations structure to allow X550EM_a to override the methods for MDIO access while X550EM_x provides methods to use I2C combined access. Mark fixes an issue where the driver was crashing when msix_entires were not there because they were freed by a previous suspend or remove. Sowmini Varadhan fixes an issue where an incorrect check for IPPROTO_UDP in ixgbe_atr(). Then makes sure that the network and transport headers in the paged data are available in the headlen bytes to calculate the l4_proto. ==================== Signed-off-by: David S. Miller <[email protected]>
2016-11-05mlxsw: Remove unused including <generated/utsrelease.h>Wei Yongjun3-3/+0
Remove including <generated/utsrelease.h> that don't need it. Signed-off-by: Wei Yongjun <[email protected]> Acked-by: Jiri Pirko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-04ixgbevf: Handle previously-freed msix_entriesMark Rustad1-2/+7
The msix_entries memory can be freed by a previous suspend or remove, so don't crash on close when it isn't there. Also only clear the interrupts when the interface is up, because there aren't any when it is not up. Signed-off-by: Mark Rustad <[email protected]> Tested-by: Krishneil Singh <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2016-11-04ixgbe: ixgbe_atr() compute l4_proto only if non-paged data has ↵Sowmini Varadhan1-0/+17
network/transport headers For some Tx paths (e.g., tpacket_snd()), ixgbe_atr may be passed down an sk_buff that has the network and transport header in the paged data, so it needs to make sure these headers are available in the headlen bytes to calculate the l4_proto. This patch expect that network and transport headers are already available in the non-paged header dat. The assumption is that the caller has set this up if l4_proto based Tx steering is desired. Signed-off-by: Sowmini Varadhan <[email protected]> Reviewed-by: Alexander Duyck <[email protected]> Tested-by: Krishneil Singh <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2016-11-04ixgbe: ixgbe_atr() should access udp_hdr(skb) only for UDP packetsSowmini Varadhan1-1/+1
Commit 9f12df906cd8 ("ixgbe: Store VXLAN port number in network order") incorrectly checks for hdr.ipv4->protocol != IPPROTO_UDP in ixgbe_atr(). This check should be for "==" instead. Signed-off-by: Sowmini Varadhan <[email protected]> Reviewed-by: Alexander Duyck <[email protected]> Tested-by: Krishneil Singh <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2016-11-04ixgbe: Correct X550 phy IDDon Skidmore2-2/+4
We were using an old Alpha version of the X550 phy ID. This was leading to unnecessary queries of the PHY. I removed the old ID (which shouldn't be on any HW) and add the two that are. Signed-off-by: Don Skidmore <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2016-11-04ixgbe: Add X553 FW ALEF supportDon Skidmore3-97/+255
This patch add X553 FW ALEF support for B0. ALEF is the new unified FW. This contains updated register defines for ALEF speed configuration. Likewise it also removes the AN_CNTL_8 usage from the native SFI flow as it is no longer supported by FW. Signed-off-by: Don Skidmore <[email protected]> Tested-by: Krishneil Singh <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2016-11-04ixgbe: set device if before calling get_invariantsEmil Tantilov1-4/+6
Fix an issue where set_phy_power was NULL for X550 copper devices because get_invariants was called before hw->device_id was set. Signed-off-by: Emil Tantilov <[email protected]> Tested-by: Krishneil Singh <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2016-11-04ixgbe: use link instead of I2C combined abstractionEmil Tantilov5-90/+124
Introduce ixgbe_link_operations struct with the following changes: read_i2c_combined => read_link read_i2c_combined_unlocked => read_link_unlocked write_i2c_combined => write_link write_i2c_combined_unlocked => write_link_unlocked This will allow X550EM_a to override these methods for MDIO access while X550EM_x provides methods to use I2C combined access. This also adds a new structure, ixgbe_link_info, to hold information about the link. Initially this is just method pointers and a bus address. The functions involved in combined I2C accesses were moved from ixgbe_phy.c to ixgbe_x550.c. The underlying functions that carry out the combined I2C accesses were left in ixgbe_phy.c because they share some functions with other I2C methods. v2 - set hw->link.ops in probe. v3 - check ii->link_ops before setting it since we don't have it for all devices. Signed-off-by: Emil Tantilov <[email protected]> Tested-by: Krishneil Singh <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2016-11-04ixgbe: remove SFP ixfi supportEmil Tantilov1-65/+11
Remove SFP ixfi code since there is no HW that currently supports it. Signed-off-by: Emil Tantilov <[email protected]> Tested-by: Krishneil Singh <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2016-11-04ixgbe: Handle previously-freed msix_entriesMark Rustad1-0/+3
The msix_entries memory can be freed by a previous suspend or remove, so don't crash on close when it isn't there. Signed-off-by: Mark Rustad <[email protected]> Tested-by: Krishneil Singh <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2016-11-04ixgbe: Add X553 PHY FC autoneg supportDon Skidmore7-8/+232
This patch adds X553 flow control auto negotiation for fiber and backplain. To enable this new function pointers were added as well as creating a function to dynamically set function pointer we can't define only on MAC type. Signed-off-by: Don Skidmore <[email protected]> Tested-by: Krishneil Singh <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2016-11-04ixgbe: fix link status check for copper X550emEmil Tantilov1-8/+13
Read the PHY register twice in order to get the correct value for autoneg_status. Signed-off-by: Emil Tantilov <[email protected]> Tested-by: Krishneil Singh <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2016-11-04ixgbe: do not use ixgbe specific mdio definesEmil Tantilov3-56/+33
Replace some ixgbe specific MDIO defines with their equivalent from the kernel. Signed-off-by: Emil Tantilov <[email protected]> Tested-by: Krishneil Singh <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2016-11-04ixgbe: Update setup PHY link to unset all speedsDon Skidmore1-39/+38
This patch updates ixgbe_setup_phy_link_generic to set/unset auto-negotiation for all speeds. This ensures that unsupported speeds are unset. This is necessary since the PHY NVM may advertise unsupported speeds. Signed-off-by: Don Skidmore <[email protected]> Tested-by: Krishneil Singh <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2016-11-04ixgbe: Add support to retrieve and store LED link activeDon Skidmore8-2/+57
This patch adds support to get the LED link active via the LEDCTL register. If the LEDCTL register does not have LED link active (LED mode field = 0x0100) set then default LED link active returned. Signed-off-by: Don Skidmore <[email protected]> Tested-by: Krishneil Singh <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2016-11-04ixgbe: Add X552 iXFI configuration helper functionDon Skidmore1-34/+52
X553 doesn't need all the initialization that X552 did for iXFI. This patch will allow native SPI SFP+ to work with X553 devices. Future patches will add additional configuration as needed. Signed-off-by: Don Skidmore <[email protected]> Tested-by: Andrew Bowers <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2016-11-04net/mlx5: Fix invalid pointer reference when prof_sel parameter is invalidHuy Nguyen1-2/+3
When prof_sel is invalid, mlx5_core_warn is called but the mlx5_core_dev is not initialized yet. Solution is moving the prof_sel code after dev->pdev assignment Fixes: 2974ab6e8bd8 ('net/mlx5: Improve driver log messages') Signed-off-by: Huy Nguyen <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-04net/mlx5: E-Switch, Set the actions for offloaded rules properlyOr Gerlitz1-1/+2
As for the current generation of the mlx5 HW (CX4/CX4-Lx) per flow vlan push/pop actions are emulated, we must not program them to the firmware. Fixes: f5f82476090f ('net/mlx5: E-Switch, Support VLAN actions in the offloads mode') Signed-off-by: Or Gerlitz <[email protected]> Reported-by: Paul Blakey <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-04net/mlx5e: Handle matching on vlan priority for offloaded TC rulesOr Gerlitz1-1/+4
We ignored the vlan priority in offloaded TC rules matching part, fix that. Fixes: 095b6cfd69ce ('net/mlx5e: Add TC vlan match parsing') Signed-off-by: Or Gerlitz <[email protected]> Reported-by: Paul Blakey <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-04net/mlx5e: Disallow changing name-space for VF representorsOr Gerlitz1-1/+1
VF reps should be altogether on the same NS as they were created. Signed-off-by: Or Gerlitz <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-04net/mlx5e: Re-arrange XDP SQ/CQ creationSaeed Mahameed1-17/+15
In mlx5e_open_channel CQs must be created before napi is enabled. Here we move the XDP CQ creation to satisfy that fact. mlx5e_close_channel is already working according to the right order. Fixes: b5503b994ed5 ("net/mlx5e: XDP TX forwarding support") Signed-off-by: Saeed Mahameed <[email protected]> Reported-by: Jesper Dangaard Brouer <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-04net/mlx5e: Fix XDP error path of mlx5e_open_channel()Saeed Mahameed1-1/+4
In case of mlx5e_open_rq fails the error handling will jump to label err_close_xdp_sq and will try to close the xdp_sq unconditionally. xdp_sq is valid only in case of XDP use cases, i.e priv->xdp_prog is not null. To fix this in this patch we test xdp_sq validity prior to closing it. In addition we now close the xdp_sq.cq as well. Fixes: b5503b994ed5 ("net/mlx5e: XDP TX forwarding support") Signed-off-by: Saeed Mahameed <[email protected]> Reported-by: Jesper Dangaard Brouer <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-04nfp: add support for offload of XDP programsJakub Kicinski6-6/+139
Most infrastructure can be reused, provide separate handling of context offsets and exit codes. Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-04nfp: remove unnecessary parameters from nfp_net_bpf_offload()Jakub Kicinski3-7/+3
nfp_net_bpf_offload() takes all .setup_tc() parameters but it doesn't use them at the moment. Remove unnecessary ones to make it possible for XDP to reuse this function. Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-04nfp: add XDP support in the driverJakub Kicinski4-101/+449
Add XDP support. Separate stack's and XDP's TX rings logically. Add functions for handling XDP_TX and cleanup of XDP's TX rings. For XDP allocate all RX buffers as separate pages and map them with DMA_BIDIRECTIONAL. Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-04nfp: reorganize nfp_net_rx() to get packet offsets earlyJakub Kicinski1-26/+30
Calculate packet offsets early in nfp_net_rx() so that we will be able to use them in upcoming XDP handler. While at it move relevant variables into the loop scope. Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-04nfp: add support for ethtool .set_channelsJakub Kicinski4-22/+123
Allow changing the number of rings via ethtool .set_channels API. Runtime reconfig needs to be extended to handle number of rings. We need to be able to activate interrupt vectors before rings are assigned to them. Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-04nfp: move RSS indirection table init into a separate functionJakub Kicinski1-5/+10
We will need to rerun the initialization of the RSS indirection table after the number of rings is changed. Move the code to a separate function. Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-04nfp: add helper to reassign rings to IRQ vectorsJakub Kicinski1-24/+16
Instead of fixing ring -> vector relations up in ring swap functions put the reassignment into a helper function which will reinit all links. Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-04nfp: loosen relation between rings and IRQs vectorsJakub Kicinski1-6/+6
Upcoming XDP support will break the assumption that one can iterate over IRQ vectors to get to all the rings easily. Use nn->.x_ring arrays directly. Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-04nfp: reuse ring helpers on .ndo_open() pathJakub Kicinski1-40/+20
Ring allocation helpers encapsulate all ring allocation and initialization steps nicely. Reuse them on .ndo_open() path. Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-04nfp: rename ring allocation helpersJakub Kicinski1-13/+13
"Shadow" in ring helpers used to mean that the helper will allocate rings without touching existing configuration, this was used for reconfiguration while the device was running. We will soon use the same helpers for .ndo_open() path, so replace "shadow" with "ring_set". No functional changes. Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-04nfp: centralize runtime reconfiguration logicJakub Kicinski3-119/+118
All functions which need to reallocate ring resources at runtime look very similar. Centralize that logic into a separate function. Encapsulate configuration parameters in a structure. Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-11-04nfp: add support for ethtool .get_channelsJakub Kicinski1-0/+16
Report number of rings via ethtool .get_channels API. Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>