linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] IB/hfi1: Remove write() and use ioctl() for user access
@ 2016-04-14 15:41 Dennis Dalessandro
  2016-04-14 15:41 ` [PATCH 1/7] IB/hfi1: Export drivers user sw version via sysfs Dennis Dalessandro
                   ` (7 more replies)
  0 siblings, 8 replies; 38+ messages in thread
From: Dennis Dalessandro @ 2016-04-14 15:41 UTC (permalink / raw)
  To: dledford; +Cc: linux-rdma, linux-fsdevel, torvalds, viro, linux-kernel

This patch series removes the write() interface for user access in favor of an
ioctl() based approach. This is in response to the complaint that we had
different handlers for write() and writev() doing different things and expecting
different types of data. See:

http://www.spinics.net/lists/linux-rdma/msg34451.html

In a response to that thread we mentioned some other possible approaches such
as using multiple files, or converting everything to writev(). However after
looking at things more it seemed a cleaner approach to use ioctl(). 

So each command that was being done through write() has been converted to
ioctl() and the write() interface is removed. We still use writev() for the data
path but control is done totally through ioctl().

The plan is to make the same sort of change in qib as well but we want to get
the opinion of the community on the approach first.

As part of this work I also decided to move the eprom functionality to its own
device (last patch) since it really is its own thing. It uses ioctl() as well,
again because it seems to be a more natural interface for this operation.

There is also a driver software version being exported via a sysfs file. This is
needed so that user space applications (psm) can  determine if it needs to do
ioctl() or write().

This patch applies on the latest hfi1 patch set "Fix link and other issues".

Patches can also be viewed on GitHub at:
https://github.com/ddalessa/kernel/tree/for-4.7

---

Dennis Dalessandro (7):
      IB/hfi1: Export drivers user sw version via sysfs
      IB/hfi1: Remove unused user command
      IB/hfi1: Add ioctl() interface for user commands
      IB/hfi1: Remove write(), use ioctl() for user cmds
      IB/hfi1: Add trace message in user IOCTL handling
      IB/hfi1: Consolidate IOCTL defines
      IB/hfi1: Move eprom to its own device


 drivers/staging/rdma/hfi1/common.h   |    3 
 drivers/staging/rdma/hfi1/diag.c     |  170 ++++++++++++++++++---------
 drivers/staging/rdma/hfi1/eprom.c    |  121 +------------------
 drivers/staging/rdma/hfi1/eprom.h    |   16 ++-
 drivers/staging/rdma/hfi1/file_ops.c |  213 ++++++++++++++--------------------
 drivers/staging/rdma/hfi1/hfi.h      |   22 +++-
 drivers/staging/rdma/hfi1/sysfs.c    |    8 +
 drivers/staging/rdma/hfi1/trace.c    |    1 
 drivers/staging/rdma/hfi1/trace.h    |    1 
 include/uapi/rdma/hfi/hfi1_user.h    |  106 ++++++++++++++++-
 10 files changed, 350 insertions(+), 311 deletions(-)

-- 
-Denny

^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2016-04-19 18:40 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-14 15:41 [PATCH 0/7] IB/hfi1: Remove write() and use ioctl() for user access Dennis Dalessandro
2016-04-14 15:41 ` [PATCH 1/7] IB/hfi1: Export drivers user sw version via sysfs Dennis Dalessandro
2016-04-18 13:05   ` Christoph Hellwig
2016-04-14 15:41 ` [PATCH 2/7] IB/hfi1: Remove unused user command Dennis Dalessandro
2016-04-18 13:05   ` Christoph Hellwig
2016-04-14 15:41 ` [PATCH 3/7] IB/hfi1: Add ioctl() interface for user commands Dennis Dalessandro
2016-04-14 15:41 ` [PATCH 4/7] IB/hfi1: Remove write(), use ioctl() for user cmds Dennis Dalessandro
2016-04-14 15:42 ` [PATCH 5/7] IB/hfi1: Add trace message in user IOCTL handling Dennis Dalessandro
2016-04-14 15:42 ` [PATCH 6/7] IB/hfi1: Consolidate IOCTL defines Dennis Dalessandro
2016-04-14 15:42 ` [PATCH 7/7] IB/hfi1: Move eprom to its own device Dennis Dalessandro
2016-04-14 16:45 ` [PATCH 0/7] IB/hfi1: Remove write() and use ioctl() for user access Jason Gunthorpe
2016-04-14 17:48   ` Ira Weiny
2016-04-14 18:05     ` Jason Gunthorpe
2016-04-14 18:42       ` Dennis Dalessandro
2016-04-14 18:56         ` Jason Gunthorpe
2016-04-15  4:01     ` Leon Romanovsky
2016-04-15 16:17       ` Ira Weiny
2016-04-15 17:30         ` Leon Romanovsky
2016-04-15 17:34           ` Christoph Hellwig
2016-04-15 17:44             ` Woodruff, Robert J
2016-04-15 21:03               ` Leon Romanovsky
2016-04-15 17:46             ` Hefty, Sean
2016-04-15 21:23             ` Leon Romanovsky
2016-04-15 23:28               ` Ira Weiny
2016-04-16  6:09                 ` Leon Romanovsky
2016-04-16 15:29                   ` Dennis Dalessandro
2016-04-15 23:37               ` Jason Gunthorpe
2016-04-16  6:00                 ` Leon Romanovsky
2016-04-16 19:19                   ` Al Viro
2016-04-18 12:00                     ` Dennis Dalessandro
2016-04-14 17:52   ` Dennis Dalessandro
2016-04-14 18:46     ` Jason Gunthorpe
2016-04-18 13:09   ` Christoph Hellwig
2016-04-18 17:40     ` Jason Gunthorpe
2016-04-18 18:24       ` Christoph Hellwig
2016-04-19  3:45         ` Ira Weiny
2016-04-19 18:40           ` Christoph Hellwig
2016-04-19 17:38         ` Jason Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).