forked from Minki/linux
Merge branch 'cxgb4-fixes'
Hariprasad Shenai says: ==================== cxgb4: Fix tx flit calculation and wc stat configuration 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. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
9b57ab8b58
@ -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;
|
||||
|
||||
|
@ -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) +
|
||||
|
Loading…
Reference in New Issue
Block a user