]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[IB] mthca: Report correct atomic capability
authorJack Morgenstein <jackm@mellanox.co.il>
Mon, 26 Sep 2005 19:30:02 +0000 (12:30 -0700)
committerRoland Dreier <rolandd@cisco.com>
Mon, 17 Oct 2005 22:20:24 +0000 (15:20 -0700)
Return correct atomic capability flag from mthca query function.

Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/mthca/mthca_dev.h
drivers/infiniband/hw/mthca/mthca_main.c
drivers/infiniband/hw/mthca/mthca_provider.c

index 7bff5a8425f4e5c5fbd7eb634a78b13eb8a3b88f..67a2f324a2749f9b52dd9e46046f07ccb0ecf1e5 100644 (file)
@@ -148,6 +148,7 @@ struct mthca_limits {
        int      reserved_mcgs;
        int      num_pds;
        int      reserved_pds;
+       u32      flags;
        u8       port_width_cap;
 };
 
index 23a3f56c78995ee8a21078544da3ab9b1bbda22a..576e7fcd053cd3043bbfe460d8b54adc82074c48 100644 (file)
@@ -172,6 +172,7 @@ static int __devinit mthca_dev_lim(struct mthca_dev *mdev, struct mthca_dev_lim
        mdev->limits.reserved_uars      = dev_lim->reserved_uars;
        mdev->limits.reserved_pds       = dev_lim->reserved_pds;
        mdev->limits.port_width_cap     = dev_lim->max_port_width;
+       mdev->limits.flags              = dev_lim->flags;
 
        /* IB_DEVICE_RESIZE_MAX_WR not supported by driver.
           May be doable since hardware supports it for SRQ.
index 3f5319a46577022378e1142ff2dbaa13bd42a71a..141509dced7ebf2a6f808578e46767526b554ba1 100644 (file)
@@ -99,6 +99,8 @@ static int mthca_query_device(struct ib_device *ibdev,
        props->max_qp_rd_atom      = 1 << mdev->qp_table.rdb_shift;
        props->max_qp_init_rd_atom = 1 << mdev->qp_table.rdb_shift;
        props->local_ca_ack_delay  = mdev->limits.local_ca_ack_delay;
+       props->atomic_cap          = mdev->limits.flags & DEV_LIM_FLAG_ATOMIC ? 
+                                       IB_ATOMIC_HCA : IB_ATOMIC_NONE;
 
        err = 0;
  out: