|
@@ -615,8 +615,15 @@ static struct rtnl_link_stats64 *enic_get_stats(struct net_device *netdev,
|
|
{
|
|
{
|
|
struct enic *enic = netdev_priv(netdev);
|
|
struct enic *enic = netdev_priv(netdev);
|
|
struct vnic_stats *stats;
|
|
struct vnic_stats *stats;
|
|
|
|
+ int err;
|
|
|
|
|
|
- enic_dev_stats_dump(enic, &stats);
|
|
|
|
|
|
+ err = enic_dev_stats_dump(enic, &stats);
|
|
|
|
+ /* return only when pci_zalloc_consistent fails in vnic_dev_stats_dump
|
|
|
|
+ * For other failures, like devcmd failure, we return previously
|
|
|
|
+ * recorded stats.
|
|
|
|
+ */
|
|
|
|
+ if (err == -ENOMEM)
|
|
|
|
+ return net_stats;
|
|
|
|
|
|
net_stats->tx_packets = stats->tx.tx_frames_ok;
|
|
net_stats->tx_packets = stats->tx.tx_frames_ok;
|
|
net_stats->tx_bytes = stats->tx.tx_bytes_ok;
|
|
net_stats->tx_bytes = stats->tx.tx_bytes_ok;
|
|
@@ -1407,6 +1414,7 @@ static int enic_poll_msix_rq(struct napi_struct *napi, int budget)
|
|
*/
|
|
*/
|
|
enic_calc_int_moderation(enic, &enic->rq[rq]);
|
|
enic_calc_int_moderation(enic, &enic->rq[rq]);
|
|
|
|
|
|
|
|
+ enic_poll_unlock_napi(&enic->rq[rq]);
|
|
if (work_done < work_to_do) {
|
|
if (work_done < work_to_do) {
|
|
|
|
|
|
/* Some work done, but not enough to stay in polling,
|
|
/* Some work done, but not enough to stay in polling,
|
|
@@ -1418,7 +1426,6 @@ static int enic_poll_msix_rq(struct napi_struct *napi, int budget)
|
|
enic_set_int_moderation(enic, &enic->rq[rq]);
|
|
enic_set_int_moderation(enic, &enic->rq[rq]);
|
|
vnic_intr_unmask(&enic->intr[intr]);
|
|
vnic_intr_unmask(&enic->intr[intr]);
|
|
}
|
|
}
|
|
- enic_poll_unlock_napi(&enic->rq[rq]);
|
|
|
|
|
|
|
|
return work_done;
|
|
return work_done;
|
|
}
|
|
}
|