Commit 2b07f0d2 authored by David S. Miller's avatar David S. Miller

Merge branch 'qlcnic'

Manish Chopra says:

====================
qlcnic: Bug fixes.

This patch series contains following bug fixes:

* Fixes related to ethtool statistics.
* Fix for flash read related API.

Please apply this series to 'net'.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents d61746b2 3456399b
...@@ -1177,8 +1177,7 @@ static void qlcnic_83xx_setup_idc_parameters(struct qlcnic_adapter *adapter) ...@@ -1177,8 +1177,7 @@ static void qlcnic_83xx_setup_idc_parameters(struct qlcnic_adapter *adapter)
{ {
u32 idc_params, val; u32 idc_params, val;
if (qlcnic_83xx_lockless_flash_read32(adapter, if (qlcnic_83xx_flash_read32(adapter, QLC_83XX_IDC_FLASH_PARAM_ADDR,
QLC_83XX_IDC_FLASH_PARAM_ADDR,
(u8 *)&idc_params, 1)) { (u8 *)&idc_params, 1)) {
dev_info(&adapter->pdev->dev, dev_info(&adapter->pdev->dev,
"%s:failed to get IDC params from flash\n", __func__); "%s:failed to get IDC params from flash\n", __func__);
......
...@@ -1333,21 +1333,21 @@ static void qlcnic_get_ethtool_stats(struct net_device *dev, ...@@ -1333,21 +1333,21 @@ static void qlcnic_get_ethtool_stats(struct net_device *dev,
struct qlcnic_host_tx_ring *tx_ring; struct qlcnic_host_tx_ring *tx_ring;
struct qlcnic_esw_statistics port_stats; struct qlcnic_esw_statistics port_stats;
struct qlcnic_mac_statistics mac_stats; struct qlcnic_mac_statistics mac_stats;
int index, ret, length, size, tx_size, ring; int index, ret, length, size, ring;
char *p; char *p;
tx_size = adapter->drv_tx_rings * QLCNIC_TX_STATS_LEN; memset(data, 0, stats->n_stats * sizeof(u64));
memset(data, 0, tx_size * sizeof(u64));
for (ring = 0, index = 0; ring < adapter->drv_tx_rings; ring++) { for (ring = 0, index = 0; ring < adapter->drv_tx_rings; ring++) {
if (test_bit(__QLCNIC_DEV_UP, &adapter->state)) { if (adapter->is_up == QLCNIC_ADAPTER_UP_MAGIC) {
tx_ring = &adapter->tx_ring[ring]; tx_ring = &adapter->tx_ring[ring];
data = qlcnic_fill_tx_queue_stats(data, tx_ring); data = qlcnic_fill_tx_queue_stats(data, tx_ring);
qlcnic_update_stats(adapter); qlcnic_update_stats(adapter);
} else {
data += QLCNIC_TX_STATS_LEN;
} }
} }
memset(data, 0, stats->n_stats * sizeof(u64));
length = QLCNIC_STATS_LEN; length = QLCNIC_STATS_LEN;
for (index = 0; index < length; index++) { for (index = 0; index < length; index++) {
p = (char *)adapter + qlcnic_gstrings_stats[index].stat_offset; p = (char *)adapter + qlcnic_gstrings_stats[index].stat_offset;
......
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