All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, buytenh@wantstofly.org
Subject: Re: [PATCH net-next 2/8] net: dsa: make module builds work
Date: Tue, 13 Jan 2015 14:27:19 -0800	[thread overview]
Message-ID: <54B59BC7.10405@gmail.com> (raw)
In-Reply-To: <20150113.163853.1503595006355422756.davem@davemloft.net>

On 13/01/15 13:38, David Miller wrote:
> From: Florian Fainelli <f.fainelli@gmail.com>
> Date: Mon, 12 Jan 2015 13:57:40 -0800
> 
>> Building any DSA driver as a module will work from a compilation/linking
>> perspective, but the resulting modules produced are not functional.
>>
>> Any DSA driver references register_switch_driver and
>> unregister_switch_driver which are provided by net/dsa/dsa.c, so loading
>> any of these modules prior to dsa_core.ko being loaded will faill.
>>
>> Unfortunately, loading dsa_core.ko will make us call dsa_switch_probe()
>> which will find no DSA switch driver and return an error so we are stuck
>> there because there is no switch driver available. So this is getting us
>> nowhere.
>>
>> This patch introduces a separate module, named dsa_lib which contains
>> register_switch_driver, unregister_switch_driver and dsa_switch_probe
>> (to avoid exposing the list and mutex used for walking switch drivers),
>> such that the following can be done:
>>
>> - load dsa_lib
>> - load the dsa switch driver, e.g: mv88e6060, bcm_sf2
>> - load the dsa_core module
>>
>> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> 
> This looks worse to me.
> 
> Really, the match table and probing should not be in dsa_core at all.
> 
> It should only be done in individual drivers.

Right, I guess enough procrastination on my side is enough, time to get
this plan submitted: http://marc.info/?t=141038714600002&r=1&w=2.
-- 
Florian

  reply	other threads:[~2015-01-13 22:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-12 21:57 [PATCH net-next 0/8] net: dsa: modular build fixes and improvements Florian Fainelli
2015-01-12 21:57 ` [PATCH net-next 1/8] net: dsa: add missing netdevice.h include Florian Fainelli
2015-01-12 21:57 ` [PATCH net-next 2/8] net: dsa: make module builds work Florian Fainelli
2015-01-13 21:38   ` David Miller
2015-01-13 22:27     ` Florian Fainelli [this message]
2015-01-12 21:57 ` [PATCH net-next 3/8] net: phy: fixed: allow setting no update_link callback Florian Fainelli
2015-01-12 21:57 ` [PATCH net-next 4/8] net: dsa: cleanup resources upon module removal Florian Fainelli
2015-01-13 13:31   ` Sergei Shtylyov
2015-01-12 21:57 ` [PATCH net-next 5/8] net: dsa: allow switch drivers to cleanup their resources Florian Fainelli
2015-01-12 21:57 ` [PATCH net-next 6/8] net: dsa: bcm_sf2: factor interrupt disabling in a function Florian Fainelli
2015-01-12 21:57 ` [PATCH net-next 7/8] net: dsa: bcm_sf2: cleanup resources in remove callback Florian Fainelli
2015-01-12 21:57 ` [PATCH net-next 8/8] net: dsa: free distributed switch tree pointer in dsa_remove Florian Fainelli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54B59BC7.10405@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=buytenh@wantstofly.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.