Commit a0d26d5a authored by Yuval Mintz's avatar Yuval Mintz Committed by David S. Miller

qed*: Don't reset statistics on inner reload

Several user APIs can cause driver to perform an inner-reload.
Currently, doing this would cause the HW/FW statistics of the
adapter to reset, which isn't the expected behavior [statistics
should only reset on explicit unloads].
Signed-off-by: default avatarYuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 32643988
...@@ -1745,6 +1745,7 @@ static int qed_start_vport(struct qed_dev *cdev, ...@@ -1745,6 +1745,7 @@ static int qed_start_vport(struct qed_dev *cdev,
start.vport_id, start.mtu); start.vport_id, start.mtu);
} }
if (params->clear_stats)
qed_reset_vport_stats(cdev); qed_reset_vport_stats(cdev);
return 0; return 0;
......
...@@ -3231,7 +3231,7 @@ static int qede_stop_queues(struct qede_dev *edev) ...@@ -3231,7 +3231,7 @@ static int qede_stop_queues(struct qede_dev *edev)
return rc; 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 rc, tc, i;
int vlan_removal_en = 1; int vlan_removal_en = 1;
...@@ -3462,6 +3462,7 @@ static void qede_unload(struct qede_dev *edev, enum qede_unload_mode mode) ...@@ -3462,6 +3462,7 @@ static void qede_unload(struct qede_dev *edev, enum qede_unload_mode mode)
enum qede_load_mode { enum qede_load_mode {
QEDE_LOAD_NORMAL, QEDE_LOAD_NORMAL,
QEDE_LOAD_RELOAD,
}; };
static int qede_load(struct qede_dev *edev, enum qede_load_mode mode) 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) ...@@ -3500,7 +3501,7 @@ static int qede_load(struct qede_dev *edev, enum qede_load_mode mode)
goto err3; goto err3;
DP_INFO(edev, "Setup IRQs succeeded\n"); DP_INFO(edev, "Setup IRQs succeeded\n");
rc = qede_start_queues(edev); rc = qede_start_queues(edev, mode != QEDE_LOAD_RELOAD);
if (rc) if (rc)
goto err4; goto err4;
DP_INFO(edev, "Start VPORT, RXQ and TXQ succeeded\n"); DP_INFO(edev, "Start VPORT, RXQ and TXQ succeeded\n");
...@@ -3555,7 +3556,7 @@ void qede_reload(struct qede_dev *edev, ...@@ -3555,7 +3556,7 @@ void qede_reload(struct qede_dev *edev,
if (func) if (func)
func(edev, args); func(edev, args);
qede_load(edev, QEDE_LOAD_NORMAL); qede_load(edev, QEDE_LOAD_RELOAD);
mutex_lock(&edev->qede_lock); mutex_lock(&edev->qede_lock);
qede_config_rx_mode(edev->ndev); qede_config_rx_mode(edev->ndev);
......
...@@ -49,6 +49,7 @@ struct qed_start_vport_params { ...@@ -49,6 +49,7 @@ struct qed_start_vport_params {
bool drop_ttl0; bool drop_ttl0;
u8 vport_id; u8 vport_id;
u16 mtu; u16 mtu;
bool clear_stats;
}; };
struct qed_stop_rxq_params { struct qed_stop_rxq_params {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment