Unverified Commit e6ce9b67 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!5730 [OLK-6.6] Fix warnings for RNPGBEVF driver

Merge Pull Request from: @dong-yibo 
 
1 Fix Mucse Network adapter (RNPGBEVF)driver warnings
update files:
drivers/net/ethernet/mucse/rnpgbevf/rnpgbevf_defines.h
drivers/net/ethernet/mucse/rnpgbevf/rnpgbevf_ethtool.c
drivers/net/ethernet/mucse/rnpgbevf/rnpgbevf_main.c
drivers/net/ethernet/mucse/rnpgbevf/rnpgbevf_mbx.c
drivers/net/ethernet/mucse/rnpgbevf/vf.c

https://gitee.com/openeuler/kernel/issues/I9DWOC 
 
Link:https://gitee.com/openeuler/kernel/pulls/5730

 

Reviewed-by: default avatarYue Haibing <yuehaibing@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parents 730e6b32 bd151ed3
Loading
Loading
Loading
Loading
+0 −62
Original line number Diff line number Diff line
@@ -255,76 +255,14 @@ static inline void buf_dump(const char *msg, void *buf, int len)
	printk(KERN_DEBUG "%s\n", msg_buf);
}

#ifndef NO_SKB_DUMP
static inline void _rnp_skb_dump(const struct sk_buff *skb, bool full_pkt)
{
	static atomic_t can_dump_full = ATOMIC_INIT(5);
	struct net_device *dev = skb->dev;
	struct sk_buff *list_skb;
	bool has_mac, has_trans;
	int headroom, tailroom;
	int i, len, seg_len;
	const char *level = KERN_WARNING;

	if (full_pkt)
		full_pkt = atomic_dec_if_positive(&can_dump_full) >= 0;

	if (full_pkt)
		len = skb->len;
	else
		len = min_t(int, skb->len, MAX_HEADER + 128);

	headroom = skb_headroom(skb);
	tailroom = skb_tailroom(skb);

	has_mac = skb_mac_header_was_set(skb);
	has_trans = skb_transport_header_was_set(skb);

	if (dev)
		printk(KERN_DEBUG "%sdev name=%s feat=0x%pNF\n", level,
		       dev->name, &dev->features);

	seg_len = min_t(int, skb_headlen(skb), len);
	if (seg_len)
		print_hex_dump(level, "skb linear:   ", DUMP_PREFIX_OFFSET, 16,
			       1, skb->data, seg_len, false);
	len -= seg_len;

	for (i = 0; len && i < skb_shinfo(skb)->nr_frags; i++) {
		skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
		u32 p_len;
		struct page *p;
		u8 *vaddr;

		p = skb_frag_address(frag);
		p_len = skb_frag_size(frag);
		seg_len = min_t(int, p_len, len);
		vaddr = kmap_atomic(p);
		print_hex_dump(level, "skb frag:     ", DUMP_PREFIX_OFFSET, 16,
			       1, vaddr, seg_len, false);
		kunmap_atomic(vaddr);
		len -= seg_len;
		if (!len)
			break;
	}

	if (full_pkt && skb_has_frag_list(skb)) {
		printk(KERN_DEBUG "skb fraglist:\n");
		skb_walk_frags(skb, list_skb) _rnp_skb_dump(list_skb, true);
	}
}
#endif

#define TRACE() printk(KERN_DEBUG "=[%s] %d == \n", __func__, __LINE__)

#ifdef CONFIG_RNPGBE_TX_DEBUG
#define desc_hex_dump(msg, buf, len)                                           \
	print_hex_dump(KERN_WARNING, msg, DUMP_PREFIX_OFFSET, 16, 1, (buf),    \
		       (len), false)
#define rnpgbevf_skb_dump _rnp_skb_dump
#else
#define desc_hex_dump(msg, buf, len)
#define rnpgbevf_skb_dump(skb, full_pkt)
#endif

