2011-04-01 14:49:46

by Rafał Miłecki

[permalink] [raw]
Subject: ChipCommon as independent driver?

I wanted to make ChipCommon independed, to make it usable with any
bus. The problem is:
void ssb_chipco_set_clockmode(struct ssb_chipcommon *cc, enum ssb_clkmode mode)

This function calls code from pci.c which gives us a loop:
WARNING: Module
/lib/modules/2.6.39-rc1-wl-wireless+/kernel/drivers/net/wireless/b43/b43.ko
ignored, due to loop
WARNING: Module
/lib/modules/2.6.39-rc1-wl-wireless+/kernel/drivers/ssb/ssb.ko
ignored, due to loop
WARNING: Loop detected:
/lib/modules/2.6.39-rc1-wl-wireless+/kernel/drivers/ssb/bcmcorecc.ko
needs ssb.ko which needs bcmcorecc.ko again!
WARNING: Module
/lib/modules/2.6.39-rc1-wl-wireless+/kernel/drivers/ssb/bcmcorecc.ko
ignored, due to loop

Do you have idea how we could nicely solve that issue?

--
Rafał


2011-04-01 16:00:53

by Michael Büsch

[permalink] [raw]
Subject: Re: ChipCommon as independent driver?

On Fri, 2011-04-01 at 16:49 +0200, Rafał Miłecki wrote:
> Do you have idea how we could nicely solve that issue?

Yeah. Just don't share code between ssb and bcmai.
That's the only clean solution to that mess.

--
Greetings Michael.


2011-04-01 16:06:17

by Rafał Miłecki

[permalink] [raw]
Subject: Re: ChipCommon as independent driver?

W dniu 1 kwietnia 2011 18:00 użytkownik Michael Büsch <[email protected]> napisał:
> On Fri, 2011-04-01 at 16:49 +0200, Rafał Miłecki wrote:
>> Do you have idea how we could nicely solve that issue?
>
> Yeah. Just don't share code between ssb and bcmai.
> That's the only clean solution to that mess.

Do you want to have core drivers separated as well? Really? Should we
have separated pci core? chiccommon core? gige core? 80211 (b43) core?

My mistake was to include ssb_private.h in separated chipcommon.

--
Rafał

2011-04-01 16:21:49

by Rafał Miłecki

[permalink] [raw]
Subject: Re: ChipCommon as independent driver?

W dniu 1 kwietnia 2011 18:15 użytkownik Michael Büsch <[email protected]> napisał:
> On Fri, 2011-04-01 at 18:06 +0200, Rafał Miłecki wrote:
>> W dniu 1 kwietnia 2011 18:00 użytkownik Michael Büsch <[email protected]> napisał:
>> > On Fri, 2011-04-01 at 16:49 +0200, Rafał Miłecki wrote:
>> >> Do you have idea how we could nicely solve that issue?
>> >
>> > Yeah. Just don't share code between ssb and bcmai.
>> > That's the only clean solution to that mess.
>>
>> Do you want to have core drivers separated as well? Really? Should we
>> have separated pci core? chiccommon core?
>
> Yes. Those "drivers" are a mess full of ssb specific workarounds
> to hardware limitations.

I really don't understand what you meant in:

2011/2/18 Michael Büsch <[email protected]>:
> Note that this does not mean that we need to duplicate the MIPS,
> common and probably pci core drivers. A hybrid module can be done,
> if that's desired to avoid code duplication.

then :|

--
Rafał

2011-04-01 16:15:36

by Michael Büsch

[permalink] [raw]
Subject: Re: ChipCommon as independent driver?

On Fri, 2011-04-01 at 18:06 +0200, Rafał Miłecki wrote:
> W dniu 1 kwietnia 2011 18:00 użytkownik Michael Büsch <[email protected]> napisał:
> > On Fri, 2011-04-01 at 16:49 +0200, Rafał Miłecki wrote:
> >> Do you have idea how we could nicely solve that issue?
> >
> > Yeah. Just don't share code between ssb and bcmai.
> > That's the only clean solution to that mess.
>
> Do you want to have core drivers separated as well? Really? Should we
> have separated pci core? chiccommon core?

Yes. Those "drivers" are a mess full of ssb specific workarounds
to hardware limitations.

> gige core?

Are there bcmai devices with gige core?
This driver is a _real_ mess. It basically is one huge
workaround, because the hardware is incredibly stupid.

> 80211 (b43) core?

No. The b43 (and b44) driver is pretty much self contained. It will be
easy
to make it run on both platforms. There are only a few places
that need changes.

--
Greetings Michael.


2011-04-01 16:30:20

by Michael Büsch

[permalink] [raw]
Subject: Re: ChipCommon as independent driver?

On Fri, 2011-04-01 at 18:21 +0200, Rafał Miłecki wrote:
> W dniu 1 kwietnia 2011 18:15 użytkownik Michael Büsch <[email protected]> napisał:
> > On Fri, 2011-04-01 at 18:06 +0200, Rafał Miłecki wrote:
> >> W dniu 1 kwietnia 2011 18:00 użytkownik Michael Büsch <[email protected]> napisał:
> >> > On Fri, 2011-04-01 at 16:49 +0200, Rafał Miłecki wrote:
> >> >> Do you have idea how we could nicely solve that issue?
> >> >
> >> > Yeah. Just don't share code between ssb and bcmai.
> >> > That's the only clean solution to that mess.
> >>
> >> Do you want to have core drivers separated as well? Really? Should we
> >> have separated pci core? chiccommon core?
> >
> > Yes. Those "drivers" are a mess full of ssb specific workarounds
> > to hardware limitations.
>
> I really don't understand what you meant in:
>
> 2011/2/18 Michael Büsch <[email protected]>:
> > Note that this does not mean that we need to duplicate the MIPS,
> > common and probably pci core drivers. A hybrid module can be done,
> > if that's desired to avoid code duplication.
>
> then :|

_can_ be done.
That doesn't mean it must be done or whether it's a good idea to do so.

It certainly is possible to do so, but I don't think it makes
a lot of sense.

--
Greetings Michael.