[openib-general] [PATCH] ofed_1_2 iw_cxgb3: allow doorbell mappings with VM_READ set.

Steve Wise swise at opengridcomputing.com
Wed Jan 24 06:51:54 PST 2007


iw_cxgb3: allow doorbell mappings with VM_READ set.

This is needed on RHEL4U4.  The vma passed into the iw_cxgb3 mmap function
has VM_READ set even though the library only request write. 

Signed-off-by: Steve Wise <swise at opengridcomputing.com>
---

 .../2.6.9_U4/iwch_provider_to_2.6.9_U4.patch       |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/kernel_patches/backport/2.6.9_U4/iwch_provider_to_2.6.9_U4.patch b/kernel_patches/backport/2.6.9_U4/iwch_provider_to_2.6.9_U4.patch
new file mode 100644
index 0000000..1fbc717
--- /dev/null
+++ b/kernel_patches/backport/2.6.9_U4/iwch_provider_to_2.6.9_U4.patch
@@ -0,0 +1,16 @@
+--- a/drivers/infiniband/hw/cxgb3/iwch_provider.c	2007-01-17 09:22:39.000000000 -0600
++++ b/drivers/infiniband/hw/cxgb3/iwch_provider.c	2007-01-22 17:46:16.000000000 -0600
+@@ -337,13 +337,6 @@ static int iwch_mmap(struct ib_ucontext 
+ 	    (pgaddr < (rdev_p->rnic_info.udbell_physbase +
+ 		       rdev_p->rnic_info.udbell_len))) {
+ 
+-		/*
+-		 * Map T3 DB register.
+-		 */
+-		if (vma->vm_flags & VM_READ) {
+-                	return -EPERM;
+-		}
+-
+ 		vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
+ 		vma->vm_flags |= VM_DONTCOPY | VM_DONTEXPAND;
+ 		vma->vm_flags &= ~VM_MAYREAD;





More information about the general mailing list