aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx4/main.c
diff options
context:
space:
mode:
authorJack Morgenstein <jackm@dev.mellanox.co.il>2012-05-30 05:14:53 -0400
committerDavid S. Miller <davem@davemloft.net>2012-05-31 18:18:16 -0400
commitb91cb3ebcd5ef8db956b8caa486d780dc52b07f1 (patch)
tree76aa23e2322dc4a6ea39778656688a85ea5b03f3 /drivers/net/ethernet/mellanox/mlx4/main.c
parent13bf58b7604d9adfebb8b7c95e6cfb31ec17c699 (diff)
net/mlx4_core: Fixes for VF / Guest startup flow
- pass the following parameters: - firmware version (added QUERY_FW paravirtualization for that) - disable Blueflame on slaves. KVM disables write combining on guests, and we get better performance without BF in this case. (This requires QUERY_DEV_CAP paravirtualization, also in this commit) - max qp rdma as destination - get rid of a chunk of "if (0)" dead code Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/main.c')
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/main.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c
index 2fe9fe5f7cfb..7f71be0ca5f2 100644
--- a/drivers/net/ethernet/mellanox/mlx4/main.c
+++ b/drivers/net/ethernet/mellanox/mlx4/main.c
@@ -430,12 +430,17 @@ static int mlx4_slave_cap(struct mlx4_dev *dev)
430 mlx4_log_num_mgm_entry_size = hca_param.log_mc_entry_sz; 430 mlx4_log_num_mgm_entry_size = hca_param.log_mc_entry_sz;
431 431
432 memset(&dev_cap, 0, sizeof(dev_cap)); 432 memset(&dev_cap, 0, sizeof(dev_cap));
433 dev->caps.max_qp_dest_rdma = 1 << hca_param.log_rd_per_qp;
433 err = mlx4_dev_cap(dev, &dev_cap); 434 err = mlx4_dev_cap(dev, &dev_cap);
434 if (err) { 435 if (err) {
435 mlx4_err(dev, "QUERY_DEV_CAP command failed, aborting.\n"); 436 mlx4_err(dev, "QUERY_DEV_CAP command failed, aborting.\n");
436 return err; 437 return err;
437 } 438 }
438 439
440 err = mlx4_QUERY_FW(dev);
441 if (err)
442 mlx4_err(dev, "QUERY_FW command failed: could not get FW version.\n");
443
439 page_size = ~dev->caps.page_size_cap + 1; 444 page_size = ~dev->caps.page_size_cap + 1;
440 mlx4_warn(dev, "HCA minimum page size:%d\n", page_size); 445 mlx4_warn(dev, "HCA minimum page size:%d\n", page_size);
441 if (page_size > PAGE_SIZE) { 446 if (page_size > PAGE_SIZE) {
@@ -499,18 +504,6 @@ static int mlx4_slave_cap(struct mlx4_dev *dev)
499 return -ENODEV; 504 return -ENODEV;
500 } 505 }
501 506
502#if 0
503 mlx4_warn(dev, "sqp_demux:%d\n", dev->caps.sqp_demux);
504 mlx4_warn(dev, "num_uars:%d reserved_uars:%d uar region:0x%x bar2:0x%llx\n",
505 dev->caps.num_uars, dev->caps.reserved_uars,
506 dev->caps.uar_page_size * dev->caps.num_uars,
507 pci_resource_len(dev->pdev, 2));
508 mlx4_warn(dev, "num_eqs:%d reserved_eqs:%d\n", dev->caps.num_eqs,
509 dev->caps.reserved_eqs);
510 mlx4_warn(dev, "num_pds:%d reserved_pds:%d slave_pd_shift:%d pd_base:%d\n",
511 dev->caps.num_pds, dev->caps.reserved_pds,
512 dev->caps.slave_pd_shift, dev->caps.pd_base);
513#endif
514 return 0; 507 return 0;
515} 508}
516 509