svn commit: r304847 - stable/9/sys/ofed/drivers/infiniband/core
Hans Petter Selasky
hselasky at FreeBSD.org
Fri Aug 26 12:08:28 UTC 2016
Author: hselasky
Date: Fri Aug 26 12:08:27 2016
New Revision: 304847
URL: https://svnweb.freebsd.org/changeset/base/304847
Log:
MFC r304342:
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 at outlook.com>
Sponsored by: Mellanox Technologies
Modified:
stable/9/sys/ofed/drivers/infiniband/core/ucma.c
Directory Properties:
stable/9/sys/ (props changed)
Modified: stable/9/sys/ofed/drivers/infiniband/core/ucma.c
==============================================================================
--- stable/9/sys/ofed/drivers/infiniband/core/ucma.c Fri Aug 26 12:06:43 2016 (r304846)
+++ stable/9/sys/ofed/drivers/infiniband/core/ucma.c Fri Aug 26 12:08:27 2016 (r304847)
@@ -39,6 +39,8 @@
#include <linux/in6.h>
#include <linux/miscdevice.h>
+#include <sys/filio.h>
+
#include <rdma/rdma_user_cm.h>
#include <rdma/ib_marshall.h>
#include <rdma/rdma_cm.h>
@@ -1285,11 +1287,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,
};
More information about the svn-src-stable-9
mailing list