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 X-Spam-Level: X-Spam-Status: No, score=-2.0 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6EFA7C11F68 for ; Fri, 2 Jul 2021 12:05:53 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id E138C613E0 for ; Fri, 2 Jul 2021 12:05:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E138C613E0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.94.2) (envelope-from ) id 1lzHvH-0003u1-Sx; Fri, 02 Jul 2021 08:05:31 -0400 Received: from mail-ot1-x32d.google.com ([2607:f8b0:4864:20::32d]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1lzHvF-0003tv-9D for kernelnewbies@kernelnewbies.org; Fri, 02 Jul 2021 08:05:29 -0400 Received: by mail-ot1-x32d.google.com with SMTP id h24-20020a9d64180000b029036edcf8f9a6so9812098otl.3 for ; Fri, 02 Jul 2021 05:05:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=jvwC5DbBInbwZG2KYmEH3CjHWiOnuR8SzMXujEWKZ+g=; b=r+2zbeiLi2ZDdV0FhhULHAnnqg4sSxq325d50K/u0H9nwHFIQgzjBNxZJvS2XQhoY5 0cg3CNc633s3E0iE+Pn7XxYESgBDzkWZTE1uVHBGn8OYxEsKtppb6/yOJYHwPjj/hHVo wPpNJi8vlEMm5oACj45Kap6ALf9p+8sNTxI6W2EtUTrkjpB8GLilWCkkE98WBiv06RJO kjZd8VREWl/u4zFpzt45GmR/wh45oLQXeu8SdN8h9jbU3PXg2yHaV+q4KS+mjzwGk4/8 oQL1jBffcxXG5Jp7Af9Uf+Lse0zb1qTVU1WbZ1XTTxrtD2pg9NFxMwf8Sb6rTZVhpqfg sfzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=jvwC5DbBInbwZG2KYmEH3CjHWiOnuR8SzMXujEWKZ+g=; b=ezwlu39fEym3usWyvIABdzCXLvhfvSjAC+ZgO0XwIfKnZEamYmNxRcSp4nFClNtkCL OMdJbWxC+cRmxZGi90yMWOurcMAMzLFoCAqMespWScecMOM/DZTCyrinq1seS7Rht/SK NlsrrR0H3lfF+wG18Ru8hu0JP2C8rl2wDwhb87bfFvtvREWrY/SOZs5Rj4/KGWXJyzHa pdvZ+xKBuupqfy8yueWwYVOUVIr+8+J6WIpuLVuTJXCxg+86aLEhUxPtu2szdOW9uRss Lf4aRIBKNPcUE6AHC+Ygdqot/d4F8Gh9F5IPIIMyts0m9RCVzOnCOFiUX0KYfdjvlUqw LpkQ== X-Gm-Message-State: AOAM532BKLFM8kmJhvXaubD5oWHm9V/50+txxw2HeA9Iloj3xQAFihIs hvI4MC0eaNHrHcvOShIHqJV+Z6NPmQc= X-Google-Smtp-Source: ABdhPJwTU2NVPuWXYhOvlk+RwmCm9vXg2mXUTldO23vYY7OWd89GZpdc/uCgZ0q9YxAo0HjrjBTRiQ== X-Received: by 2002:a05:6830:2315:: with SMTP id u21mr4164166ote.327.1625227527689; Fri, 02 Jul 2021 05:05:27 -0700 (PDT) Received: from ian.penurio.us ([47.184.51.90]) by smtp.gmail.com with ESMTPSA id i133sm675826oia.2.2021.07.02.05.05.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 02 Jul 2021 05:05:27 -0700 (PDT) Subject: Re: Seeking advice on "monkey patching" a driver To: Greg KH References: <30faa352-0f60-10b9-887e-b2ee522d0a16@gmail.com> From: Ian Pilcher Message-ID: <5c34419f-ef7d-a9bd-0c90-c77e2526b739@gmail.com> Date: Fri, 2 Jul 2021 07:05:26 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US Cc: linux-modules@vger.kernel.org, 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 On 7/1/21 11:31 PM, Greg KH wrote: > Why are ahci devices somehow "special" here? Just add a trigger to the > ahci core for LEDs and all should "just work". We've done that for many > subsystems already. It's more complicated than that, as it would need to be a separate trigger for each drive (ATA port). > Are you sure we don't already have LED triggers for disk activity? Have > you tried the ledtrig-disk.c driver? It says it works on ATA devices, > no reason it can't also work for other device types. I stumbled on that file myself last night. I either wasn't aware of it before, or I had forgotten its existence, possibly because it's disabled (CONFIG_LEDS_TRIGGER_DISK=n). As mentioned above, I would be looking to enable "per port" LEDs, so it doesn't work in its current form. It does at least give me hope that enhancements might be accepted upstream. >> I've invested significant time in kernel patches in the past, only to >> see them ultimately not be accepted, so I would need to know that >> upstream was truly interested in such a feature before I would consider >> making such a commitment. > > That's not fair, there is no way anyone can promise anyone that their > patches will be accepted, _before_ anyone sees them. What would _you_ > do if you were in the kernel maintainer's position and read something > like this? You're right, but that isn't what I intended to say. Basically, I can't afford to invest the time in implementing something if the subsystem maintainers have no interest in the *functionality*, regardless of the state of the code. I.e., if the ATA/LED subsystem maintainers think that software-controlled disk activity LEDs are stupid and have no place in the kernel, then code quality is irrelevant, and anything I do will be a waste of time. > good luck! Thanks! -- ======================================================================== In Soviet Russia, Google searches you! ======================================================================== _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies