]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/infiniband/core/verbs.c
IB/core: Add "type 2" memory windows support
[karo-tx-linux.git] / drivers / infiniband / core / verbs.c
index 30f199e8579f4c9d6ea6885093c93c95b35c6c62..a8fdd3381405dc62aa92118954b83e7ec0fdb8db 100644 (file)
@@ -1099,18 +1099,19 @@ EXPORT_SYMBOL(ib_free_fast_reg_page_list);
 
 /* Memory windows */
 
-struct ib_mw *ib_alloc_mw(struct ib_pd *pd)
+struct ib_mw *ib_alloc_mw(struct ib_pd *pd, enum ib_mw_type type)
 {
        struct ib_mw *mw;
 
        if (!pd->device->alloc_mw)
                return ERR_PTR(-ENOSYS);
 
-       mw = pd->device->alloc_mw(pd);
+       mw = pd->device->alloc_mw(pd, type);
        if (!IS_ERR(mw)) {
                mw->device  = pd->device;
                mw->pd      = pd;
                mw->uobject = NULL;
+               mw->type    = type;
                atomic_inc(&pd->usecnt);
        }