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

Commit 2a485cf7 authored by Hariprasad Shenai's avatar Hariprasad Shenai Committed by David S. Miller
Browse files

cxgb4: Fix for write-combining stats configuration



The write-combining configuration register SGE_STAT_CFG_A needs to
be configured after FW initializes the adapter, else FW will reset
the configuration

Signed-off-by: default avatarHariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fd1754fb
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -4719,8 +4719,6 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
			err = -ENOMEM;
			goto out_free_adapter;
		}
		t4_write_reg(adapter, SGE_STAT_CFG_A,
			     STATSOURCE_T5_V(7) | STATMODE_V(0));
	}

	setup_memwin(adapter);
@@ -4732,6 +4730,11 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
	if (err)
		goto out_unmap_bar;

	/* configure SGE_STAT_CFG_A to read WC stats */
	if (!is_t4(adapter->params.chip))
		t4_write_reg(adapter, SGE_STAT_CFG_A,
			     STATSOURCE_T5_V(7) | STATMODE_V(0));

	for_each_port(adapter, i) {
		struct net_device *netdev;