#ifdef CONFIG_RNPGBE_RX_DEBUG
+8 −21
Original line number Diff line number Diff line
@@ -99,12 +99,6 @@ struct rnpgbevf_rx_queue_ring_stat {
	(RNPVF_GLOBAL_STATS_LEN + RNPGBE_QUEUE_STATS_LEN +                     \
	 RNPVF_HWSTRINGS_STATS_LEN)

static const char rnp_gstrings_test[][ETH_GSTRING_LEN] = {
	"Register test  (offline)", "Link test   (on/offline)"
};

#define RNPVF_TEST_LEN (sizeof(rnp_gstrings_test) / ETH_GSTRING_LEN)

enum priv_bits {
	padding_enable = 0,
};
@@ -251,7 +245,7 @@ static void rnpgbevf_get_drvinfo(struct net_device *netdev,
	drvinfo->n_priv_flags = RNPVF_PRIV_FLAGS_STR_LEN;
}

void rnpgbevf_get_ringparam(struct net_device *netdev,
static void rnpgbevf_get_ringparam(struct net_device *netdev,
				   struct ethtool_ringparam *ring,
				   struct kernel_ethtool_ringparam __always_unused *ker,
				   struct netlink_ext_ack __always_unused *extack)
@@ -264,7 +258,7 @@ void rnpgbevf_get_ringparam(struct net_device *netdev,
	ring->tx_pending = adapter->tx_ring_item_count;
}

int rnpgbevf_set_ringparam(struct net_device *netdev,
static int rnpgbevf_set_ringparam(struct net_device *netdev,
				  struct ethtool_ringparam *ring,
				  struct kernel_ethtool_ringparam __always_unused *ker,
				  struct netlink_ext_ack __always_unused *extack)
@@ -391,11 +385,8 @@ int rnpgbevf_set_ringparam(struct net_device *netdev,
static void rnpgbevf_get_strings(struct net_device *netdev, u32 stringset,
				 u8 *data)
{
	struct rnpgbevf_adapter *adapter = netdev_priv(netdev);
	char *p = (char *)data;
	int i;
	struct rnpgbevf_ring *ring;
	u16 queue_idx;

	switch (stringset) {
	case ETH_SS_STATS:
@@ -414,8 +405,6 @@ static void rnpgbevf_get_strings(struct net_device *netdev, u32 stringset,
		BUG_ON(RNPVF_NUM_TX_QUEUES != RNPVF_NUM_RX_QUEUES);

		for (i = 0; i < RNPVF_NUM_TX_QUEUES; i++) {
			ring = adapter->tx_ring[i];
			queue_idx = ring->rnpgbevf_queue_idx;
			sprintf(p, "\n     queue%u_tx_packets", i);
			p += ETH_GSTRING_LEN;
			sprintf(p, "queue%u_tx_bytes", i);
@@ -449,8 +438,6 @@ static void rnpgbevf_get_strings(struct net_device *netdev, u32 stringset,
			sprintf(p, "queue%u_tx_equal_count", i);
			p += ETH_GSTRING_LEN;

			ring = adapter->rx_ring[i];
			queue_idx = ring->rnpgbevf_queue_idx;
			sprintf(p, "\n     queue%u_rx_packets", i);
			p += ETH_GSTRING_LEN;
			sprintf(p, "queue%u_rx_bytes", i);
+39 −48
Original line number Diff line number Diff line
@@ -93,11 +93,10 @@ static void rnpgbevf_put_rx_buffer(struct rnpgbevf_ring *rx_ring,
#endif /* OPTM_WITH_LPAGE */

/**
 * rnpgbevf_set_ivar - set IVAR registers - maps interrupt causes to vectors
 * rnpgbevf_set_ring_vector - maps interrupt causes to vectors
 * @adapter: pointer to adapter struct
 * @direction: 0 for Rx, 1 for Tx, -1 for other causes
 * @queue: queue to map the corresponding interrupt to
 * @msix_vector: the vector to map to the corresponding queue
 * @rnpgbevf_queue: queue to map the corresponding interrupt to
 * @rnpgbevf_msix_vector: the vector to map to the corresponding queue
 */
static void rnpgbevf_set_ring_vector(struct rnpgbevf_adapter *adapter,
				     u8 rnpgbevf_queue, u8 rnpgbevf_msix_vector)
@@ -116,7 +115,7 @@ static void rnpgbevf_set_ring_vector(struct rnpgbevf_adapter *adapter,
	rnpgbevf_wr_reg(hw->ring_msix_base + RING_VECTOR(rnpgbevf_queue), data);
}

void rnpgbevf_unmap_and_free_tx_resource(struct rnpgbevf_ring *ring,
static void rnpgbevf_unmap_and_free_tx_resource(struct rnpgbevf_ring *ring,
						struct rnpgbevf_tx_buffer *tx_buffer)
{
	if (tx_buffer->skb) {
@@ -774,7 +773,8 @@ static void rnpgbevf_process_skb_fields(struct rnpgbevf_ring *rx_ring,
 * @rx_ring: ring to place buffers on
 * @cleaned_count: number of buffers to replace
 **/
void rnpgbevf_alloc_rx_buffers(struct rnpgbevf_ring *rx_ring, u16 cleaned_count)
static void rnpgbevf_alloc_rx_buffers(struct rnpgbevf_ring *rx_ring,
				      u16 cleaned_count)
{
	union rnp_rx_desc *rx_desc;
	struct rnpgbevf_rx_buffer *bi;
@@ -880,7 +880,6 @@ void rnpgbevf_alloc_rx_buffers(struct rnpgbevf_ring *rx_ring, u16 cleaned_count)
 * rnpgbevf_is_non_eop - process handling of non-EOP buffers
 * @rx_ring: Rx ring being processed
 * @rx_desc: Rx descriptor for current buffer
 * @skb: Current socket buffer containing buffer in progress
 *
 * This function updates next to clean.  If the buffer is an EOP buffer
 * this function exits returning false, otherwise it will place the
@@ -1084,7 +1083,7 @@ static struct sk_buff *rnpgbevf_build_skb(struct rnpgbevf_ring *rx_ring,
}

/**
 * rnp_clean_rx_irq - Clean completed descriptors from Rx ring - bounce buf
 * rnpgbevf_clean_rx_irq - Clean completed descriptors from Rx ring - bounce buf
 * @q_vector: structure containing interrupt and ring information
 * @rx_ring: rx descriptor ring to transact packets on
 * @budget: Total limit on number of packets to process
@@ -1507,7 +1506,7 @@ static void rnpgbevf_rx_buffer_flip(struct rnpgbevf_ring *rx_ring,
}

/**
 * rnp_clean_rx_irq - Clean completed descriptors from Rx ring - bounce buf
 * rnpgbevf_clean_rx_irq - Clean completed descriptors from Rx ring - bounce buf
 * @q_vector: structure containing interrupt and ring information
 * @rx_ring: rx descriptor ring to transact packets on
 * @budget: Total limit on number of packets to process
@@ -1674,7 +1673,7 @@ static int rnpgbevf_clean_rx_irq(struct rnpgbevf_q_vector *q_vector,
#endif /* OPTM_WITH_LPAGE */

/**
 * rnp_clean_rx_ring - Free Rx Buffers per Queue
 * rnpgbevf_clean_rx_ring - Free Rx Buffers per Queue
 * @rx_ring: ring to free buffers from
 **/
static void rnpgbevf_clean_rx_ring(struct rnpgbevf_ring *rx_ring)
@@ -1724,7 +1723,6 @@ static void rnpgbevf_clean_rx_ring(struct rnpgbevf_ring *rx_ring)

/**
 * rnpgbevf_pull_tail - rnp specific version of skb_pull_tail
 * @rx_ring: rx descriptor ring packet is being transacted on
 * @skb: pointer to current skb being adjusted
 *
 * This function is an rnp specific version of __pskb_pull_tail.  The
@@ -1974,9 +1972,8 @@ static int rnpgbevf_request_msix_irqs(struct rnpgbevf_adapter *adapter)
			&adapter->msix_entries[i + adapter->vector_off];

		if (q_vector->tx.ring && q_vector->rx.ring) {
			snprintf(q_vector->name, sizeof(q_vector->name) - 1,
				 "%s-%s-%d-%d", netdev->name, "TxRx", i,
				 q_vector->v_idx);
			snprintf(q_vector->name, sizeof(q_vector->name),
				 "%s-%s-%u", netdev->name, "TxRx", i);
		} else {
			WARN(!(q_vector->tx.ring && q_vector->rx.ring),
			     "%s vector%d tx rx is null, v_idx:%d\n",
@@ -2034,6 +2031,7 @@ static int rnpgbevf_free_msix_irqs(struct rnpgbevf_adapter *adapter)
 * rnpgbevf_update_itr - update the dynamic ITR value based on statistics
 * @q_vector: structure containing interrupt and ring information
 * @ring_container: structure containing ring performance data
 * @type: rx or tx ring
 *
 *      Stores a new ITR value based on packets and byte
 *      counts during the last interrupt.  The advantage of per interrupt
@@ -2253,14 +2251,14 @@ static void rnpgbevf_update_itr(struct rnpgbevf_q_vector *q_vector,
}

/**
 * rnpgbevf_write_eitr - write EITR register in hardware specific way
 * rnpgbevf_write_eitr_rx - write EITR register in hardware specific way
 * @q_vector: structure containing interrupt and ring information
 *
 * This function is made to be called by ethtool and by the driver
 * when it needs to update EITR registers at runtime.  Hardware
 * specific quirks/differences are taken care of here.
 */
void rnpgbevf_write_eitr_rx(struct rnpgbevf_q_vector *q_vector)
static void rnpgbevf_write_eitr_rx(struct rnpgbevf_q_vector *q_vector)
{
	struct rnpgbevf_adapter *adapter = q_vector->adapter;
	struct rnpgbevf_hw *hw = &adapter->hw;
@@ -2358,7 +2356,7 @@ static inline void rnpgbevf_irq_disable(struct rnpgbevf_adapter *adapter)
 *
 * Configure the Tx descriptor ring after a reset.
 **/
void rnpgbevf_configure_tx_ring(struct rnpgbevf_adapter *adapter,
static void rnpgbevf_configure_tx_ring(struct rnpgbevf_adapter *adapter,
				       struct rnpgbevf_ring *ring)
{
	struct rnpgbevf_hw *hw = &adapter->hw;
@@ -2423,19 +2421,19 @@ static void rnpgbevf_configure_tx(struct rnpgbevf_adapter *adapter)
		rnpgbevf_configure_tx_ring(adapter, adapter->tx_ring[i]);
}

void rnpgbevf_disable_rx_queue(struct rnpgbevf_adapter *adapter,
static void rnpgbevf_disable_rx_queue(struct rnpgbevf_adapter *adapter,
				      struct rnpgbevf_ring *ring)
{
	ring_wr32(ring, RNPGBE_DMA_RX_START, 0);
}

void rnpgbevf_enable_rx_queue(struct rnpgbevf_adapter *adapter,
static void rnpgbevf_enable_rx_queue(struct rnpgbevf_adapter *adapter,
				     struct rnpgbevf_ring *ring)
{
	ring_wr32(ring, RNPGBE_DMA_RX_START, 1);
}

void rnpgbevf_configure_rx_ring(struct rnpgbevf_adapter *adapter,
static void rnpgbevf_configure_rx_ring(struct rnpgbevf_adapter *adapter,
				       struct rnpgbevf_ring *ring)
{
	struct rnpgbevf_hw *hw = &adapter->hw;
@@ -2558,13 +2556,12 @@ static int rnpgbevf_vlan_rx_kill_vid(struct net_device *netdev,
	struct rnpgbevf_adapter *adapter = netdev_priv(netdev);
	struct rnpgbevf_hw *hw = &adapter->hw;
	struct rnp_mbx_info *mbx = &hw->mbx;
	int err = -EOPNOTSUPP;

	if (vid) {
		spin_lock_bh(&adapter->mbx_lock);
		set_bit(__RNPVF_MBX_POLLING, &adapter->state);
		/* remove VID from filter table */
		err = hw->mac.ops.set_vfta(hw, vid, 0, false);
		hw->mac.ops.set_vfta(hw, vid, 0, false);
		clear_bit(__RNPVF_MBX_POLLING, &adapter->state);
		spin_unlock_bh(&adapter->mbx_lock);
		hw->ops.set_veb_vlan(hw, 0, VFNUM(mbx, hw->vfnum));
@@ -3184,13 +3181,6 @@ static int rnpgbevf_acquire_msix_vectors(struct rnpgbevf_adapter *adapter,
					 int vectors)
{
	int err = 0;
	int vector_threshold;

	/* We'll want at least 2 (vector_threshold):
	 * 1) TxQ[0] + RxQ[0] handler
	 * 2) Other (Link Status Change, etc.)
	 */
	vector_threshold = MIN_MSIX_COUNT;

	/* The more we get, the more we will assign to Tx/Rx Cleanup
	 * for the separate queues...where Rx Cleanup >= Tx Cleanup.
@@ -3722,7 +3712,7 @@ static int rnpgbevf_reset_subtask(struct rnpgbevf_adapter *adapter)

/**
 * rnpgbevf_watchdog - Timer Call-back
 * @data: pointer to adapter cast into an unsigned long
 * @t: timer_list pointer
 **/
static void rnpgbevf_watchdog(struct timer_list *t)
{
@@ -4375,8 +4365,11 @@ int rnpgbevf_close(struct net_device *netdev)
	return 0;
}

void rnpgbevf_tx_ctxtdesc(struct rnpgbevf_ring *tx_ring, u16 mss_seg_len,
			  u8 l4_hdr_len, u8 tunnel_hdr_len, int ignore_vlan,
static void rnpgbevf_tx_ctxtdesc(struct rnpgbevf_ring *tx_ring,
				 u16 mss_seg_len,
				 u8 l4_hdr_len,
				 u8 tunnel_hdr_len,
				 int ignore_vlan,
				 u16 type_tucmd, bool crc_pad)
{
	struct rnp_tx_ctx_desc *context_desc;
@@ -4817,7 +4810,7 @@ static int __rnpgbevf_maybe_stop_tx(struct rnpgbevf_ring *tx_ring, int size)
	return 0;
}

void rnpgbevf_maybe_tx_ctxtdesc(struct rnpgbevf_ring *tx_ring,
static void rnpgbevf_maybe_tx_ctxtdesc(struct rnpgbevf_ring *tx_ring,
				       struct rnpgbevf_tx_buffer *first,
				       int ignore_vlan, u16 type_tucmd)
{
@@ -4835,7 +4828,7 @@ static int rnpgbevf_maybe_stop_tx(struct rnpgbevf_ring *tx_ring, int size)
	return __rnpgbevf_maybe_stop_tx(tx_ring, size);
}

netdev_tx_t rnpgbevf_xmit_frame_ring(struct sk_buff *skb,
static netdev_tx_t rnpgbevf_xmit_frame_ring(struct sk_buff *skb,
					    struct rnpgbevf_adapter *adapter,
					    struct rnpgbevf_ring *tx_ring,
					    bool tx_padding)
@@ -4850,8 +4843,6 @@ netdev_tx_t rnpgbevf_xmit_frame_ring(struct sk_buff *skb,
	u8 hdr_len = 0;
	int ignore_vlan = 0;

	rnpgbevf_skb_dump(skb, true);

	/* need: 1 descriptor per page * PAGE_SIZE/RNPVF_MAX_DATA_PER_TXD,
	 *       + 1 desc for skb_headlen/RNPVF_MAX_DATA_PER_TXD,
	 *       + 2 desc gap to keep tail from touching head,
@@ -5308,7 +5299,7 @@ static const struct net_device_ops rnpgbevf_netdev_ops = {
	.ndo_fix_features = rnpgbevf_fix_features,
};

void rnpgbevf_assign_netdev_ops(struct net_device *dev)
static void rnpgbevf_assign_netdev_ops(struct net_device *dev)
{
	/* different hw can assign difference fun */
	dev->netdev_ops = &rnpgbevf_netdev_ops;
+10 −0
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@ static s32 rnpgbevf_poll_for_ack(struct rnpgbevf_hw *hw, bool to_cm3);
 *  @hw: pointer to the HW structure
 *  @msg: The message buffer
 *  @size: Length of buffer
 *  @to_cm3: to cm3 or not
 *
 *  returns 0 if it successfully received a message notification and
 *  copied it into the receive buffer.
@@ -39,6 +40,7 @@ static s32 rnpgbevf_read_posted_mbx(struct rnpgbevf_hw *hw, u32 *msg, u16 size,
 *  @hw: pointer to the HW structure
 *  @msg: The message buffer
 *  @size: Length of buffer
 *  @to_cm3: to cm3 or not
 *
 *  returns 0 if it successfully copied message into the buffer and
 *  received an ack to that message within delay * timeout period
@@ -122,6 +124,7 @@ static inline void rnpgbevf_mbx_inc_vfack(struct rnpgbevf_hw *hw, bool to_cm3)
/**
 *  rnpgbevf_check_for_msg_vf - checks to see if the PF has sent mail
 *  @hw: pointer to the HW structure
 *  @to_cm3: to cm3 or not
 *
 *  returns 0 if the PF has set the Status bit or else ERR_MBX
 **/
@@ -151,6 +154,7 @@ static s32 rnpgbevf_check_for_msg_vf(struct rnpgbevf_hw *hw, bool to_cm3)
/**
 *  rnpgbevf_poll_for_msg - Wait for message notification
 *  @hw: pointer to the HW structure
 *  @to_cm3: to cm3 or not
 *
 *  returns 0 if it successfully received a message notification
 **/
@@ -170,6 +174,7 @@ static s32 rnpgbevf_poll_for_msg(struct rnpgbevf_hw *hw, bool to_cm3)
/**
 *  rnpgbevf_poll_for_ack - Wait for message acknowledgment
 *  @hw: pointer to the HW structure
 *  @to_cm3: to cm3 or not
 *
 *  returns 0 if it successfully received a message acknowledgment
 **/
@@ -195,6 +200,7 @@ static s32 rnpgbevf_poll_for_ack(struct rnpgbevf_hw *hw, bool to_cm3)
/**
 *  rnpgbevf_check_for_rst_msg_vf - checks to see if the PF has ACK'd
 *  @hw: pointer to the HW structure
 *  @to_cm3: to cm3 or not
 *
 *  returns 0 if the PF has set the ACK bit or else ERR_MBX
 **/
@@ -357,6 +363,7 @@ static s32 rnpgbevf_check_for_rst_msg_vf(struct rnpgbevf_hw *hw, bool to_cm3)
/**
 *  rnpgbevf_check_for_ack_vf - checks to see if the PF has ACK'd
 *  @hw: pointer to the HW structure
 *  @to_cm3: to cm3 or not
 *
 *  returns 0 if the PF has set the ACK bit or else ERR_MBX
 **/
@@ -386,6 +393,7 @@ static s32 rnpgbevf_check_for_ack_vf(struct rnpgbevf_hw *hw, bool to_cm3)
/**
 *  rnpgbevf_obtain_mbx_lock_vf - obtain mailbox lock
 *  @hw: pointer to the HW structure
 *  @to_cm3: to cm3 or not
 *
 *  return 0 if we obtained the mailbox lock
 **/
@@ -416,6 +424,7 @@ static s32 rnpgbevf_obtain_mbx_lock_vf(struct rnpgbevf_hw *hw, bool to_cm3)
 *  @hw: pointer to the HW structure
 *  @msg: The message buffer
 *  @size: Length of buffer
 *  @to_cm3: to cm3 or not
 *
 *  returns 0 if it successfully copied message into the buffer
 **/
@@ -468,6 +477,7 @@ static s32 rnpgbevf_write_mbx_vf(struct rnpgbevf_hw *hw, u32 *msg, u16 size,
 *  @hw: pointer to the HW structure
 *  @msg: The message buffer
 *  @size: Length of buffer
 *  @to_cm3: to cm3 or not
 *
 *  returns 0 if it successfully read message from buffer
 **/
+7 −26
Original line number Diff line number Diff line
@@ -255,7 +255,6 @@ static s32 rnpgbevf_reset_hw_vf(struct rnpgbevf_hw *hw)
 **/
static s32 rnpgbevf_stop_hw_vf(struct rnpgbevf_hw *hw)
{
	u32 number_of_queues;
	u16 i;
	struct rnpgbevf_adapter *adapter = hw->back;
	struct rnpgbevf_ring *ring;
@@ -271,9 +270,6 @@ static s32 rnpgbevf_stop_hw_vf(struct rnpgbevf_hw *hw)
		ring_wr32(ring, RNPGBE_DMA_RX_START, 0);
	}

	/* Disable the transmit unit.  Each queue must be disabled. */
	number_of_queues = hw->mac.max_tx_queues;

	return 0;
}

@@ -370,7 +366,6 @@ static s32 rnpgbevf_get_mac_addr_vf(struct rnpgbevf_hw *hw, u8 *mac_addr)
/**
 *  rnpgbevf_get_queues_vf - Read device MAC address
 *  @hw: pointer to the HW structure
 *  @mac_addr: pointer to storage for retrieved MAC address
 **/
static s32 rnpgbevf_get_queues_vf(struct rnpgbevf_hw *hw)
{
@@ -485,7 +480,7 @@ static void rnpgbevf_write_msg_read_ack(struct rnpgbevf_hw *hw, u32 *msg,
		mbx->ops.read_posted(hw, retmsg, size, false);
}

u8 *rnpgbevf_addr_list_itr(struct rnpgbevf_hw __maybe_unused *hw,
static u8 *rnpgbevf_addr_list_itr(struct rnpgbevf_hw __maybe_unused *hw,
				  u8 **mc_addr_ptr)
{
	struct netdev_hw_addr *mc_ptr;
@@ -677,23 +672,8 @@ void rnpgbevf_rlpml_set_vf(struct rnpgbevf_hw *hw, u16 max_size)
	rnpgbevf_write_msg_read_ack(hw, msgbuf, 2);
}

/**
 *  rnpgbevf_negotiate_api_version - Negotiate supported API version
 *  @hw: pointer to the HW structure
 *  @api: integer containing requested API version
 **/
int rnpgbevf_negotiate_api_version(struct rnpgbevf_hw *hw, int api)
{
	return 0;
}

int rnpgbevf_get_queues(struct rnpgbevf_hw *hw, unsigned int *num_tcs,
			unsigned int *default_tc)
{
	return -1;
}

void rnpgbevf_set_veb_mac_n500(struct rnpgbevf_hw *hw, u8 *mac, u32 vf_num,
static void rnpgbevf_set_veb_mac_n500(struct rnpgbevf_hw *hw,
				      u8 *mac, u32 vf_num,
				      u32 ring)
{
	u32 maclow, machi;
@@ -706,7 +686,8 @@ void rnpgbevf_set_veb_mac_n500(struct rnpgbevf_hw *hw, u8 *mac, u32 vf_num,
	wr32(hw, RNPGBE_DMA_PORT_VEB_VF_RING_TBL_N500, ring);
}

void rnpgbevf_set_vlan_n500(struct rnpgbevf_hw *hw, u16 vid, u32 vf_num)
static void rnpgbevf_set_vlan_n500(struct rnpgbevf_hw *hw,
				   u16 vid, u32 vf_num)
{
	wr32(hw, RNPGBE_DMA_PORT_VEB_VID_TBL_N500, vid);
}