[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <553990EC.1030401@gmail.com>
Date: Thu, 23 Apr 2015 17:40:12 -0700
From: Florian Fainelli <f.fainelli@...il.com>
To: Francois Romieu <romieu@...zoreil.com>,
Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
CC: Jia-Ju Bai <baijiaju1990@....com>,
Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
netdev@...r.kernel.org, David Miller <davem@...emloft.net>,
stephen@...workplumber.org, Neil Horman <nhorman@...driver.com>
Subject: Re: Resource usages in Linux drivers
On 23/04/15 16:19, Francois Romieu wrote:
> Sergei Shtylyov <sergei.shtylyov@...entembedded.com> :
>> On 4/23/2015 1:08 PM, Jia-Ju Bai wrote:
> [...]
>>> I also find many drivers do not use these managed APIs, especially in ethernet
>>> card drivers (like e100, r8169). Is it possible to change them?
>>
>> Patches welcome. :-)
>
> I respectfully disagree.
Me too, most of the device managed conversions we have seen were bogus
because they were done in a semi-automated way without understanding the
peculiarities of the network devices, that is the separation between
init/open/close that most other device drivers do not have.
A typical example is this:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6892b41d9701283085b655c6086fb57a5d63fa47
>
> If someone believes basic resouce management to be too hard or error-prone
> to handle, he should imvho seriously rise the bar and reconsider the way
> he wants to contribute to the kernel.
Well, for one, we could have a device managed register_netdev() which
cleans up resources in case of failures and calls free_netdev()
automatically, but is that adding much value?
>
> I may hope he who reads e100.c to think about DMA api, bql or rx ring
> holes avoidance to quote a few ones. Managed API ? Mildly...
>
--
Florian
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists