Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Aug 2016 08:49:02 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r304342 - head/sys/ofed/drivers/infiniband/core
Message-ID:  <201608180849.u7I8n2jc078503@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Thu Aug 18 08:49:02 2016
New Revision: 304342
URL: https://svnweb.freebsd.org/changeset/base/304342

Log:
  Add support for setting blocking and non-blocking mode on /dev/rdma_cm
  by returning success on FIONBIO and FIOASYNC IOCTLs. The actual flags
  handling is done by the kern_ioctl() function.
  
  Reported by:	Alex Bowden <alex.bowden@outlook.com>
  Sponsored by:	Mellanox Technologies
  MFC after:	1 week

Modified:
  head/sys/ofed/drivers/infiniband/core/ucma.c

Modified: head/sys/ofed/drivers/infiniband/core/ucma.c
==============================================================================
--- head/sys/ofed/drivers/infiniband/core/ucma.c	Thu Aug 18 08:47:06 2016	(r304341)
+++ head/sys/ofed/drivers/infiniband/core/ucma.c	Thu Aug 18 08:49:02 2016	(r304342)
@@ -42,6 +42,8 @@
 #include <linux/slab.h>
 #include <linux/module.h>
 
+#include <sys/filio.h>
+
 #include <rdma/rdma_user_cm.h>
 #include <rdma/ib_marshall.h>
 #include <rdma/rdma_cm.h>
@@ -1345,11 +1347,25 @@ static int ucma_close(struct inode *inod
 	return 0;
 }
 
+static long
+ucma_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
+{
+
+	switch (cmd) {
+	case FIONBIO:
+	case FIOASYNC:
+		return (0);
+	default:
+		return (-ENOTTY);
+	}
+}
+
 static const struct file_operations ucma_fops = {
 	.owner 	 = THIS_MODULE,
 	.open 	 = ucma_open,
 	.release = ucma_close,
 	.write	 = ucma_write,
+	.unlocked_ioctl = ucma_ioctl,
 	.poll    = ucma_poll,
 	.llseek	 = no_llseek,
 };



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201608180849.u7I8n2jc078503>