summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* net: xgbe: use new api ethtool_{get|set}_link_ksettingsPhilippe Reynes2016-11-091-31/+37
| | | | | | | | | The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Acked-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: amd: pcnet32: use new api ethtool_{get|set}_link_ksettingsPhilippe Reynes2016-11-091-6/+8
| | | | | | | | The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: amd8111e: use new api ethtool_{get|set}_link_ksettingsPhilippe Reynes2016-11-091-6/+8
| | | | | | | | The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: alteon: acenic: use new api ethtool_{get|set}_link_ksettingsPhilippe Reynes2016-11-091-30/+35
| | | | | | | | | The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Acked-by: Jes Sorensen <Jes.Sorensen@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: adaptec: starfire: use new api ethtool_{get|set}_link_ksettingsPhilippe Reynes2016-11-091-6/+8
| | | | | | | | The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Revert "net: stmmac: allow to split suspend/resume from init/exit callbacks"Joachim Eastwood2016-11-091-6/+2
| | | | | | | | | | | | Instead of adding hooks inside stmmac_platform it is better to just use the standard PM callbacks within the specific dwmac-driver. This only used by the dwmac-rk driver. This reverts commit cecbc5563a02 ("stmmac: allow to split suspend/resume from init/exit callbacks"). Signed-off-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* stmmac: dwmac-rk: absorb rk_gmac_init into probeJoachim Eastwood2016-11-091-9/+1
| | | | | | | | | | | | Since the rk_gmac_init() only calls another function move this function call into probe so rk_gmac_init() can be removed. Since commit cecbc5563a02 ("stmmac: allow to split suspend/resume from init/exit callbacks") the init hook is no longer used in dwmac-rk so this can be removed. Signed-off-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* stmmac: dwmac-rk: turn exit into standard driver remove callbackJoachim Eastwood2016-11-091-9/+11
| | | | | | | | | | | Convert the exit hook into a standard driver remove function as the hook doesn't really buy us anything extra. Eventually the exit hook will be deprecated in favor of the driver remove function. Signed-off-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* stmmac: dwmac-rk: turn resume/suspend into standard PM callbacksJoachim Eastwood2016-11-091-27/+32
| | | | | | | | | | Use standard PM resume/suspend callbacks instead of the hooks in stmmac_platform. This gives the driver more control and flexibility when implementing PM functionality. The hooks in stmmac_platform also doesn't buy us anything extra. Signed-off-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: phy: Add Meson GXL Internal PHY driverNeil Armstrong2016-11-093-0/+87
| | | | | | | | | | | | | | | | Add driver for the Internal RMII PHY found in the Amlogic Meson GXL SoCs. This PHY seems to only implement some standard registers and need some workarounds to provide autoneg values from vendor registers. Some magic values are currently used to configure the PHY, and this a temporary setup until clarification about these registers names and registers fields are provided by Amlogic. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: mdio-mux-mmioreg: Add support for 16bit and 32bit register sizesNeil Armstrong2016-11-091-13/+47
| | | | | | | | | | In order to support PHY switching on Amlogic GXL SoCs, add support for 16bit and 32bit registers sizes. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: ethernet: bgmac: add NS2 supportJon Mason2016-11-073-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 <jon.mason@broadcom.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Acked-by: Rafał Miłecki <rafal@milecki.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: ethernet: bgmac: device tree phy enablementJon Mason2016-11-074-25/+56
| | | | | | | | Change the bgmac driver to allow for phy's defined by the device tree Signed-off-by: Jon Mason <jon.mason@broadcom.com> Acked-by: Rafał Miłecki <rafal@milecki.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: phy: broadcom: Add BCM54810 PHY entryJon Mason2016-11-072-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 <vsoni@broadcom.com> Signed-off-by: Jon Mason <jon.mason@broadcom.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: phy: broadcom: add bcm54xx_auxctl_readJon Mason2016-11-071-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 <jon.mason@broadcom.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* stmmac: dwmac-sti: remove unused priv dev memberJoachim Eastwood2016-11-061-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 <manabian@gmail.com> Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Tested-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* stmmac: dwmac-sti: clean up and rename sti_dwmac_initJoachim Eastwood2016-11-061-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 <manabian@gmail.com> Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Tested-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* stmmac: dwmac-sti: move clk_prepare_enable out of init and add error handlingJoachim Eastwood2016-11-061-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 <manabian@gmail.com> Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Tested-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* stmmac: dwmac-sti: move st, gmac_en parsing to sti_dwmac_parse_dataJoachim Eastwood2016-11-061-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 <manabian@gmail.com> Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Tested-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* stmmac: dwmac-sti: add PM ops and resume functionJoachim Eastwood2016-11-061-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 <manabian@gmail.com> Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Tested-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* stmmac: dwmac-sti: remove clk NULL checksJoachim Eastwood2016-11-061-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 <manabian@gmail.com> Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Tested-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* stmmac: dwmac-sti: remove useless of_node checkJoachim Eastwood2016-11-061-3/+0
| | | | | | | | | Since dwmac-sti is a DT only driver checking for OF node is not necessary. Signed-off-by: Joachim Eastwood <manabian@gmail.com> Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Tested-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch '10GbE' of ↵David S. Miller2016-11-0613-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 <davem@davemloft.net>
| * ixgbevf: Handle previously-freed msix_entriesMark Rustad2016-11-041-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 <mark.d.rustad@intel.com> Tested-by: Krishneil Singh <krishneil.k.singh@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * ixgbe: ixgbe_atr() compute l4_proto only if non-paged data has ↵Sowmini Varadhan2016-11-041-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 <sowmini.varadhan@oracle.com> Reviewed-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Krishneil Singh <krishneil.k.singh@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * ixgbe: ixgbe_atr() should access udp_hdr(skb) only for UDP packetsSowmini Varadhan2016-11-041-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 <sowmini.varadhan@oracle.com> Reviewed-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Krishneil Singh <krishneil.k.singh@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * ixgbe: Correct X550 phy IDDon Skidmore2016-11-042-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 <donald.c.skidmore@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * ixgbe: Add X553 FW ALEF supportDon Skidmore2016-11-043-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 <donald.c.skidmore@intel.com> Tested-by: Krishneil Singh <krishneil.k.singh@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * ixgbe: set device if before calling get_invariantsEmil Tantilov2016-11-041-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 <emil.s.tantilov@intel.com> Tested-by: Krishneil Singh <krishneil.k.singh@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * ixgbe: use link instead of I2C combined abstractionEmil Tantilov2016-11-045-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 <emil.s.tantilov@intel.com> Tested-by: Krishneil Singh <krishneil.k.singh@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * ixgbe: remove SFP ixfi supportEmil Tantilov2016-11-041-65/+11
| | | | | | | | | | | | | | | | Remove SFP ixfi code since there is no HW that currently supports it. Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Krishneil Singh <krishneil.k.singh@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * ixgbe: Handle previously-freed msix_entriesMark Rustad2016-11-041-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 <mark.d.rustad@intel.com> Tested-by: Krishneil Singh <krishneil.k.singh@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * ixgbe: Add X553 PHY FC autoneg supportDon Skidmore2016-11-047-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 <donald.c.skidmore@intel.com> Tested-by: Krishneil Singh <krishneil.k.singh@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * ixgbe: fix link status check for copper X550emEmil Tantilov2016-11-041-8/+13
| | | | | | | | | | | | | | | | | | Read the PHY register twice in order to get the correct value for autoneg_status. Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Krishneil Singh <krishneil.k.singh@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * ixgbe: do not use ixgbe specific mdio definesEmil Tantilov2016-11-043-56/+33
| | | | | | | | | | | | | | | | | | Replace some ixgbe specific MDIO defines with their equivalent from the kernel. Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Krishneil Singh <krishneil.k.singh@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * ixgbe: Update setup PHY link to unset all speedsDon Skidmore2016-11-041-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 <donald.c.skidmore@intel.com> Tested-by: Krishneil Singh <krishneil.k.singh@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * ixgbe: Add support to retrieve and store LED link activeDon Skidmore2016-11-048-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 <donald.c.skidmore@intel.com> Tested-by: Krishneil Singh <krishneil.k.singh@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * ixgbe: Add X552 iXFI configuration helper functionDon Skidmore2016-11-041-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 <donald.c.skidmore@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | mlxsw: Remove unused including <generated/utsrelease.h>Wei Yongjun2016-11-053-3/+0
|/ | | | | | | | Remove including <generated/utsrelease.h> that don't need it. Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* nfp: add support for offload of XDP programsJakub Kicinski2016-11-046-6/+139
| | | | | | | | Most infrastructure can be reused, provide separate handling of context offsets and exit codes. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* nfp: remove unnecessary parameters from nfp_net_bpf_offload()Jakub Kicinski2016-11-043-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 <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* nfp: add XDP support in the driverJakub Kicinski2016-11-044-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 <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* nfp: reorganize nfp_net_rx() to get packet offsets earlyJakub Kicinski2016-11-041-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 <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* nfp: add support for ethtool .set_channelsJakub Kicinski2016-11-044-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 <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* nfp: move RSS indirection table init into a separate functionJakub Kicinski2016-11-041-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 <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* nfp: add helper to reassign rings to IRQ vectorsJakub Kicinski2016-11-041-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 <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* nfp: loosen relation between rings and IRQs vectorsJakub Kicinski2016-11-041-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 <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* nfp: reuse ring helpers on .ndo_open() pathJakub Kicinski2016-11-041-40/+20
| | | | | | | | Ring allocation helpers encapsulate all ring allocation and initialization steps nicely. Reuse them on .ndo_open() path. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* nfp: rename ring allocation helpersJakub Kicinski2016-11-041-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 <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* nfp: centralize runtime reconfiguration logicJakub Kicinski2016-11-043-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 <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>