ice.h (870f805e97d9af3ffa752cd5b9cc6e81bc7d96ad) | ice.h (462acf6aca85cd4ee3e475f01240144c314f562c) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0 */ 2/* Copyright (c) 2018, Intel Corporation. */ 3 4#ifndef _ICE_H_ 5#define _ICE_H_ 6 7#include <linux/types.h> 8#include <linux/errno.h> 9#include <linux/kernel.h> 10#include <linux/module.h> | 1/* SPDX-License-Identifier: GPL-2.0 */ 2/* Copyright (c) 2018, Intel Corporation. */ 3 4#ifndef _ICE_H_ 5#define _ICE_H_ 6 7#include <linux/types.h> 8#include <linux/errno.h> 9#include <linux/kernel.h> 10#include <linux/module.h> |
11#include <linux/firmware.h> |
|
11#include <linux/netdevice.h> 12#include <linux/compiler.h> 13#include <linux/etherdevice.h> 14#include <linux/skbuff.h> 15#include <linux/cpumask.h> 16#include <linux/rtnetlink.h> 17#include <linux/if_vlan.h> 18#include <linux/dma-mapping.h> --- 283 unchanged lines hidden (view full) --- 302 303enum ice_pf_flags { 304 ICE_FLAG_FLTR_SYNC, 305 ICE_FLAG_RSS_ENA, 306 ICE_FLAG_SRIOV_ENA, 307 ICE_FLAG_SRIOV_CAPABLE, 308 ICE_FLAG_DCB_CAPABLE, 309 ICE_FLAG_DCB_ENA, | 12#include <linux/netdevice.h> 13#include <linux/compiler.h> 14#include <linux/etherdevice.h> 15#include <linux/skbuff.h> 16#include <linux/cpumask.h> 17#include <linux/rtnetlink.h> 18#include <linux/if_vlan.h> 19#include <linux/dma-mapping.h> --- 283 unchanged lines hidden (view full) --- 303 304enum ice_pf_flags { 305 ICE_FLAG_FLTR_SYNC, 306 ICE_FLAG_RSS_ENA, 307 ICE_FLAG_SRIOV_ENA, 308 ICE_FLAG_SRIOV_CAPABLE, 309 ICE_FLAG_DCB_CAPABLE, 310 ICE_FLAG_DCB_ENA, |
311 ICE_FLAG_ADV_FEATURES, |
|
310 ICE_FLAG_LINK_DOWN_ON_CLOSE_ENA, 311 ICE_FLAG_NO_MEDIA, 312 ICE_FLAG_FW_LLDP_AGENT, 313 ICE_FLAG_ETHTOOL_CTXT, /* set when ethtool holds RTNL lock */ 314 ICE_PF_FLAGS_NBITS /* must be last */ 315}; 316 317struct ice_pf { --- 82 unchanged lines hidden (view full) --- 400 (itr << GLINT_DYN_CTL_ITR_INDX_S); 401 if (vsi) 402 if (test_bit(__ICE_DOWN, vsi->state)) 403 return; 404 wr32(hw, GLINT_DYN_CTL(vector), val); 405} 406 407/** | 312 ICE_FLAG_LINK_DOWN_ON_CLOSE_ENA, 313 ICE_FLAG_NO_MEDIA, 314 ICE_FLAG_FW_LLDP_AGENT, 315 ICE_FLAG_ETHTOOL_CTXT, /* set when ethtool holds RTNL lock */ 316 ICE_PF_FLAGS_NBITS /* must be last */ 317}; 318 319struct ice_pf { --- 82 unchanged lines hidden (view full) --- 402 (itr << GLINT_DYN_CTL_ITR_INDX_S); 403 if (vsi) 404 if (test_bit(__ICE_DOWN, vsi->state)) 405 return; 406 wr32(hw, GLINT_DYN_CTL(vector), val); 407} 408 409/** |
410 * ice_netdev_to_pf - Retrieve the PF struct associated with a netdev 411 * @netdev: pointer to the netdev struct 412 */ 413static inline struct ice_pf *ice_netdev_to_pf(struct net_device *netdev) 414{ 415 struct ice_netdev_priv *np = netdev_priv(netdev); 416 417 return np->vsi->back; 418} 419 420/** |
|
408 * ice_get_main_vsi - Get the PF VSI 409 * @pf: PF instance 410 * 411 * returns pf->vsi[0], which by definition is the PF VSI 412 */ 413static inline struct ice_vsi *ice_get_main_vsi(struct ice_pf *pf) 414{ 415 if (pf->vsi) 416 return pf->vsi[0]; 417 418 return NULL; 419} 420 421int ice_vsi_setup_tx_rings(struct ice_vsi *vsi); 422int ice_vsi_setup_rx_rings(struct ice_vsi *vsi); 423void ice_set_ethtool_ops(struct net_device *netdev); | 421 * ice_get_main_vsi - Get the PF VSI 422 * @pf: PF instance 423 * 424 * returns pf->vsi[0], which by definition is the PF VSI 425 */ 426static inline struct ice_vsi *ice_get_main_vsi(struct ice_pf *pf) 427{ 428 if (pf->vsi) 429 return pf->vsi[0]; 430 431 return NULL; 432} 433 434int ice_vsi_setup_tx_rings(struct ice_vsi *vsi); 435int ice_vsi_setup_rx_rings(struct ice_vsi *vsi); 436void ice_set_ethtool_ops(struct net_device *netdev); |
437void ice_set_ethtool_safe_mode_ops(struct net_device *netdev); |
|
424u16 ice_get_avail_txq_count(struct ice_pf *pf); 425u16 ice_get_avail_rxq_count(struct ice_pf *pf); 426void ice_update_vsi_stats(struct ice_vsi *vsi); 427void ice_update_pf_stats(struct ice_pf *pf); 428int ice_up(struct ice_vsi *vsi); 429int ice_down(struct ice_vsi *vsi); 430int ice_vsi_cfg(struct ice_vsi *vsi); 431struct ice_vsi *ice_lb_vsi_setup(struct ice_pf *pf, struct ice_port_info *pi); --- 12 unchanged lines hidden --- | 438u16 ice_get_avail_txq_count(struct ice_pf *pf); 439u16 ice_get_avail_rxq_count(struct ice_pf *pf); 440void ice_update_vsi_stats(struct ice_vsi *vsi); 441void ice_update_pf_stats(struct ice_pf *pf); 442int ice_up(struct ice_vsi *vsi); 443int ice_down(struct ice_vsi *vsi); 444int ice_vsi_cfg(struct ice_vsi *vsi); 445struct ice_vsi *ice_lb_vsi_setup(struct ice_pf *pf, struct ice_port_info *pi); --- 12 unchanged lines hidden --- |