public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Eli Billauer <eli.billauer@gmail.com>
Cc: arnd@arndb.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] char: xillybus: Add driver for XillyUSB (Xillybus variant for USB)
Date: Mon, 1 Feb 2021 17:04:56 +0100	[thread overview]
Message-ID: <YBgmqBi1PFDxWW1X@kroah.com> (raw)
In-Reply-To: <601824B6.60803@gmail.com>

On Mon, Feb 01, 2021 at 05:56:38PM +0200, Eli Billauer wrote:
> Hello, Greg.
> 
> On 01/02/21 16:25, Greg KH wrote:
> > As this has nothing to do with the existing XillyBus code, and you
> > aren't doing anything "fancy" with the character device nodes, why does
> > this need to be a kernel driver at all?  Why can't you just use libusb
> > and talk to the device directly from userspace with no kernel driver
> > needed?
> That's actually what I did in my first attempt.
> 
> However in order to provide the same API as the existing Xillybus driver,
> this driver must present some kind of device files.

But you are not providing the same API!  Or so you are saying in the
driver.

If you were, then you need to use the same device nodes that the
existing xillybus code uses and share them.  Which is what I asked about
before.

> Named pipes aren't sufficient, among others because closing a Xillybus
> device file is something that the hardware is informed about immediately.
> Also, when a device file is opened for write, the close() call should not
> return until all data has arrived to hardware (per existing API). This can't
> be guaranteed with named pipes.

What does a named pipe have to do with anything here?

> So a user-space driver needs to rely on CUSE. Which I wasted two months on
> before realizing it's not stable enough to rely upon. My whines on CUSE can
> be found in my blog:

Why is cuse an issue here?

Just use libusb and have your userspace programs link against it.

thanks,

greg k-h

      reply	other threads:[~2021-02-01 16:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-01 14:16 [PATCH v2] char: xillybus: Add driver for XillyUSB (Xillybus variant for USB) eli.billauer
2021-02-01 14:25 ` Greg KH
2021-02-01 15:56   ` Eli Billauer
2021-02-01 16:04     ` Greg KH [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YBgmqBi1PFDxWW1X@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=arnd@arndb.de \
    --cc=eli.billauer@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox