From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 41022C433F5 for ; Sun, 16 Jan 2022 13:46:06 +0000 (UTC) Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.94.2) (envelope-from ) id 1n95qX-0003c7-EY; Sun, 16 Jan 2022 08:45:25 -0500 Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1n95qT-0003bf-Qn for kernelnewbies@kernelnewbies.org; Sun, 16 Jan 2022 08:45:21 -0500 Received: by mail-lf1-x12a.google.com with SMTP id bu18so24472495lfb.5 for ; Sun, 16 Jan 2022 05:45:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=46ZLvrF8qyb4McvRye5reSLFriPrSb+stpXwoaqWdiA=; b=MZh8KMJLEsbc5eWciHTyWCWZmC2yyMstVV4wZCuNv3YlKZ+T/VswOkZMjLrs7x6i5Z +oYHaTwsrl4Ltq+rP3asx3ALDwtB8lsa3/hs4hqjgs2L+jPy756sbxiEWngf/EtDoSvc tzIyWiNK3Lld+kOr4kPAba0ktsy8HCiYw2TJ+bnR8QkK1b0R41Sqh1eeIWYCa6qgP8zX aEsOIyY+5oyqC/Ur1L14iRFOPyohLUrzfYwdft2+RV23U1gdm/TJBtV0/LjZ3BNsRQZN e90CNBxojXtFOZAzVXM+89kheUlQmm3WbiucD1tv7qZR5SEnYSSZonJ3BMnHDy6XvTn8 WxFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=46ZLvrF8qyb4McvRye5reSLFriPrSb+stpXwoaqWdiA=; b=BHh+qhH3ob2kTZKmfGWRIm0xj4NLfCoMHoPI4A+/c3e50cG+BqaNMdu79mU8PLu3v5 D/lTpWvsZpNLIaWn5DBD8qkVywxdQPVZZcRbnzo43c5wcnUJ33N5BPt3B7Pp7Gca8xrN UfUiSKwqc5VSgDEHdRgU3GEg4bZHGkZUiicQHqioWDbOrqkG62C+vyc+uUb8wsM6PW4y GGlZw1FfQO7lsh3sC1HIMEsnmo8uOiTHZTvr4dInk61X5IqSqCHp1pofozARf/mlouS+ Qq+UtO8JuDJ9P++XHcrvHsN7GR+L8TB7MyPDOvgXMznIvnDrtY3eLYtUa2t76iJ6G7tP 6teg== X-Gm-Message-State: AOAM533emSkHvB9V+Gd+MMqWUtcZY+tnCECFrpTwFy0ArXtZGSXkRuBz Hs39FM0AbdnWep1/Ro0HiYg= X-Google-Smtp-Source: ABdhPJzNl3F+1izr1YcYTqEYp21k4e+7CQ7PXslnXb5IEtudjNXBOo3zw53ocXyshk+9aVYxYF4pQA== X-Received: by 2002:a2e:7c06:: with SMTP id x6mr12040762ljc.138.1642340718076; Sun, 16 Jan 2022 05:45:18 -0800 (PST) Received: from [192.168.1.11] ([217.117.245.67]) by smtp.gmail.com with ESMTPSA id a1sm976805lfu.232.2022.01.16.05.45.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 16 Jan 2022 05:45:17 -0800 (PST) Message-ID: <90589a9f-12e1-bcc5-1398-c27e45a9d4d4@gmail.com> Date: Sun, 16 Jan 2022 16:45:16 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.1 Subject: Re: Where to find the information how to write a state of the art USB driver? Content-Language: en-US To: Philipp Hortmann , Greg KH References: <28e1c700-da54-8793-8c60-4ec3697fe35d@gmail.com> <03a58466-9f0f-cf77-4809-06a28dadd1c7@gmail.com> From: Pavel Skripkin In-Reply-To: <03a58466-9f0f-cf77-4809-06a28dadd1c7@gmail.com> Cc: kernelnewbies@kernelnewbies.org X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: kernelnewbies-bounces@kernelnewbies.org Hi Philipp, On 1/13/22 21:54, Philipp Hortmann wrote: > On 1/13/22 4:33 PM, Greg KH wrote: >> On Thu, Jan 13, 2022 at 07:39:38AM +0100, Philipp Hortmann wrote: >>> On 1/12/22 10:54 AM, Greg KH wrote: >>>> That driver tried to be an example for an unknown device, doing multiple >>>> different things that no single driver/device would probably ever need. >>>> Also it can almost always just be replaced with a simple userspace >>>> program using libusb, as I bet your driver could be replaced with as >>>> well, right? >>> Yes it can be replaced by a userspace program but even this is not required. >> It is an issue if you are trying to write a new driver. We do not take >> new drivers into the kernel tree if they can be in the kernel instead. >> > > Sorry I did not clearly express what I plan to do. I plan to do > maintenance and bug fixes on the kernel. > > I am writing on drivers only for my personal education. No new drivers > for the kernel. > I think, syzbot dashboard can be a good place to start from [1]. There are a lot of usb related warnings in old drivers. Just grep the web page for 'usb_submit_urb'. Might be valuable work to get familiar with basic kernel APIs. Good luck :) [1] https://syzkaller.appspot.com/upstream With regards, Pavel Skripkin _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies