Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1355529

Re: [PATCH v7] scsi: ufs: add ioctl interface for query request

From "Martin K. Petersen" <martin.petersen@oracle.com>
Newsgroups linux.kernel
Subject Re: [PATCH v7] scsi: ufs: add ioctl interface for query request
Date 2016-03-11 02:50 +0100
Message-ID <rbknf-79u-5@gated-at.bofh.it> (permalink)
References <raN7X-yK-3@gated-at.bofh.it> <raROh-3VS-11@gated-at.bofh.it> <rbcpI-1KE-9@gated-at.bofh.it> <rberw-312-19@gated-at.bofh.it>
Organization Oracle Corporation

Show all headers | View raw


>>>>> "Arnd" == Arnd Bergmann <arnd@arndb.de> writes:

Arnd> Looking through what other drivers do, I've found a couple of
Arnd> patterns now. n particular, most use the SG_IO ioctl to pass down
Arnd> commands from user space into a device specific command
Arnd> queue. Have you looked at that interface in the past to see if it
Arnd> would fit your use case?

Arnd> There is also a 'bsg' API that some drivers implement, which I
Arnd> think would be another alternative.

Arnd> Could any of the SCSI experts comment on what they expect a driver
Arnd> to use out of those three alternatives (if any):

My preference is that if you want to expose any information that a user
or admin would care about, put it in sysfs where it is easily accessible
and can be scripted.

For things that need to directly send commands to the hardware (to
configure vendor specific settings or inspect parameters for development
purposes) use the sg or bsg interfaces like we do for both ATA and
SCSI. bsg is newer and supports more features like bidirectional
commands. But for this particular use case I don't think it offers any
particular advantages over SG_IO. Both interfaces take the same
descriptors so it really doesn't matter much.

See:

	http://sg.danny.cz/sg/

-- 
Martin K. Petersen	Oracle Linux Engineering

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v7] scsi: ufs: add ioctl interface for query request Yaniv Gardi <ygardi@codeaurora.org> - 2016-03-09 15:20 +0100
  Re: [PATCH v7] scsi: ufs: add ioctl interface for query request Greg KH <gregkh@linuxfoundation.org> - 2016-03-09 17:30 +0100
    Re: [PATCH v7] scsi: ufs: add ioctl interface for query request ygardi@codeaurora.org - 2016-03-09 20:20 +0100
      Re: [PATCH v7] scsi: ufs: add ioctl interface for query request Greg KH <gregkh@linuxfoundation.org> - 2016-03-09 21:20 +0100
        Re: [PATCH v7] scsi: ufs: add ioctl interface for query request ygardi@codeaurora.org - 2016-03-09 22:00 +0100
          Re: [PATCH v7] scsi: ufs: add ioctl interface for query request Greg KH <gregkh@linuxfoundation.org> - 2016-03-09 23:50 +0100
            Re: [PATCH v7] scsi: ufs: add ioctl interface for query request ygardi@codeaurora.org - 2016-03-10 17:00 +0100
              Re: [PATCH v7] scsi: ufs: add ioctl interface for query request Greg KH <gregkh@linuxfoundation.org> - 2016-03-10 17:30 +0100
                Re: [PATCH v7] scsi: ufs: add ioctl interface for query request Greg KH <gregkh@linuxfoundation.org> - 2016-03-10 17:40 +0100
                Re: [PATCH v7] scsi: ufs: add ioctl interface for query request ygardi@codeaurora.org - 2016-03-10 19:50 +0100
                Re: [PATCH v7] scsi: ufs: add ioctl interface for query request Greg KH <gregkh@linuxfoundation.org> - 2016-03-10 20:00 +0100
                Re: [PATCH v7] scsi: ufs: add ioctl interface for query request ygardi@codeaurora.org - 2016-03-10 17:40 +0100
    Re: [PATCH v7] scsi: ufs: add ioctl interface for query request ygardi@codeaurora.org - 2016-03-09 20:20 +0100
      Re: [PATCH v7] scsi: ufs: add ioctl interface for query request Arnd Bergmann <arnd@arndb.de> - 2016-03-10 18:20 +0100
        Re: [PATCH v7] scsi: ufs: add ioctl interface for query request Arnd Bergmann <arnd@arndb.de> - 2016-03-10 20:30 +0100
          Re: [PATCH v7] scsi: ufs: add ioctl interface for query request "Martin K. Petersen" <martin.petersen@oracle.com> - 2016-03-11 02:50 +0100
            Re: [PATCH v7] scsi: ufs: add ioctl interface for query request Hannes Reinecke <hare@suse.de> - 2016-03-11 09:50 +0100
              RE: [PATCH v7] scsi: ufs: add ioctl interface for query request "Winkler, Tomas" <tomas.winkler@intel.com> - 2016-03-13 13:50 +0100

csiph-web