[MTHCA] added returning max_avs for Tavor
authorleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 10 Jun 2008 16:21:02 +0000 (16:21 +0000)
committerleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 10 Jun 2008 16:21:02 +0000 (16:21 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@1260 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

hw/mthca/kernel/mthca_dev.h
hw/mthca/kernel/mthca_main.c

index e1d717a..7e6f12f 100644 (file)
@@ -166,6 +166,7 @@ struct mthca_limits {
        u32     page_size_cap;
        u32      flags;
        u8      port_width_cap;
+       u32      num_avs;
 };
 
 struct mthca_alloc {
index 3137a6b..fa299c0 100644 (file)
@@ -225,6 +225,7 @@ static int  mthca_dev_lim(struct mthca_dev *mdev, struct mthca_dev_lim *dev_lim)
        mdev->limits.port_width_cap     = (u8)dev_lim->max_port_width;
        mdev->limits.page_size_cap      = !(u32)(dev_lim->min_page_sz - 1);
        mdev->limits.flags                              = dev_lim->flags;
+       mdev->limits.num_avs = mthca_is_memfree(mdev) ? 0 : dev_lim->hca.tavor.max_avs;
 
        /* IB_DEVICE_RESIZE_MAX_WR not supported by driver.
           May be doable since hardware supports it for SRQ.