Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3928689pxb; Mon, 1 Feb 2021 08:10:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJzjVSgJZ9SWdhxHoyNFNEuYVuYEKXWnHJUv5ZweGqL2Sywat9nKIMrsw7y0StBnF+pUuamC X-Received: by 2002:a50:e80d:: with SMTP id e13mr5346692edn.251.1612195835374; Mon, 01 Feb 2021 08:10:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612195835; cv=none; d=google.com; s=arc-20160816; b=P36kD2snIv4ClHT1UUOVaCczbbo41v9aUEQgU9MHw3bHOb2InsL097+uNztXKuquF3 1RDkHUwEeswX7qu2cgsxva+DlY21XhuqGkK7d/MlkuUfdxgfPFvPyoLHtOdtVYkNOLjA 1a4bgojS04YS/rBEOk4fKn/KsWNpb0PE2k+Su2tXi11DHyzBlWasOG9Yo9PyGaMAVgP4 BE8n2RxFcferW0hoL9qrbpVJ4S8aM+c5iYl9HHKmg36YA7Ca/naXpQSSqzRDNtA0VM/4 CHOGkc/Tz6e3TofpXU63NjF3ZDszOhkrm8Sri9KEGL8hgNrkjAFy5WfDA2W4zkUf1lR9 FjkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=G7OxjP4TQd6YMkmr7s6ceeX53llTqhph6WqucNPqLN8=; b=CQOPTflzX1qI54iol7+j3/YlW10OoHtRH+VXvXDraWH/yAuip5AwOMJGascyfvY/Bz 1qAmLCzPNRrCPMt+et4m9kI5GBPjv3V6tr1U1PE2DjAIeY4hsxjnVXqiPahQdp3Os7/0 xkEhNtu7MYIGqEVyXroqqLEd91I2z7sXcb6283QS6VHrOotTdH2FI0boRGJDp7M9Lob1 ra8pG+P2z7m8I623c2evGVX9KHW6SC89NUimUm+AEV3PtZCNfPCb9/P39f3O3vkRw6r1 Z8JvTj2tDv6J4vydQtOZezZO3VTiu3g/+Pu/8DH8MGRf3boTOmdacQVGymdRM5xRkKJM bOhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=x4vl4hfQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j12si11618595ejs.13.2021.02.01.08.10.10; Mon, 01 Feb 2021 08:10:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=x4vl4hfQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231269AbhBAQFy (ORCPT + 99 others); Mon, 1 Feb 2021 11:05:54 -0500 Received: from mail.kernel.org ([198.145.29.99]:50976 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231152AbhBAQFk (ORCPT ); Mon, 1 Feb 2021 11:05:40 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2970664E3C; Mon, 1 Feb 2021 16:04:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612195498; bh=D9b+bomAg+Ztnipm+XQTB11VfNLgxTSH/6lQhlvAhrk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=x4vl4hfQ6HtzcuP5/Z2I3c0sLTJwqnCNSTi+XBCPhfoIdIZr8sVs+EXDInviwJdLh d8EYKB0bs0cW86IC2kxaBhp72s9ol5+WJv/WWYEUrwqCGEzgKCrZXixe2ikAwMtlKv ruhngQNwGnU1MwSBp2o5mRgpEuqCnCHtxYxAg/ho= Date: Mon, 1 Feb 2021 17:04:56 +0100 From: Greg KH To: Eli Billauer Cc: arnd@arndb.de, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] char: xillybus: Add driver for XillyUSB (Xillybus variant for USB) Message-ID: References: <20210201141651.62853-1-eli.billauer@gmail.com> <601824B6.60803@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <601824B6.60803@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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