Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3919446pxb; Mon, 1 Feb 2021 08:00:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJwjgI2WWlL0sznWujSBu95zg+zeKSVMQ2gbVRQz2byzAvPnlgmRAYXGXqVQQVCbapZvTnkH X-Received: by 2002:aa7:d395:: with SMTP id x21mr10577419edq.137.1612195206309; Mon, 01 Feb 2021 08:00:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612195206; cv=none; d=google.com; s=arc-20160816; b=wEU1gDuN6ZvdP3i/qtdpm23r3ywxRyNLC65x64nD04YnhBJez6uI4tAatACh/x4jLi Kp3EnYgBMgVCj6e+dj/KbwmH5sPRL+DD2Lx63oI2Lhhgj04GgrBfHKx4BuV+zsjeN9/B TTctpIm3FPdwAvJ7von6qSV+jOHugnRsmRKIzKDFmt5SPK+VDCxgt3M5RV47IvD0s+bg IPxz4kbVCm9y/73UnsH1k0O0TDrL/XXS31nlsP/XT4WGFoa/kbzf7p+HJ+HQmMO5dE5L VeZqeYfO8dfI6mLZrE01ZwYwR1uTLQRED3kEfQDaI8frhGJU+N7dekUGs0gQ481EZVyk jMWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:references :subject:cc:to:mime-version:user-agent:from:date:message-id :dkim-signature; bh=QqxA3UTXwWM1rUS5ffJhVzREVnA5BJx0q4tUTFRKoM8=; b=jd24J26++3SQkZNBwhpl2erZY/oq/KBCPEmk8mPltOZpQSBx0tpwkwbbJSs/KVCD69 ysvWpz6dmnR04BOxbl1pZDRpuDX5goYZ4J7QlcLp0afDM66WGFPc3CJzlfvQDxVcay3v 1DTrVYWxtXU60sIM9Jod8IfomaxitL2BHHQ1NAo1O6nvJCOdsaEKik/vousV6lF4yMJR nGKwVOk8EKFESK6vMAAPJeqXAaHSzN689p0hCPE+zBc0Zck8oUaGmn9GEZF09GmTmZ/f HYhe/0FIc4rFEAfCZ1AXPiZo37HCCAOl6UYEllf7KL0XqX0HGqOt45/LbbqeOHlL1adO NGhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kyo3wi6M; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id pj26si10145498ejb.261.2021.02.01.07.59.40; Mon, 01 Feb 2021 08:00:06 -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=@gmail.com header.s=20161025 header.b=kyo3wi6M; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231941AbhBAP6n (ORCPT + 99 others); Mon, 1 Feb 2021 10:58:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231359AbhBAP6n (ORCPT ); Mon, 1 Feb 2021 10:58:43 -0500 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D76CC061573 for ; Mon, 1 Feb 2021 07:58:03 -0800 (PST) Received: by mail-wr1-x42d.google.com with SMTP id z6so17080732wrq.10 for ; Mon, 01 Feb 2021 07:58:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-transfer-encoding; bh=QqxA3UTXwWM1rUS5ffJhVzREVnA5BJx0q4tUTFRKoM8=; b=kyo3wi6MCZj3B2NQKJ4i+pexIGgnQWvXYw3xxq9aEzGH0EsgBM/IpZiFINHxSi0tXK liS5oWpsY/703lZ3Q0CpSg4jRDkBpdS94doz/AWvMnPB/fcXvULpVseeFpNACzOsU83/ WrJcg8B7E0lRVdeCmwShfLtH5eW6lfbSwiJsXQk4ydAEBNvOI80kZPzhS2IFezA91DLC x20jguhVA3XDNUnMDP3U4Bzb5IyAt5CpmJ75WuvlglzKrnlMg/nbsnvr1wvdXiLzOF36 IGauz+jbN/NZNbrylj8UvqiaCBwE4qTrTYUHqidEp3TVbWFRMdY34fuYmXTNPy+GlLAY JR7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-transfer-encoding; bh=QqxA3UTXwWM1rUS5ffJhVzREVnA5BJx0q4tUTFRKoM8=; b=H2nknqv5ZRG9fQ+AiH6UEwjPnnVhOsjgFDP1cn4mnBO5lP/hRCi5gnlJ46/bl2zGHH vu8bU8X0DcSObNQXX8ZtQO52CB9HidOLOPvnoRP1nr41kadNF16YwqVu5f+nW0PVf7VY LB4gIhYrbVriqSUufVKaiEGprcXj1KPglpSwGeNmrD41YwDCdLwYTTQ7tZ9fWNJMbsEr ffdtbZ7wY22A8/xF6aMPmZ4MaRGNszgLIg2Wq3jXMIBZbit7bK6Jez7L3dej5kImhNzv vtSLHMn7khKDwsl/Coe6EoyTOPMTOfVPsCZU5/+dzZTX2GAGFJxyxUoTgeMw0j7/58P7 9HeQ== X-Gm-Message-State: AOAM530YZeUNPsMBuc4dcm6REHg5Fp9EJbMC/erHI4msAM9Wj787taeg Sh2RSbHdtPkxM9VPV0j3etA= X-Received: by 2002:a5d:49cf:: with SMTP id t15mr18426983wrs.217.1612195082337; Mon, 01 Feb 2021 07:58:02 -0800 (PST) Received: from [89.139.43.22] (89-139-43-22.bb.netvision.net.il. [89.139.43.22]) by smtp.gmail.com with ESMTPSA id w4sm7718016wrt.69.2021.02.01.07.58.00 (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 01 Feb 2021 07:58:01 -0800 (PST) Message-ID: <601824B6.60803@gmail.com> Date: Mon, 01 Feb 2021 17:56:38 +0200 From: Eli Billauer User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.12) Gecko/20100907 Fedora/3.0.7-1.fc12 Thunderbird/3.0.7 MIME-Version: 1.0 To: Greg KH CC: arnd@arndb.de, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] char: xillybus: Add driver for XillyUSB (Xillybus variant for USB) References: <20210201141651.62853-1-eli.billauer@gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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. 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: http://billauer.co.il/blog/2020/02/linux-cuse-fuse-libfuse-crash/ > And always cc:linux-usb@vger.kernel.org when submitting a USB driver so > that the developers there can review it. > Sorry, I wasn't aware of that. Will resend this patch with this list cc'ed shortly. Thanks, Eli