mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-24 21:24:00 +08:00
Merge branch 'qed-fixes'
Yuval Mintz says: ==================== qed*: Fixes series This series contains several small fixes to driver behavior [4th patch is the only one containing a 'fatal' fix, but the error is only theoretical for qede; if would require another protocol driver yet unsubmitted to reach it]. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
ab522fd68b
@ -3700,6 +3700,7 @@ struct public_port {
|
||||
#define MEDIA_DA_TWINAX 0x3
|
||||
#define MEDIA_BASE_T 0x4
|
||||
#define MEDIA_SFP_1G_FIBER 0x5
|
||||
#define MEDIA_MODULE_FIBER 0x6
|
||||
#define MEDIA_KR 0xf0
|
||||
#define MEDIA_NOT_PRESENT 0xff
|
||||
|
||||
|
@ -72,6 +72,7 @@ int qed_sp_eth_vport_start(struct qed_hwfn *p_hwfn,
|
||||
p_ramrod->mtu = cpu_to_le16(p_params->mtu);
|
||||
p_ramrod->inner_vlan_removal_en = p_params->remove_inner_vlan;
|
||||
p_ramrod->drop_ttl0_en = p_params->drop_ttl0;
|
||||
p_ramrod->untagged = p_params->only_untagged;
|
||||
|
||||
SET_FIELD(rx_mode, ETH_VPORT_RX_MODE_UCAST_DROP_ALL, 1);
|
||||
SET_FIELD(rx_mode, ETH_VPORT_RX_MODE_MCAST_DROP_ALL, 1);
|
||||
@ -247,10 +248,6 @@ qed_sp_update_accept_mode(struct qed_hwfn *p_hwfn,
|
||||
SET_FIELD(state, ETH_VPORT_TX_MODE_UCAST_DROP_ALL,
|
||||
!!(accept_filter & QED_ACCEPT_NONE));
|
||||
|
||||
SET_FIELD(state, ETH_VPORT_TX_MODE_UCAST_ACCEPT_ALL,
|
||||
(!!(accept_filter & QED_ACCEPT_UCAST_MATCHED) &&
|
||||
!!(accept_filter & QED_ACCEPT_UCAST_UNMATCHED)));
|
||||
|
||||
SET_FIELD(state, ETH_VPORT_TX_MODE_MCAST_DROP_ALL,
|
||||
!!(accept_filter & QED_ACCEPT_NONE));
|
||||
|
||||
@ -1748,7 +1745,8 @@ static int qed_start_vport(struct qed_dev *cdev,
|
||||
start.vport_id, start.mtu);
|
||||
}
|
||||
|
||||
qed_reset_vport_stats(cdev);
|
||||
if (params->clear_stats)
|
||||
qed_reset_vport_stats(cdev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -1085,6 +1085,7 @@ static int qed_get_port_type(u32 media_type)
|
||||
case MEDIA_SFPP_10G_FIBER:
|
||||
case MEDIA_SFP_1G_FIBER:
|
||||
case MEDIA_XFP_FIBER:
|
||||
case MEDIA_MODULE_FIBER:
|
||||
case MEDIA_KR:
|
||||
port_type = PORT_FIBRE;
|
||||
break;
|
||||
|
@ -614,7 +614,9 @@ qed_spq_add_entry(struct qed_hwfn *p_hwfn,
|
||||
|
||||
*p_en2 = *p_ent;
|
||||
|
||||
kfree(p_ent);
|
||||
/* EBLOCK responsible to free the allocated p_ent */
|
||||
if (p_ent->comp_mode != QED_SPQ_MODE_EBLOCK)
|
||||
kfree(p_ent);
|
||||
|
||||
p_ent = p_en2;
|
||||
}
|
||||
@ -749,6 +751,15 @@ int qed_spq_post(struct qed_hwfn *p_hwfn,
|
||||
* Thus, after gaining the answer perform the cleanup here.
|
||||
*/
|
||||
rc = qed_spq_block(p_hwfn, p_ent, fw_return_code);
|
||||
|
||||
if (p_ent->queue == &p_spq->unlimited_pending) {
|
||||
/* This is an allocated p_ent which does not need to
|
||||
* return to pool.
|
||||
*/
|
||||
kfree(p_ent);
|
||||
return rc;
|
||||
}
|
||||
|
||||
if (rc)
|
||||
goto spq_post_fail2;
|
||||
|
||||
@ -844,8 +855,12 @@ int qed_spq_completion(struct qed_hwfn *p_hwfn,
|
||||
found->comp_cb.function(p_hwfn, found->comp_cb.cookie, p_data,
|
||||
fw_return_code);
|
||||
|
||||
if (found->comp_mode != QED_SPQ_MODE_EBLOCK)
|
||||
/* EBLOCK is responsible for freeing its own entry */
|
||||
if ((found->comp_mode != QED_SPQ_MODE_EBLOCK) ||
|
||||
(found->queue == &p_spq->unlimited_pending))
|
||||
/* EBLOCK is responsible for returning its own entry into the
|
||||
* free list, unless it originally added the entry into the
|
||||
* unlimited pending list.
|
||||
*/
|
||||
qed_spq_return_entry(p_hwfn, found);
|
||||
|
||||
/* Attempt to post pending requests */
|
||||
|
@ -3231,7 +3231,7 @@ static int qede_stop_queues(struct qede_dev *edev)
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int qede_start_queues(struct qede_dev *edev)
|
||||
static int qede_start_queues(struct qede_dev *edev, bool clear_stats)
|
||||
{
|
||||
int rc, tc, i;
|
||||
int vlan_removal_en = 1;
|
||||
@ -3462,6 +3462,7 @@ out:
|
||||
|
||||
enum qede_load_mode {
|
||||
QEDE_LOAD_NORMAL,
|
||||
QEDE_LOAD_RELOAD,
|
||||
};
|
||||
|
||||
static int qede_load(struct qede_dev *edev, enum qede_load_mode mode)
|
||||
@ -3500,7 +3501,7 @@ static int qede_load(struct qede_dev *edev, enum qede_load_mode mode)
|
||||
goto err3;
|
||||
DP_INFO(edev, "Setup IRQs succeeded\n");
|
||||
|
||||
rc = qede_start_queues(edev);
|
||||
rc = qede_start_queues(edev, mode != QEDE_LOAD_RELOAD);
|
||||
if (rc)
|
||||
goto err4;
|
||||
DP_INFO(edev, "Start VPORT, RXQ and TXQ succeeded\n");
|
||||
@ -3555,7 +3556,7 @@ void qede_reload(struct qede_dev *edev,
|
||||
if (func)
|
||||
func(edev, args);
|
||||
|
||||
qede_load(edev, QEDE_LOAD_NORMAL);
|
||||
qede_load(edev, QEDE_LOAD_RELOAD);
|
||||
|
||||
mutex_lock(&edev->qede_lock);
|
||||
qede_config_rx_mode(edev->ndev);
|
||||
|
@ -49,6 +49,7 @@ struct qed_start_vport_params {
|
||||
bool drop_ttl0;
|
||||
u8 vport_id;
|
||||
u16 mtu;
|
||||
bool clear_stats;
|
||||
};
|
||||
|
||||
struct qed_stop_rxq_params {
|
||||
|
Loading…
Reference in New Issue
Block a user