Skip to content

Commit

Permalink
Merge branch 'qed-next'
Browse files Browse the repository at this point in the history
Yuval Mintz says:

====================
qed*: Fixes to "Allow unicast filtering"

Commit 7b7e70f ("qed*: Allow unicast filtering") introduced several
issues in driver. This series is intended to address and fix those.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Nov 1, 2016
2 parents c587094 + b0fca31 commit 6d052e9
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 1 deletion.
2 changes: 2 additions & 0 deletions drivers/net/ethernet/qlogic/qed/qed_l2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1692,6 +1692,8 @@ static int qed_fill_eth_dev_info(struct qed_dev *cdev,

qed_vf_get_num_vlan_filters(&cdev->hwfns[0],
(u8 *)&info->num_vlan_filters);
qed_vf_get_num_mac_filters(&cdev->hwfns[0],
(u8 *)&info->num_mac_filters);
qed_vf_get_port_mac(&cdev->hwfns[0], info->port_mac);

info->is_legacy = !!cdev->hwfns[0].vf_iov_info->b_pre_fp_hsi;
Expand Down
7 changes: 7 additions & 0 deletions drivers/net/ethernet/qlogic/qed/qed_vf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1171,6 +1171,13 @@ void qed_vf_get_num_vlan_filters(struct qed_hwfn *p_hwfn, u8 *num_vlan_filters)
*num_vlan_filters = p_vf->acquire_resp.resc.num_vlan_filters;
}

void qed_vf_get_num_mac_filters(struct qed_hwfn *p_hwfn, u8 *num_mac_filters)
{
struct qed_vf_iov *p_vf = p_hwfn->vf_iov_info;

*num_mac_filters = p_vf->acquire_resp.resc.num_mac_filters;
}

bool qed_vf_check_mac(struct qed_hwfn *p_hwfn, u8 *mac)
{
struct qed_bulletin_content *bulletin;
Expand Down
13 changes: 13 additions & 0 deletions drivers/net/ethernet/qlogic/qed/qed_vf.h
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,14 @@ void qed_vf_get_port_mac(struct qed_hwfn *p_hwfn, u8 *port_mac);
void qed_vf_get_num_vlan_filters(struct qed_hwfn *p_hwfn,
u8 *num_vlan_filters);

/**
* @brief Get number of MAC filters allocated for VF by qed
*
* @param p_hwfn
* @param num_rxqs - allocated MAC filters
*/
void qed_vf_get_num_mac_filters(struct qed_hwfn *p_hwfn, u8 *num_mac_filters);

/**
* @brief Check if VF can set a MAC address
*
Expand Down Expand Up @@ -872,6 +880,11 @@ static inline void qed_vf_get_num_vlan_filters(struct qed_hwfn *p_hwfn,
{
}

static inline void qed_vf_get_num_mac_filters(struct qed_hwfn *p_hwfn,
u8 *num_mac_filters)
{
}

static inline bool qed_vf_check_mac(struct qed_hwfn *p_hwfn, u8 *mac)
{
return false;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/qlogic/qede/qede_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2366,7 +2366,7 @@ static void qede_init_ndev(struct qede_dev *edev)

qede_set_ethtool_ops(ndev);

ndev->priv_flags = IFF_UNICAST_FLT;
ndev->priv_flags |= IFF_UNICAST_FLT;

/* user-changeble features */
hw_features = NETIF_F_GRO | NETIF_F_SG |
Expand Down

0 comments on commit 6d052e9

Please sign in to comment.