Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -1177,8 +1177,7 @@ static void qlcnic_83xx_setup_idc_parameters(struct qlcnic_adapter *adapter)
{
	u32 idc_params, val;

	if (qlcnic_83xx_lockless_flash_read32(adapter,
					      QLC_83XX_IDC_FLASH_PARAM_ADDR,
	if (qlcnic_83xx_flash_read32(adapter, QLC_83XX_IDC_FLASH_PARAM_ADDR,
				     (u8 *)&idc_params, 1)) {
		dev_info(&adapter->pdev->dev,
			 "%s:failed to get IDC params from flash\n", __func__);
+5 −5
Original line number Diff line number Diff line
@@ -1333,21 +1333,21 @@ static void qlcnic_get_ethtool_stats(struct net_device *dev,
	struct qlcnic_host_tx_ring *tx_ring;
	struct qlcnic_esw_statistics port_stats;
	struct qlcnic_mac_statistics mac_stats;
	int index, ret, length, size, tx_size, ring;
	int index, ret, length, size, ring;
	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++) {
		if (test_bit(__QLCNIC_DEV_UP, &adapter->state)) {
		if (adapter->is_up == QLCNIC_ADAPTER_UP_MAGIC) {
			tx_ring = &adapter->tx_ring[ring];
			data = qlcnic_fill_tx_queue_stats(data, tx_ring);
			qlcnic_update_stats(adapter);
		} else {
			data += QLCNIC_TX_STATS_LEN;
		}
	}

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