Skip to content

Commit 2b07f0d

Browse files
committed
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: David S. Miller <davem@davemloft.net>
2 parents d61746b + 3456399 commit 2b07f0d

2 files changed

Lines changed: 7 additions & 8 deletions

File tree

‎drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,9 +1177,8 @@ static void qlcnic_83xx_setup_idc_parameters(struct qlcnic_adapter *adapter)
11771177
{
11781178
u32 idc_params, val;
11791179

1180-
if (qlcnic_83xx_lockless_flash_read32(adapter,
1181-
QLC_83XX_IDC_FLASH_PARAM_ADDR,
1182-
(u8 *)&idc_params, 1)) {
1180+
if (qlcnic_83xx_flash_read32(adapter, QLC_83XX_IDC_FLASH_PARAM_ADDR,
1181+
(u8 *)&idc_params, 1)) {
11831182
dev_info(&adapter->pdev->dev,
11841183
"%s:failed to get IDC params from flash\n", __func__);
11851184
adapter->dev_init_timeo = QLC_83XX_IDC_INIT_TIMEOUT_SECS;

‎drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1333,21 +1333,21 @@ static void qlcnic_get_ethtool_stats(struct net_device *dev,
13331333
struct qlcnic_host_tx_ring *tx_ring;
13341334
struct qlcnic_esw_statistics port_stats;
13351335
struct qlcnic_mac_statistics mac_stats;
1336-
int index, ret, length, size, tx_size, ring;
1336+
int index, ret, length, size, ring;
13371337
char *p;
13381338

1339-
tx_size = adapter->drv_tx_rings * QLCNIC_TX_STATS_LEN;
1339+
memset(data, 0, stats->n_stats * sizeof(u64));
13401340

1341-
memset(data, 0, tx_size * sizeof(u64));
13421341
for (ring = 0, index = 0; ring < adapter->drv_tx_rings; ring++) {
1343-
if (test_bit(__QLCNIC_DEV_UP, &adapter->state)) {
1342+
if (adapter->is_up == QLCNIC_ADAPTER_UP_MAGIC) {
13441343
tx_ring = &adapter->tx_ring[ring];
13451344
data = qlcnic_fill_tx_queue_stats(data, tx_ring);
13461345
qlcnic_update_stats(adapter);
1346+
} else {
1347+
data += QLCNIC_TX_STATS_LEN;
13471348
}
13481349
}
13491350

1350-
memset(data, 0, stats->n_stats * sizeof(u64));
13511351
length = QLCNIC_STATS_LEN;
13521352
for (index = 0; index < length; index++) {
13531353
p = (char *)adapter + qlcnic_gstrings_stats[index].stat_offset;

0 commit comments

Comments
 (0)