* [PATCH net 0/2] Fix tx flit calculation and wc stat configuration
@ 2015-09-08 10:55 Hariprasad Shenai
2015-09-08 10:55 ` [PATCH net 1/2] cxgb4: Fix tx flit calculation Hariprasad Shenai
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Hariprasad Shenai @ 2015-09-08 10:55 UTC (permalink / raw)
To: netdev; +Cc: davem, leedom, nirranjan, Hariprasad Shenai
Hi,
This patch series fixes the following:
Patch 1/2 fixes tx flit calculation, which if wrong can lead to
stall, hang, data corrpution, write combining failure. Patch 2/2 fixes
PCI-E write combining stats configuration.
This patch series has been created against net tree and includes
patches on cxgb4 driver.
We have included all the maintainers of respective drivers. Kindly review
the change and let us know in case of any review comments.
Thanks
Hariprasad Shenai (2):
cxgb4: Fix tx flit calculation
cxgb4: Fix for write-combining stats configuration
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 7 +++++--
drivers/net/ethernet/chelsio/cxgb4/sge.c | 2 +-
2 files changed, 6 insertions(+), 3 deletions(-)
--
2.3.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH net 1/2] cxgb4: Fix tx flit calculation
2015-09-08 10:55 [PATCH net 0/2] Fix tx flit calculation and wc stat configuration Hariprasad Shenai
@ 2015-09-08 10:55 ` Hariprasad Shenai
2015-09-08 10:55 ` [PATCH net 2/2] cxgb4: Fix for write-combining stats configuration Hariprasad Shenai
2015-09-09 19:29 ` [PATCH net 0/2] Fix tx flit calculation and wc stat configuration David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Hariprasad Shenai @ 2015-09-08 10:55 UTC (permalink / raw)
To: netdev; +Cc: davem, leedom, nirranjan, Hariprasad Shenai
In commit 0aac3f56d4a63f04 ("cxgb4: Add comment for calculate tx flits
and sge length code") introduced a regression where tx flit calculation
is going wrong, which can lead to data corruption, hang, stall and
write-combining failure. Fixing it.
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
---
drivers/net/ethernet/chelsio/cxgb4/sge.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/chelsio/cxgb4/sge.c b/drivers/net/ethernet/chelsio/cxgb4/sge.c
index 78f446c..9162746 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/sge.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/sge.c
@@ -807,7 +807,7 @@ static inline unsigned int calc_tx_flits(const struct sk_buff *skb)
* message or, if we're doing a Large Send Offload, an LSO CPL message
* with an embedded TX Packet Write CPL message.
*/
- flits = sgl_len(skb_shinfo(skb)->nr_frags + 1) + 4;
+ flits = sgl_len(skb_shinfo(skb)->nr_frags + 1);
if (skb_shinfo(skb)->gso_size)
flits += (sizeof(struct fw_eth_tx_pkt_wr) +
sizeof(struct cpl_tx_pkt_lso_core) +
--
2.3.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH net 2/2] cxgb4: Fix for write-combining stats configuration
2015-09-08 10:55 [PATCH net 0/2] Fix tx flit calculation and wc stat configuration Hariprasad Shenai
2015-09-08 10:55 ` [PATCH net 1/2] cxgb4: Fix tx flit calculation Hariprasad Shenai
@ 2015-09-08 10:55 ` Hariprasad Shenai
2015-09-09 19:29 ` [PATCH net 0/2] Fix tx flit calculation and wc stat configuration David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Hariprasad Shenai @ 2015-09-08 10:55 UTC (permalink / raw)
To: netdev; +Cc: davem, leedom, nirranjan, Hariprasad Shenai
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: Hariprasad Shenai <hariprasad@chelsio.com>
---
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index 592a4d6..f5dcde2 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -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;
--
2.3.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net 0/2] Fix tx flit calculation and wc stat configuration
2015-09-08 10:55 [PATCH net 0/2] Fix tx flit calculation and wc stat configuration Hariprasad Shenai
2015-09-08 10:55 ` [PATCH net 1/2] cxgb4: Fix tx flit calculation Hariprasad Shenai
2015-09-08 10:55 ` [PATCH net 2/2] cxgb4: Fix for write-combining stats configuration Hariprasad Shenai
@ 2015-09-09 19:29 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2015-09-09 19:29 UTC (permalink / raw)
To: hariprasad; +Cc: netdev, leedom, nirranjan
From: Hariprasad Shenai <hariprasad@chelsio.com>
Date: Tue, 8 Sep 2015 16:25:38 +0530
> This patch series fixes the following:
> Patch 1/2 fixes tx flit calculation, which if wrong can lead to
> stall, hang, data corrpution, write combining failure. Patch 2/2 fixes
> PCI-E write combining stats configuration.
>
> This patch series has been created against net tree and includes
> patches on cxgb4 driver.
>
> We have included all the maintainers of respective drivers. Kindly review
> the change and let us know in case of any review comments.
Series applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-09-09 19:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-08 10:55 [PATCH net 0/2] Fix tx flit calculation and wc stat configuration Hariprasad Shenai
2015-09-08 10:55 ` [PATCH net 1/2] cxgb4: Fix tx flit calculation Hariprasad Shenai
2015-09-08 10:55 ` [PATCH net 2/2] cxgb4: Fix for write-combining stats configuration Hariprasad Shenai
2015-09-09 19:29 ` [PATCH net 0/2] Fix tx flit calculation and wc stat configuration David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).