From owner-svn-src-stable-11@freebsd.org Fri Aug 26 12:04:33 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12457A93B15; Fri, 26 Aug 2016 12:04:33 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D79D3C8D; Fri, 26 Aug 2016 12:04:32 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7QC4WE8093244; Fri, 26 Aug 2016 12:04:32 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7QC4WnF093243; Fri, 26 Aug 2016 12:04:32 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201608261204.u7QC4WnF093243@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 26 Aug 2016 12:04:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r304845 - stable/11/sys/ofed/drivers/infiniband/core X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Aug 2016 12:04:33 -0000 Author: hselasky Date: Fri Aug 26 12:04:31 2016 New Revision: 304845 URL: https://svnweb.freebsd.org/changeset/base/304845 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 Sponsored by: Mellanox Technologies Modified: stable/11/sys/ofed/drivers/infiniband/core/ucma.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ofed/drivers/infiniband/core/ucma.c ============================================================================== --- stable/11/sys/ofed/drivers/infiniband/core/ucma.c Fri Aug 26 10:06:24 2016 (r304844) +++ stable/11/sys/ofed/drivers/infiniband/core/ucma.c Fri Aug 26 12:04:31 2016 (r304845) @@ -42,6 +42,8 @@ #include #include +#include + #include #include #include @@ -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, };