diff options
| author | David S. Miller <davem@davemloft.net> | 2014-03-14 22:44:19 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2014-03-14 22:44:19 -0400 |
| commit | 1c79a5a8f4faec88f9f4632d0ef9b0365bff8e28 (patch) | |
| tree | b7552ee535f565d5a83039ed976a442c7f869402 | |
| parent | 57a7744e09867ebcfa0ccf1d6d529caa7728d552 (diff) | |
| parent | 05eb23893c2cf9502a9cec0c32e7f1d1ed2895c8 (diff) | |
Merge branch 'cxgb4-next'
Hariprasad Shenai says:
====================
Doorbell drop Avoidance Bug fix for iw_cxgb4
This patch series provides fixes for Chelsio T4/T5 adapters
related to DB Drop avoidance and other small fix related to keepalive on
iw-cxgb4.
The patches series is created against David Miller's 'net-next' tree.
And includes patches on cxgb4 and iw_cxgb4 driver.
We would like to request this patch series to get merged via David Miller's
'net-next' tree.
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>
| -rw-r--r-- | drivers/infiniband/hw/cxgb4/cm.c | 24 | ||||
| -rw-r--r-- | drivers/infiniband/hw/cxgb4/device.c | 177 | ||||
| -rw-r--r-- | drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 9 | ||||
| -rw-r--r-- | drivers/infiniband/hw/cxgb4/provider.c | 43 | ||||
| -rw-r--r-- | drivers/infiniband/hw/cxgb4/qp.c | 140 | ||||
| -rw-r--r-- | drivers/infiniband/hw/cxgb4/t4.h | 6 | ||||
| -rw-r--r-- | drivers/infiniband/hw/cxgb4/user.h | 5 | ||||
| -rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 1 | ||||
| -rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 87 | ||||
| -rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/sge.c | 8 | ||||
| -rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/t4_msg.h | 1 |
11 files changed, 299 insertions, 202 deletions
diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c index d286bdebe2ab..7e98a58aacfd 100644 --- a/drivers/infiniband/hw/cxgb4/cm.c +++ b/drivers/infiniband/hw/cxgb4/cm.c | |||
| @@ -1647,6 +1647,15 @@ static inline int act_open_has_tid(int status) | |||
| 1647 | status != CPL_ERR_ARP_MISS; | 1647 | status != CPL_ERR_ARP_MISS; |
| 1648 | } | 1648 | } |
| 1649 | 1649 | ||
| 1650 | /* Returns whether a CPL status conveys negative advice. | ||
| 1651 | */ | ||
| 1652 | static int is_neg_adv(unsigned int status) | ||
| 1653 | { | ||
| 1654 | return status == CPL_ERR_RTX_NEG_ADVICE || | ||
| 1655 | status == CPL_ERR_PERSIST_NEG_ADVICE || | ||
| 1656 | status == CPL_ERR_KEEPALV_NEG_ADVICE; | ||
| 1657 | } | ||
| 1658 | |||
| 1650 | #define ACT_OPEN_RETRY_COUNT 2 | 1659 | #define ACT_OPEN_RETRY_COUNT 2 |
| 1651 | 1660 | ||
| 1652 | static int import_ep(struct c4iw_ep *ep, int iptype, __u8 *peer_ip, | 1661 | static int import_ep(struct c4iw_ep *ep, int iptype, __u8 *peer_ip, |
| @@ -1835,7 +1844,7 @@ static int act_open_rpl(struct c4iw_dev *dev, struct sk_buff *skb) | |||
| 1835 | PDBG("%s ep %p atid %u status %u errno %d\n", __func__, ep, atid, | 1844 | PDBG("%s ep %p atid %u status %u errno %d\n", __func__, ep, atid, |
| 1836 | status, status2errno(status)); | 1845 | status, status2errno(status)); |
| 1837 | 1846 | ||
| 1838 | if (status == CPL_ERR_RTX_NEG_ADVICE) { | 1847 | if (is_neg_adv(status)) { |
| 1839 | printk(KERN_WARNING MOD "Connection problems for atid %u\n", | 1848 | printk(KERN_WARNING MOD "Connection problems for atid %u\n", |
| 1840 | atid); | 1849 | atid); |
| 1841 | return 0; | 1850 | return 0; |
| @@ -2265,15 +2274,6 @@ static int peer_close(struct c4iw_dev *dev, struct sk_buff *skb) | |||
| 2265 | return 0; | 2274 | return 0; |
| 2266 | } | 2275 | } |
| 2267 | 2276 | ||
| 2268 | /* | ||
| 2269 | * Returns whether an ABORT_REQ_RSS message is a negative advice. | ||
| 2270 | */ | ||
| 2271 | static int is_neg_adv_abort(unsigned int status) | ||
| 2272 | { | ||
| 2273 | return status == CPL_ERR_RTX_NEG_ADVICE || | ||
| 2274 | status == CPL_ERR_PERSIST_NEG_ADVICE; | ||
| 2275 | } | ||
| 2276 | |||
| 2277 | static int peer_abort(struct c4iw_dev *dev, struct sk_buff *skb) | 2277 | static int peer_abort(struct c4iw_dev *dev, struct sk_buff *skb) |
| 2278 | { | 2278 | { |
| 2279 | struct cpl_abort_req_rss *req = cplhdr(skb); | 2279 | struct cpl_abort_req_rss *req = cplhdr(skb); |
| @@ -2287,7 +2287,7 @@ static int peer_abort(struct c4iw_dev *dev, struct sk_buff *skb) | |||
| 2287 | unsigned int tid = GET_TID(req); | 2287 | unsigned int tid = GET_TID(req); |
| 2288 | 2288 | ||
| 2289 | ep = lookup_tid(t, tid); | 2289 | ep = lookup_tid(t, tid); |
| 2290 | if (is_neg_adv_abort(req->status)) { | 2290 | if (is_neg_adv(req->status)) { |
| 2291 | PDBG("%s neg_adv_abort ep %p tid %u\n", __func__, ep, | 2291 | PDBG("%s neg_adv_abort ep %p tid %u\n", __func__, ep, |
| 2292 | ep->hwtid); | 2292 | ep->hwtid); |
| 2293 | return 0; | 2293 | return 0; |
| @@ -3570,7 +3570,7 @@ static int peer_abort_intr(struct c4iw_dev *dev, struct sk_buff *skb) | |||
| 3570 | kfree_skb(skb); | 3570 | kfree_skb(skb); |
| 3571 | return 0; | 3571 | return 0; |
| 3572 | } | 3572 | } |
| 3573 | if (is_neg_adv_abort(req->status)) { | 3573 | if (is_neg_adv(req->status)) { |
| 3574 | PDBG("%s neg_adv_abort ep %p tid %u\n", __func__, ep, | 3574 | PDBG("%s neg_adv_abort ep %p tid %u\n", __func__, ep, |
| 3575 | ep->hwtid); | 3575 | ep->hwtid); |
| 3576 | kfree_skb(skb); | 3576 | kfree_skb(skb); |
diff --git a/drivers/infiniband/hw/cxgb4/device.c b/drivers/infiniband/hw/cxgb4/device.c index 4a033853312e..ba7335fd4ebf 100644 --- a/drivers/infiniband/hw/cxgb4/device.c +++ b/drivers/infiniband/hw/cxgb4/device.c | |||
| @@ -64,6 +64,10 @@ struct uld_ctx { | |||
| 64 | static LIST_HEAD(uld_ctx_list); | 64 | static LIST_HEAD(uld_ctx_list); |
| 65 | static DEFINE_MUTEX(dev_mutex); | 65 | static DEFINE_MUTEX(dev_mutex); |
| 66 | 66 | ||
| 67 | #define DB_FC_RESUME_SIZE 64 | ||
| 68 | #define DB_FC_RESUME_DELAY 1 | ||
| 69 | #define DB_FC_DRAIN_THRESH 0 | ||
| 70 | |||
| 67 | static struct dentry *c4iw_debugfs_root; | 71 | static struct dentry *c4iw_debugfs_root; |
| 68 | 72 | ||
| 69 | struct c4iw_debugfs_data { | 73 | struct c4iw_debugfs_data { |
| @@ -282,7 +286,7 @@ static const struct file_operations stag_debugfs_fops = { | |||
| 282 | .llseek = default_llseek, | 286 | .llseek = default_llseek, |
| 283 | }; | 287 | }; |
| 284 | 288 | ||
| 285 | static char *db_state_str[] = {"NORMAL", "FLOW_CONTROL", "RECOVERY"}; | 289 | static char *db_state_str[] = {"NORMAL", "FLOW_CONTROL", "RECOVERY", "STOPPED"}; |
| 286 | 290 | ||
| 287 | static int stats_show(struct seq_file *seq, void *v) | 291 | static int stats_show(struct seq_file *seq, void *v) |
| 288 | { | 292 | { |
| @@ -311,9 +315,10 @@ static int stats_show(struct seq_file *seq, void *v) | |||
| 311 | seq_printf(seq, " DB FULL: %10llu\n", dev->rdev.stats.db_full); | 315 | seq_printf(seq, " DB FULL: %10llu\n", dev->rdev.stats.db_full); |
| 312 | seq_printf(seq, " DB EMPTY: %10llu\n", dev->rdev.stats.db_empty); | 316 | seq_printf(seq, " DB EMPTY: %10llu\n", dev->rdev.stats.db_empty); |
| 313 | seq_printf(seq, " DB DROP: %10llu\n", dev->rdev.stats.db_drop); | 317 | seq_printf(seq, " DB DROP: %10llu\n", dev->rdev.stats.db_drop); |
| 314 | seq_printf(seq, " DB State: %s Transitions %llu\n", | 318 | seq_printf(seq, " DB State: %s Transitions %llu FC Interruptions %llu\n", |
| 315 | db_state_str[dev->db_state], | 319 | db_state_str[dev->db_state], |
| 316 | dev->rdev.stats.db_state_transitions); | 320 | dev->rdev.stats.db_state_transitions, |
| 321 | dev->rdev.stats.db_fc_interruptions); | ||
| 317 | seq_printf(seq, "TCAM_FULL: %10llu\n", dev->rdev.stats.tcam_full); | 322 | seq_printf(seq, "TCAM_FULL: %10llu\n", dev->rdev.stats.tcam_full); |
| 318 | seq_printf(seq, "ACT_OFLD_CONN_FAILS: %10llu\n", | 323 | seq_printf(seq, "ACT_OFLD_CONN_FAILS: %10llu\n", |
| 319 | dev->rdev.stats.act_ofld_conn_fails); | 324 | dev->rdev.stats.act_ofld_conn_fails); |
| @@ -643,6 +648,12 @@ static int c4iw_rdev_open(struct c4iw_rdev *rdev) | |||
| 643 | printk(KERN_ERR MOD "error %d initializing ocqp pool\n", err); | 648 | printk(KERN_ERR MOD "error %d initializing ocqp pool\n", err); |
| 644 | goto err4; | 649 | goto err4; |
| 645 | } | 650 | } |
| 651 | rdev->status_page = (struct t4_dev_status_page *) | ||
| 652 | __get_free_page(GFP_KERNEL); | ||
| 653 | if (!rdev->status_page) { | ||
| 654 | pr_err(MOD "error allocating status page\n"); | ||
| 655 | goto err4; | ||
| 656 | } | ||
| 646 | return 0; | 657 | return 0; |
| 647 | err4: | 658 | err4: |
| 648 | c4iw_rqtpool_destroy(rdev); | 659 | c4iw_rqtpool_destroy(rdev); |
| @@ -656,6 +667,7 @@ err1: | |||
| 656 | 667 | ||
| 657 | static void c4iw_rdev_close(struct c4iw_rdev *rdev) | 668 | static void c4iw_rdev_close(struct c4iw_rdev *rdev) |
| 658 | { | 669 | { |
| 670 | free_page((unsigned long)rdev->status_page); | ||
| 659 | c4iw_pblpool_destroy(rdev); | 671 | c4iw_pblpool_destroy(rdev); |
| 660 | c4iw_rqtpool_destroy(rdev); | 672 | c4iw_rqtpool_destroy(rdev); |
| 661 | c4iw_destroy_resource(&rdev->resource); | 673 | c4iw_destroy_resource(&rdev->resource); |
| @@ -703,18 +715,6 @@ static struct c4iw_dev *c4iw_alloc(const struct cxgb4_lld_info *infop) | |||
| 703 | pr_info("%s: On-Chip Queues not supported on this device.\n", | 715 | pr_info("%s: On-Chip Queues not supported on this device.\n", |
| 704 | pci_name(infop->pdev)); | 716 | pci_name(infop->pdev)); |
| 705 | 717 | ||
| 706 | if (!is_t4(infop->adapter_type)) { | ||
| 707 | if (!allow_db_fc_on_t5) { | ||
| 708 | db_fc_threshold = 100000; | ||
| 709 | pr_info("DB Flow Control Disabled.\n"); | ||
| 710 | } | ||
| 711 | |||
| 712 | if (!allow_db_coalescing_on_t5) { | ||
| 713 | db_coalescing_threshold = -1; | ||
| 714 | pr_info("DB Coalescing Disabled.\n"); | ||
| 715 | } | ||
| 716 | } | ||
| 717 | |||
| 718 | devp = (struct c4iw_dev *)ib_alloc_device(sizeof(*devp)); | 718 | devp = (struct c4iw_dev *)ib_alloc_device(sizeof(*devp)); |
| 719 | if (!devp) { | 719 | if (!devp) { |
| 720 | printk(KERN_ERR MOD "Cannot allocate ib device\n"); | 720 | printk(KERN_ERR MOD "Cannot allocate ib device\n"); |
| @@ -749,6 +749,7 @@ static struct c4iw_dev *c4iw_alloc(const struct cxgb4_lld_info *infop) | |||
| 749 | spin_lock_init(&devp->lock); | 749 | spin_lock_init(&devp->lock); |
| 750 | mutex_init(&devp->rdev.stats.lock); | 750 | mutex_init(&devp->rdev.stats.lock); |
