Skip to contentSkip to conversation

strange behaviour from "make localmodconfig" throws out ath9k stuff

DISCUSSION Robert P. J. Day 4 participants 27 messages Apr 26, 2013 – Apr 29, 2013 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

probably a simple explanation for this, but my first time playing
with "make localmodconfig" and it appears to be tossing all my ath9k-related module settings.

currently running ubuntu on a 64-bit asus laptop with the following
ath9k-related modules:

$ lsmod | grep ath9k
ath9k                 149545  0
mac80211              558577  1 ath9k
ath9k_common           14054  1 ath9k
ath9k_hw              408874  2 ath9k,ath9k_common
ath                    23828  3 ath9k,ath9k_common,ath9k_hw
cfg80211              211955  3 ath9k,mac80211,ath
$

starting with current kernel "git pull", i do:

$ make allmodconfig

at which point i get:

$ grep ATH9K .config
CONFIG_ATH9K_HW=m
CONFIG_ATH9K_COMMON=m
CONFIG_ATH9K_DFS_DEBUGFS=y
CONFIG_ATH9K_BTCOEX_SUPPORT=y
CONFIG_ATH9K=m
CONFIG_ATH9K_PCI=y
CONFIG_ATH9K_AHB=y
CONFIG_ATH9K_DEBUGFS=y
CONFIG_ATH9K_DFS_CERTIFIED=y
CONFIG_ATH9K_MAC_DEBUG=y
CONFIG_ATH9K_RATE_CONTROL=y
CONFIG_ATH9K_HTC=m
CONFIG_ATH9K_HTC_DEBUGFS=y
$

which looks reasonable(?). then run:

$ make localmodconfig

have to answer maybe 4 questions manually, at which point i have:

$ grep ATH9K .config
$

that doesn't look good, i should definitely have module selections for ath9k stuff, no? and if i run that command again, i get:

$ make localmodconfig
using config: '.config'
WARNING: ATH9K_HW is required, but nothing in the
  current config selects it.
WARNING: ATH_COMMON is required, but nothing in the
  current config selects it.
WARNING: ATH9K_COMMON is required, but nothing in the
  current config selects it.
module ath9k did not have configs CONFIG_ATH9K
module uas did not have configs CONFIG_USB_UAS
module ath did not have configs CONFIG_ATH_COMMON
module ath9k_hw did not have configs CONFIG_ATH9K_HW
module ath9k_common did not have configs CONFIG_ATH9K_COMMON
#
# configuration written to .config
#
$

so there seems to be something related specifically to ath9k that doesn't play well with "localmodconfig". or am i doing something silly?

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#1 lore raw

Robert, All,

Quoted 3 lines · Robert P. J. Day

probably a simple explanation for this, but my first time playing
with "make localmodconfig" and it appears to be tossing all my ath9k-related module settings.

Probably due to cset 422c809. It caused a few other issues. I'm working on it. In the meantime, can you just try to revert it, please?

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#2 lore raw
Quoted 9 lines · Yann E. MORIN

Robert, All,

Quoted 3 lines · Robert P. J. Day

probably a simple explanation for this, but my first time playing
with "make localmodconfig" and it appears to be tossing all my ath9k-related module settings.

Probably due to cset 422c809. It caused a few other issues. I'm working on it. In the meantime, can you just try to revert it, please?

but that commit is in linux-next, i'm working with linus' tree which
doesn't have that commit.

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#3 lore raw
In reply to Robert P. J. Day

Robert, All,

Quoted 38 lines · Robert P. J. Day

probably a simple explanation for this, but my first time playing
with "make localmodconfig" and it appears to be tossing all my ath9k-related module settings.

currently running ubuntu on a 64-bit asus laptop with the following
ath9k-related modules:

$ lsmod | grep ath9k
ath9k                 149545  0
mac80211              558577  1 ath9k
ath9k_common           14054  1 ath9k
ath9k_hw              408874  2 ath9k,ath9k_common
ath                    23828  3 ath9k,ath9k_common,ath9k_hw
cfg80211              211955  3 ath9k,mac80211,ath
$

starting with current kernel "git pull", i do:

$ make allmodconfig

at which point i get:

$ grep ATH9K .config
CONFIG_ATH9K_HW=m
CONFIG_ATH9K_COMMON=m
CONFIG_ATH9K_DFS_DEBUGFS=y
CONFIG_ATH9K_BTCOEX_SUPPORT=y
CONFIG_ATH9K=m
CONFIG_ATH9K_PCI=y
CONFIG_ATH9K_AHB=y
CONFIG_ATH9K_DEBUGFS=y
CONFIG_ATH9K_DFS_CERTIFIED=y
CONFIG_ATH9K_MAC_DEBUG=y
CONFIG_ATH9K_RATE_CONTROL=y
CONFIG_ATH9K_HTC=m
CONFIG_ATH9K_HTC_DEBUGFS=y
$
Quoted 7 lines

which looks reasonable(?). then run:

$ make localmodconfig

have to answer maybe 4 questions manually, at which point i have:

$ grep ATH9K .config

Can you send the output of your lsmod, please?

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#4 lore raw
Quoted 43 lines · Yann E. MORIN

Robert, All,

Quoted 40 lines · Robert P. J. Day

probably a simple explanation for this, but my first time playing
with "make localmodconfig" and it appears to be tossing all my ath9k-related module settings.

currently running ubuntu on a 64-bit asus laptop with the following
ath9k-related modules:

$ lsmod | grep ath9k
ath9k                 149545  0
mac80211              558577  1 ath9k
ath9k_common           14054  1 ath9k
ath9k_hw              408874  2 ath9k,ath9k_common
ath                    23828  3 ath9k,ath9k_common,ath9k_hw
cfg80211              211955  3 ath9k,mac80211,ath
$

starting with current kernel "git pull", i do:

$ make allmodconfig

at which point i get:

$ grep ATH9K .config
CONFIG_ATH9K_HW=m
CONFIG_ATH9K_COMMON=m
CONFIG_ATH9K_DFS_DEBUGFS=y
CONFIG_ATH9K_BTCOEX_SUPPORT=y
CONFIG_ATH9K=m
CONFIG_ATH9K_PCI=y
CONFIG_ATH9K_AHB=y
CONFIG_ATH9K_DEBUGFS=y
CONFIG_ATH9K_DFS_CERTIFIED=y
CONFIG_ATH9K_MAC_DEBUG=y
CONFIG_ATH9K_RATE_CONTROL=y
CONFIG_ATH9K_HTC=m
CONFIG_ATH9K_HTC_DEBUGFS=y
$

which looks reasonable(?). then run:

Quoted 7 lines
Quoted 5 lines
$ make localmodconfig

have to answer maybe 4 questions manually, at which point i have:

$ grep ATH9K .config

Can you send the output of your lsmod, please?

to recap, current status of kernel source:

$ git show
commit d7d7271f421f1e45289f2a737c7f636c02c673ce
Merge: 96edcf3 c95789e
Author: Linus Torvalds <[email protected]>
Date:   Fri Apr 26 08:17:07 2013 -0700
...

next:

$ make distclean

next:

$ make allmodconfig

next:

$ make localmodconfig

at which time i get asked four questions that i respond to manually:

User namespace (USER_NS) [N/y/?] (NEW)
Require conversions between uid/gids and their internal representation (UIDGID_STRICT_TYPE_CHECKS) [N/y/?] (NEW) BT8XX GPIO abuser (GPIO_BT8XX) [N/m/y/?] (NEW)
EVM support (EVM) [N/y/?] (NEW)

for which i simply hit ENTER each time, and no errors. *however*, if i run "make localmodconfig" a second time (which theoretically should be acceptable, correct?), that's when i get:

$ make localmodconfig
using config: '.config'
WARNING: ATH9K_HW is required, but nothing in the
  current config selects it.
WARNING: ATH_COMMON is required, but nothing in the
  current config selects it.
WARNING: ATH9K_COMMON is required, but nothing in the
  current config selects it.
module ath9k did not have configs CONFIG_ATH9K
module ath did not have configs CONFIG_ATH_COMMON
module ath9k_hw did not have configs CONFIG_ATH9K_HW
module ath9k_common did not have configs CONFIG_ATH9K_COMMON
#
# configuration written to .config
#
$

i assume it should be easy for someone else to reproduce this, but
if you want me to do any more testing later this afternoon, let me know.

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#5 lore raw

Robert, All,

Quoted 49 lines · Robert P. J. Day

to recap, current status of kernel source:

$ git show
commit d7d7271f421f1e45289f2a737c7f636c02c673ce
Merge: 96edcf3 c95789e
Author: Linus Torvalds <[email protected]>
Date:   Fri Apr 26 08:17:07 2013 -0700
...

next:

$ make distclean

next:

$ make allmodconfig

next:

$ make localmodconfig

at which time i get asked four questions that i respond to manually:

User namespace (USER_NS) [N/y/?] (NEW)
Require conversions between uid/gids and their internal representation (UIDGID_STRICT_TYPE_CHECKS) [N/y/?] (NEW) BT8XX GPIO abuser (GPIO_BT8XX) [N/m/y/?] (NEW)
EVM support (EVM) [N/y/?] (NEW)

for which i simply hit ENTER each time, and no errors. *however*, if i run "make localmodconfig" a second time (which theoretically should be acceptable, correct?), that's when i get:

$ make localmodconfig
using config: '.config'
WARNING: ATH9K_HW is required, but nothing in the
  current config selects it.
WARNING: ATH_COMMON is required, but nothing in the
  current config selects it.
WARNING: ATH9K_COMMON is required, but nothing in the
  current config selects it.
module ath9k did not have configs CONFIG_ATH9K
module ath did not have configs CONFIG_ATH_COMMON
module ath9k_hw did not have configs CONFIG_ATH9K_HW
module ath9k_common did not have configs CONFIG_ATH9K_COMMON
#
# configuration written to .config
#
$
Quoted 3 lines

i assume it should be easy for someone else to reproduce this, but
if you want me to do any more testing later this afternoon, let me know.

I've bisected v3.7 (good) to v3.8 (already bad) with your lsmod, and using this script:
#!/bin/bash
set -e
git clean -dX
git clean -d
make allmodconfig
make LSMOD=/home/ymorin/r.pj.day.lsmod localmodconfig grep ATH9K .config

(and manually answering the few new questions), and it turned up the following cset as the culprit:
23c1d7f: wireless: allow Atheros card to not depend on ath.ko

Not sure where to go from there... :-/

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#6 lore raw
Quoted 66 lines · Yann E. MORIN

Robert, All,

Quoted 49 lines · Robert P. J. Day

to recap, current status of kernel source:

$ git show
commit d7d7271f421f1e45289f2a737c7f636c02c673ce
Merge: 96edcf3 c95789e
Author: Linus Torvalds <[email protected]>
Date:   Fri Apr 26 08:17:07 2013 -0700
...

next:

$ make distclean

next:

$ make allmodconfig

next:

$ make localmodconfig

at which time i get asked four questions that i respond to manually:

User namespace (USER_NS) [N/y/?] (NEW)
Require conversions between uid/gids and their internal representation (UIDGID_STRICT_TYPE_CHECKS) [N/y/?] (NEW) BT8XX GPIO abuser (GPIO_BT8XX) [N/m/y/?] (NEW)
EVM support (EVM) [N/y/?] (NEW)

for which i simply hit ENTER each time, and no errors. *however*, if i run "make localmodconfig" a second time (which theoretically should be acceptable, correct?), that's when i get:

$ make localmodconfig
using config: '.config'
WARNING: ATH9K_HW is required, but nothing in the
  current config selects it.
WARNING: ATH_COMMON is required, but nothing in the
  current config selects it.
WARNING: ATH9K_COMMON is required, but nothing in the
  current config selects it.
module ath9k did not have configs CONFIG_ATH9K
module ath did not have configs CONFIG_ATH_COMMON
module ath9k_hw did not have configs CONFIG_ATH9K_HW
module ath9k_common did not have configs CONFIG_ATH9K_COMMON
#
# configuration written to .config
#
$
Quoted 3 lines

i assume it should be easy for someone else to reproduce this, but
if you want me to do any more testing later this afternoon, let me know.

I've bisected v3.7 (good) to v3.8 (already bad) with your lsmod, and using this script:
#!/bin/bash
set -e
git clean -dX
git clean -d
make allmodconfig
make LSMOD=/home/ymorin/r.pj.day.lsmod localmodconfig grep ATH9K .config

Quoted 5 lines

(and manually answering the few new questions), and it turned up the following cset as the culprit:
23c1d7f: wireless: allow Atheros card to not depend on ath.ko

Not sure where to go from there... :-/

see my later email, it might be fairly simple and i'll look at this
later today. i started to suspect that it was something related to a strange change in the dependencies related to atheros, and from what you just wrote, that looks exactly like what it is.

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#7 lore raw
In reply to Yann E. MORIN
Quoted 66 lines · Yann E. MORIN

Robert, All,

Quoted 49 lines · Robert P. J. Day

to recap, current status of kernel source:

$ git show
commit d7d7271f421f1e45289f2a737c7f636c02c673ce
Merge: 96edcf3 c95789e
Author: Linus Torvalds <[email protected]>
Date:   Fri Apr 26 08:17:07 2013 -0700
...

next:

$ make distclean

next:

$ make allmodconfig

next:

$ make localmodconfig

at which time i get asked four questions that i respond to manually:

User namespace (USER_NS) [N/y/?] (NEW)
Require conversions between uid/gids and their internal representation (UIDGID_STRICT_TYPE_CHECKS) [N/y/?] (NEW) BT8XX GPIO abuser (GPIO_BT8XX) [N/m/y/?] (NEW)
EVM support (EVM) [N/y/?] (NEW)

for which i simply hit ENTER each time, and no errors. *however*, if i run "make localmodconfig" a second time (which theoretically should be acceptable, correct?), that's when i get:

$ make localmodconfig
using config: '.config'
WARNING: ATH9K_HW is required, but nothing in the
  current config selects it.
WARNING: ATH_COMMON is required, but nothing in the
  current config selects it.
WARNING: ATH9K_COMMON is required, but nothing in the
  current config selects it.
module ath9k did not have configs CONFIG_ATH9K
module ath did not have configs CONFIG_ATH_COMMON
module ath9k_hw did not have configs CONFIG_ATH9K_HW
module ath9k_common did not have configs CONFIG_ATH9K_COMMON
#
# configuration written to .config
#
$
Quoted 3 lines

i assume it should be easy for someone else to reproduce this, but
if you want me to do any more testing later this afternoon, let me know.

I've bisected v3.7 (good) to v3.8 (already bad) with your lsmod, and using this script:
#!/bin/bash
set -e
git clean -dX
git clean -d
make allmodconfig
make LSMOD=/home/ymorin/r.pj.day.lsmod localmodconfig grep ATH9K .config

Quoted 5 lines

(and manually answering the few new questions), and it turned up the following cset as the culprit:
23c1d7f: wireless: allow Atheros card to not depend on ath.ko

Not sure where to go from there... :-/

i'm going to take a wild, uneducated stab at this, but it matches
what i was starting to suspect, anyway. this has nothing to do with config processing, it has to do specifically with how the Kconfig entries related to atheros cards were changed.

here's the important part:

$ git show 23c1d7f
... snip ...
    So, this patch introduce new Kconfig variable ATH_CARDS for belonging
    to the "Atheros Wireless Cards" family; while ATH_COMMON becomes hidden
    variable to express dependency on common Atheros code in ath.ko. Modules
    that depend on this common code now express it by setting ATH_COMMON.
... snip ...
-menuconfig ATH_COMMON
+config ATH_COMMON
+       tristate
+
+menuconfig ATH_CARDS

in short, a new variable, ATH_CARDS, was introduced that doesn't
appear in the earlier .config so, unsurprisingly, when you run "make oldconfig", in the midst of all of the other manual answers, you have to specify what you want done, and look at the default:

$ make oldconfig
... many manual choices ...
Atheros Wireless Cards (ATH_CARDS) [N/m/?] (NEW)   <-- there's the culprit
... snip ...

so running the standard "yes '' | make oldconfig" is going to
deselect what looks like almost all ath9k-related stuff, simply because a new, low-level dependency variable was introduced.

am i making sense here?

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#8 lore raw

Robert, All,

Quoted 30 lines · Robert P. J. Day

i'm going to take a wild, uneducated stab at this, but it matches
what i was starting to suspect, anyway. this has nothing to do with config processing, it has to do specifically with how the Kconfig entries related to atheros cards were changed.

here's the important part:

$ git show 23c1d7f
... snip ...
    So, this patch introduce new Kconfig variable ATH_CARDS for belonging
    to the "Atheros Wireless Cards" family; while ATH_COMMON becomes hidden
    variable to express dependency on common Atheros code in ath.ko. Modules
    that depend on this common code now express it by setting ATH_COMMON.
... snip ...
(quoted diff) +4 -1
-menuconfig ATH_COMMON
+config ATH_COMMON
+       tristate
+
+menuconfig ATH_CARDS
 
  in short, a new variable, ATH_CARDS, was introduced that doesn't

appear in the earlier .config so, unsurprisingly, when you run "make oldconfig", in the midst of all of the other manual answers, you have to specify what you want done, and look at the default:

$ make oldconfig
... many manual choices ...
Atheros Wireless Cards (ATH_CARDS) [N/m/?] (NEW)   <-- there's the culprit
... snip ...
Quoted 5 lines

so running the standard "yes '' | make oldconfig" is going to
deselect what looks like almost all ath9k-related stuff, simply because a new, low-level dependency variable was introduced.

am i making sense here?

Not sure how streamline_config,pl should behave. Cc-ing Steven as the original author, maybe he has a better understanding on this situation.

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#9 lore raw
Quoted 33 lines · Yann E. MORIN

Robert, All,

Quoted 30 lines · Robert P. J. Day

i'm going to take a wild, uneducated stab at this, but it matches
what i was starting to suspect, anyway. this has nothing to do with config processing, it has to do specifically with how the Kconfig entries related to atheros cards were changed.

here's the important part:

$ git show 23c1d7f
... snip ...
    So, this patch introduce new Kconfig variable ATH_CARDS for belonging
    to the "Atheros Wireless Cards" family; while ATH_COMMON becomes hidden
    variable to express dependency on common Atheros code in ath.ko. Modules
    that depend on this common code now express it by setting ATH_COMMON.
... snip ...
(quoted diff) +4 -1
-menuconfig ATH_COMMON
+config ATH_COMMON
+       tristate
+
+menuconfig ATH_CARDS
 
  in short, a new variable, ATH_CARDS, was introduced that doesn't

appear in the earlier .config so, unsurprisingly, when you run "make oldconfig", in the midst of all of the other manual answers, you have to specify what you want done, and look at the default:

$ make oldconfig
... many manual choices ...
Atheros Wireless Cards (ATH_CARDS) [N/m/?] (NEW)   <-- there's the culprit
... snip ...
Quoted 8 lines
Quoted 5 lines

so running the standard "yes '' | make oldconfig" is going to
deselect what looks like almost all ath9k-related stuff, simply because a new, low-level dependency variable was introduced.

am i making sense here?

Not sure how streamline_config,pl should behave. Cc-ing Steven as the original author, maybe he has a better understanding on this situation.

i *think* i see what's going on here. here's the list of
atheros-related modules currently loaded on my system that would be used as the basis for "make localmodconfig":

$ lsmod | grep ^ath
ath9k                 110134  0
ath9k_common           14053  1 ath9k
ath9k_hw              405771  2 ath9k,ath9k_common
ath                    23827  3 ath9k,ath9k_common,ath9k_hw
$

note there is no module named "ath_cards", but my starting .config
indeed contains an entry for that as a module:

$ grep CONFIG_ATH ../3.9.config
CONFIG_ATH_COMMON=m
CONFIG_ATH_CARDS=m                 <-- there
# CONFIG_ATH_DEBUG is not set
# CONFIG_ATH5K is not set
# CONFIG_ATH5K_PCI is not set
CONFIG_ATH9K_HW=m
CONFIG_ATH9K_COMMON=m
CONFIG_ATH9K_BTCOEX_SUPPORT=y
CONFIG_ATH9K=m
CONFIG_ATH9K_PCI=y
# CONFIG_ATH9K_AHB is not set
# CONFIG_ATH9K_DEBUGFS is not set
CONFIG_ATH9K_RATE_CONTROL=y
# CONFIG_ATH9K_HTC is not set
# CONFIG_ATH6KL is not set
$

and that symbol is defined in drivers/net/wireless/ath/Kconfig as a
"menuconfig":

config ATH_COMMON
tristate

menuconfig ATH_CARDS <-- there
tristate "Atheros Wireless Cards"
... snip ...

so i'm just going to *guess* that the config procedure, when faced
with the line "CONFIG_ATH_CARDS=m", goes looking for a loaded module called "ath_cards" or "ath9k_cards", doesn't find it, and turns off that selection, consequently turning off *all* of my atheros functionality.

the Kconfig file claims that:

"menuconfig ATH_CARDS
tristate "Atheros Wireless Cards"
depends on CFG80211 && (!UML || BROKEN)
---help---
This will enable the support for the Atheros wireless drivers. ath5k, ath9k, ath9k_htc and ar9170 drivers share some common code, this option enables the common ath.ko module which shares common helpers.
^^^^^^

but the corresponding Makefile has:

obj-$(CONFIG_ATH_COMMON) += ath.o

where ath.o depends on ATH_COMMON, *not* ATH_CARDS.

that just seems like a badly-written set of Kconfig structures and
dependencies.

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#10 lore raw
Quoted 8 lines · Robert P. J. Day

On Sun, 28 Apr 2013, Yann E. MORIN wrote:

note there is no module named "ath_cards", but my starting .config
indeed contains an entry for that as a module:

$ grep CONFIG_ATH ../3.9.config
CONFIG_ATH_COMMON=m
CONFIG_ATH_CARDS=m                 <-- there

Ah, it was enabled when you ran localmodconfig?

Quoted 42 lines

# CONFIG_ATH_DEBUG is not set
# CONFIG_ATH5K is not set
# CONFIG_ATH5K_PCI is not set
CONFIG_ATH9K_HW=m
CONFIG_ATH9K_COMMON=m
CONFIG_ATH9K_BTCOEX_SUPPORT=y
CONFIG_ATH9K=m
CONFIG_ATH9K_PCI=y
# CONFIG_ATH9K_AHB is not set
# CONFIG_ATH9K_DEBUGFS is not set
CONFIG_ATH9K_RATE_CONTROL=y
# CONFIG_ATH9K_HTC is not set
# CONFIG_ATH6KL is not set
$

and that symbol is defined in drivers/net/wireless/ath/Kconfig as a
"menuconfig":

config ATH_COMMON
tristate

menuconfig ATH_CARDS <-- there
tristate "Atheros Wireless Cards"
... snip ...

so i'm just going to *guess* that the config procedure, when faced
with the line "CONFIG_ATH_CARDS=m", goes looking for a loaded module called "ath_cards" or "ath9k_cards", doesn't find it, and turns off that selection, consequently turning off *all* of my atheros functionality.

the Kconfig file claims that:

"menuconfig ATH_CARDS
tristate "Atheros Wireless Cards"
depends on CFG80211 && (!UML || BROKEN)
---help---
This will enable the support for the Atheros wireless drivers. ath5k, ath9k, ath9k_htc and ar9170 drivers share some common code, this option enables the common ath.ko module which shares common helpers.
^^^^^^

Quoted 8 lines

but the corresponding Makefile has:

obj-$(CONFIG_ATH_COMMON) += ath.o

where ath.o depends on ATH_COMMON, *not* ATH_CARDS.

that just seems like a badly-written set of Kconfig structures and
dependencies.

localmodconfig is set up to recognize options dependent on config menus. I'll have to take a look. Can you send me your .config file you started with, and what lsmod gives you. "lsmod > file". I'll see what broke.

Oh, and one last thing. It's best to email me at [email protected], as I don't always check my work email ;-)

Thanks,

-- Steve

#11 lore raw
Quoted 63 lines · Steven Rostedt
Quoted 8 lines · Robert P. J. Day

On Sun, 28 Apr 2013, Yann E. MORIN wrote:

note there is no module named "ath_cards", but my starting .config
indeed contains an entry for that as a module:

$ grep CONFIG_ATH ../3.9.config
CONFIG_ATH_COMMON=m
CONFIG_ATH_CARDS=m                 <-- there

Ah, it was enabled when you ran localmodconfig?

Quoted 42 lines

# CONFIG_ATH_DEBUG is not set
# CONFIG_ATH5K is not set
# CONFIG_ATH5K_PCI is not set
CONFIG_ATH9K_HW=m
CONFIG_ATH9K_COMMON=m
CONFIG_ATH9K_BTCOEX_SUPPORT=y
CONFIG_ATH9K=m
CONFIG_ATH9K_PCI=y
# CONFIG_ATH9K_AHB is not set
# CONFIG_ATH9K_DEBUGFS is not set
CONFIG_ATH9K_RATE_CONTROL=y
# CONFIG_ATH9K_HTC is not set
# CONFIG_ATH6KL is not set
$

and that symbol is defined in drivers/net/wireless/ath/Kconfig as a
"menuconfig":

config ATH_COMMON
tristate

menuconfig ATH_CARDS <-- there
tristate "Atheros Wireless Cards"
... snip ...

so i'm just going to *guess* that the config procedure, when faced
with the line "CONFIG_ATH_CARDS=m", goes looking for a loaded module called "ath_cards" or "ath9k_cards", doesn't find it, and turns off that selection, consequently turning off *all* of my atheros functionality.

the Kconfig file claims that:

"menuconfig ATH_CARDS
tristate "Atheros Wireless Cards"
depends on CFG80211 && (!UML || BROKEN)
---help---
This will enable the support for the Atheros wireless drivers. ath5k, ath9k, ath9k_htc and ar9170 drivers share some common code, this option enables the common ath.ko module which shares common helpers.
^^^^^^

Quoted 8 lines

but the corresponding Makefile has:

obj-$(CONFIG_ATH_COMMON) += ath.o

where ath.o depends on ATH_COMMON, *not* ATH_CARDS.

that just seems like a badly-written set of Kconfig structures and
dependencies.

Quoted 6 lines

localmodconfig is set up to recognize options dependent on config menus. I'll have to take a look. Can you send me your .config file you started with, and what lsmod gives you. "lsmod > file". I'll see what broke.

Oh, and one last thing. It's best to email me at [email protected], as I don't always check my work email ;-)

for what it's worth, it's "make oldconfig" that happily tosses away
the ATH9K-related stuff. with a fresh 3.9 kernel, i pulled over my .config file that works fine for 3.7, and here's the important stuff (atheros-related):

$ grep CONFIG_ATH .config
CONFIG_ATH_COMMON=m
# CONFIG_ATH_DEBUG is not set
CONFIG_ATH5K=m
# CONFIG_ATH5K_DEBUG is not set
# CONFIG_ATH5K_TRACER is not set
CONFIG_ATH5K_PCI=y
CONFIG_ATH9K_HW=m
CONFIG_ATH9K_COMMON=m
CONFIG_ATH9K_BTCOEX_SUPPORT=y
CONFIG_ATH9K=m
CONFIG_ATH9K_PCI=y
CONFIG_ATH9K_AHB=y
CONFIG_ATH9K_DEBUGFS=y
CONFIG_ATH9K_MAC_DEBUG=y
CONFIG_ATH9K_RATE_CONTROL=y
CONFIG_ATH9K_HTC=m
CONFIG_ATH9K_HTC_DEBUGFS=y
# CONFIG_ATH6KL is not set
$

if i then run:

$ yes '' | make oldconfig

here's the result of that command a second time:

$ grep CONFIG_ATH .config
# CONFIG_ATH_CARDS is not set
$

all gone. and if i try a localmodconfig, it does in fact warn me
about what's about to happen:

$ make localmodconfig
using config: '.config'
vboxnetadp config not found!!
vboxnetflt config not found!!
vboxdrv config not found!!
vboxpci config not found!!
WARNING: ATH9K_HW is required, but nothing in the
  current config selects it.
WARNING: ATH_COMMON is required, but nothing in the
  current config selects it.
WARNING: ATH9K_COMMON is required, but nothing in the
  current config selects it.
module ath9k did not have configs CONFIG_ATH9K
module ath did not have configs CONFIG_ATH_COMMON
module ath9k_hw did not have configs CONFIG_ATH9K_HW
module ath9k_common did not have configs CONFIG_ATH9K_COMMON
... snip ...

so it sees the currently loaded modules:

ath9k                 110134  0
ath9k_common           14053  1 ath9k
ath9k_hw              405771  2 ath9k,ath9k_common
ath                    23827  3 ath9k,ath9k_common,ath9k_hw

it just has no idea how to hang onto them, yes?

at this point, i think this is one of those anomalous corner cases
that has to be recognized and resolved manually. but i can reproduce all of this from scratch if you'd like to see it.

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#12 lore raw
Quoted 2 lines · Robert P. J. Day

for what it's worth, it's "make oldconfig" that happily tosses away

OK, so then it's not a localmodconfig issue.

Quoted 47 lines

the ATH9K-related stuff. with a fresh 3.9 kernel, i pulled over my .config file that works fine for 3.7, and here's the important stuff (atheros-related):

$ grep CONFIG_ATH .config
CONFIG_ATH_COMMON=m
# CONFIG_ATH_DEBUG is not set
CONFIG_ATH5K=m
# CONFIG_ATH5K_DEBUG is not set
# CONFIG_ATH5K_TRACER is not set
CONFIG_ATH5K_PCI=y
CONFIG_ATH9K_HW=m
CONFIG_ATH9K_COMMON=m
CONFIG_ATH9K_BTCOEX_SUPPORT=y
CONFIG_ATH9K=m
CONFIG_ATH9K_PCI=y
CONFIG_ATH9K_AHB=y
CONFIG_ATH9K_DEBUGFS=y
CONFIG_ATH9K_MAC_DEBUG=y
CONFIG_ATH9K_RATE_CONTROL=y
CONFIG_ATH9K_HTC=m
CONFIG_ATH9K_HTC_DEBUGFS=y
# CONFIG_ATH6KL is not set
$

if i then run:

$ yes '' | make oldconfig

here's the result of that command a second time:

$ grep CONFIG_ATH .config
# CONFIG_ATH_CARDS is not set
$

all gone. and if i try a localmodconfig, it does in fact warn me
about what's about to happen:

$ make localmodconfig
using config: '.config'
vboxnetadp config not found!!
vboxnetflt config not found!!
vboxdrv config not found!!
vboxpci config not found!!
WARNING: ATH9K_HW is required, but nothing in the
  current config selects it.
WARNING: ATH_COMMON is required, but nothing in the
Quoted 8 lines
  current config selects it.
WARNING: ATH9K_COMMON is required, but nothing in the
  current config selects it.
module ath9k did not have configs CONFIG_ATH9K
module ath did not have configs CONFIG_ATH_COMMON
module ath9k_hw did not have configs CONFIG_ATH9K_HW
module ath9k_common did not have configs CONFIG_ATH9K_COMMON
... snip ...

I should probably have localmodconfig stop here and wait for user input, as this is usually lost in the make oldconfig that runs later.

Quoted 8 lines

so it sees the currently loaded modules:

ath9k                 110134  0
ath9k_common           14053  1 ath9k
ath9k_hw              405771  2 ath9k,ath9k_common
ath                    23827  3 ath9k,ath9k_common,ath9k_hw
Quoted 5 lines

it just has no idea how to hang onto them, yes?

at this point, i think this is one of those anomalous corner cases
that has to be recognized and resolved manually. but i can reproduce all of this from scratch if you'd like to see it.

This looks like one of those things that happen when you use an older config with a newer kernel. localmodconfig is really made for just turning off what's not used, not for turning on things that were not there before. This is because it wont know the right dependency to turn on.

I don't consider this a bug, just something you need to be aware of.

I could add to localmodconfig to stop after the warnings and say something like:

"The above warnings could be caused by running an older config with a newer kernel. You may want to run the origin config against 'make oldconfig' to select any new dependencies that might be required."

-- Steve

#13 lore raw

On Mon, 29 Apr 2013, Steven Rostedt wrote:

... snip ...

Quoted 23 lines

I should probably have localmodconfig stop here and wait for user input, as this is usually lost in the make oldconfig that runs later.

Quoted 8 lines

so it sees the currently loaded modules:

ath9k                 110134  0
ath9k_common           14053  1 ath9k
ath9k_hw              405771  2 ath9k,ath9k_common
ath                    23827  3 ath9k,ath9k_common,ath9k_hw
Quoted 5 lines

it just has no idea how to hang onto them, yes?

at this point, i think this is one of those anomalous corner cases
that has to be recognized and resolved manually. but i can reproduce all of this from scratch if you'd like to see it.

This looks like one of those things that happen when you use an older config with a newer kernel. localmodconfig is really made for just turning off what's not used, not for turning on things that were not there before. This is because it wont know the right dependency to turn on.

Quoted 8 lines

I don't consider this a bug, just something you need to be aware of.

I could add to localmodconfig to stop after the warnings and say something like:

"The above warnings could be caused by running an older config with a newer kernel. You may want to run the origin config against 'make oldconfig' to select any new dependencies that might be required."

i threw all this onto a wiki page, if anyone else wants to play
along:

http://www.crashcourse.ca/wiki/index.php/Atheros_and_localmodconfig

and you're right, of course, it's not a "localmodconfig" thing after all.

however, the last bit on that wiki page still puzzles me and i just
noticed it -- even after i manually add in the atheros stuff, localmodconfig still throws it away again, this time without warning.

anyway, i know the workaround so i'll go with that. i figure i've
beaten this adequately senseless.

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#14 lore raw
Quoted 4 lines · Robert P. J. Day

however, the last bit on that wiki page still puzzles me and i just
noticed it -- even after i manually add in the atheros stuff, localmodconfig still throws it away again, this time without warning.

That looks to me like a localmodconfig bug. You're telling me that you did the make menuconfig, got everything in there, and after doing the localmodconfig, it throws it out?

That now interests me.

Can you send me the .config after the make menuconfig, and the lsmod output you used. As well as which kernel version you are testing against.

Thanks!

-- Steve

#15 lore raw
Quoted 10 lines · Steven Rostedt
Quoted 3 lines · Robert P. J. Day

however, the last bit on that wiki page still puzzles me and i just
noticed it -- even after i manually add in the atheros stuff, localmodconfig still throws it away again, this time without warning.

That looks to me like a localmodconfig bug. You're telling me that you did the make menuconfig, got everything in there, and after doing the localmodconfig, it throws it out?

Quoted 5 lines

That now interests me.

Can you send me the .config after the make menuconfig, and the lsmod output you used. As well as which kernel version you are testing against.

it appears that way. let me make absolutely sure this is what's
happening to avoid embarrassing myself. :-) back in a bit ...

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================

A message that is not in the archive (sent off-list or not yet received): alpine.DEB.2.02.1304291121180.26536@oneiric

#17 lore raw
Quoted 17 lines · Robert P. J. Day

again, looks good, so:

$ make localmodconfig
using config: '.config'
vboxnetadp config not found!!
vboxnetflt config not found!!
vboxdrv config not found!!
vboxpci config not found!!
... snip, nothing related to atheros stuff ...
$

but now this doesn't look good:

$ grep CONFIG_ATH .config
# CONFIG_ATH_CARDS is not set
$
Quoted 8 lines

i don't think *that* should have happened. on, and one last data point.

if i start fresh with "make defconfig", and go through the same
steps, "make localmodconfig" will *still* throw away the ATH-related stuff, that you can verify for yourself. so it would seem to be something in the structure of the Kconfig files for atheros stuff.

Found the bug.

In drivers/net/wireless/ath/Kconfig:

---
if ATH_CARDS

config ATH_DEBUG
bool "Atheros wireless debugging"
---help---
Say Y, if you want to debug atheros wireless drivers. Right now only ath9k makes use of this.

source "drivers/net/wireless/ath/ath5k/Kconfig" source "drivers/net/wireless/ath/ath9k/Kconfig" source "drivers/net/wireless/ath/carl9170/Kconfig" source "drivers/net/wireless/ath/ath6kl/Kconfig" source "drivers/net/wireless/ath/ar5523/Kconfig" source "drivers/net/wireless/ath/wil6210/Kconfig"

endif
---

The bug is in the way localmodconfig handles source files. As I wrote the code to only have one file descriptor open at a time, I just stored all the "source" files in an array as I parsed the current source file. At the end, I ran the same code to parse the source files that were found.

Unfortunately, I didn't take into account that the "if" statement would surround including source files. Thus, the dependency work did not detect that the "if ATH_CARDS" was required for the included files.

I don't know of another way to fix this besides just opening the files as they are found. I might as well do that, and remove the "delayed" logic. I'll just have to have multiple file descriptors opened in this case. Shouldn't be too big of a deal.

Thanks,

-- Steve

#18 lore raw
In reply to a message not in the archive

Can you add this patch and see if it fixes your issue. If so, can I add your "tested-by" to this patch?

Thanks,

-- Steve

scripts/kconfig/streamline_config.pl +7 -10
index 3368939..4606cdf 100644
@@ -156,7 +156,6 @@ sub read_kconfig {
 
     my $state = "NONE";
     my $config;
-    my @kconfigs;
 
     my $cont = 0;
     my $line;
@@ -190,7 +189,13 @@ sub read_kconfig {
 
 	# collect any Kconfig sources
 	if (/^source\s*"(.*)"/) {
-	    $kconfigs[$#kconfigs+1] = $1;
+	    my $kconfig = $1;
+	    # prevent reading twice.
+	    if (!defined($read_kconfigs{$kconfig})) {
+		$read_kconfigs{$kconfig} = 1;
+		read_kconfig($kconfig);
+	    }
+	    next;
 	}
 
 	# configs found
@@ -250,14 +255,6 @@ sub read_kconfig {
 	}
     }
     close($kinfile);
-
-    # read in any configs that were found.
-    foreach my $kconfig (@kconfigs) {
-	if (!defined($read_kconfigs{$kconfig})) {
-	    $read_kconfigs{$kconfig} = 1;
-	    read_kconfig($kconfig);
-	}
-    }
 }
 
 if ($kconfig) {
#19 lore raw
Quoted 2 lines · Steven Rostedt

Can you add this patch and see if it fixes your issue. If so, can I add your "tested-by" to this patch?

i'll get to this shortly and let you know.

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#20 lore raw
In reply to Steven Rostedt
Quoted 2 lines · Steven Rostedt

Can you add this patch and see if it fixes your issue. If so, can I add your "tested-by" to this patch?

here's what i can verify. if i start with stock linux 3.9 and copy
in a known good .config with ATH-related stuff, here's the situation immediately after the copy:

$ grep CONFIG_ATH .config
CONFIG_ATH_COMMON=m
CONFIG_ATH_CARDS=m
# CONFIG_ATH_DEBUG is not set
# CONFIG_ATH5K is not set
# CONFIG_ATH5K_PCI is not set
CONFIG_ATH9K_HW=m
CONFIG_ATH9K_COMMON=m
# CONFIG_ATH9K_BTCOEX_SUPPORT is not set
CONFIG_ATH9K=m
CONFIG_ATH9K_PCI=y
# CONFIG_ATH9K_AHB is not set
# CONFIG_ATH9K_DEBUGFS is not set
CONFIG_ATH9K_RATE_CONTROL=y
# CONFIG_ATH9K_HTC is not set
# CONFIG_ATH6KL is not set
$

which is fine and represents a valid collection of settings for 3.9. but here's where things go wrong in the original case:

$ make localmodconfig
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
using config: '.config'
vboxnetadp config not found!!
vboxnetflt config not found!!
vboxdrv config not found!!
vboxpci config not found!!
#
# configuration written to .config
#
$ grep CONFIG_ATH .config
# CONFIG_ATH_CARDS is not set   <-- obviously wrong, all my ATH stuff is gone
$

if i apply your patch and do this all over again, then i retain all
the ATH-related stuff after the "make localmodconfig":

$ grep CONFIG_ATH .config
CONFIG_ATH_COMMON=m
CONFIG_ATH_CARDS=m
# CONFIG_ATH_DEBUG is not set
# CONFIG_ATH5K is not set
# CONFIG_ATH5K_PCI is not set
CONFIG_ATH9K_HW=m
CONFIG_ATH9K_COMMON=m
# CONFIG_ATH9K_BTCOEX_SUPPORT is not set
CONFIG_ATH9K=m
CONFIG_ATH9K_PCI=y
# CONFIG_ATH9K_AHB is not set
# CONFIG_ATH9K_DEBUGFS is not set
CONFIG_ATH9K_RATE_CONTROL=y
# CONFIG_ATH9K_HTC is not set
# CONFIG_ATH6KL is not set
$

so the patch appears to resolve at least that specific issue.

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#21 lore raw
In reply to Steven Rostedt
Quoted 2 lines · Steven Rostedt

Can you add this patch and see if it fixes your issue. If so, can I add your "tested-by" to this patch?

just to be clear, that patch didn't solve the issue involving a
config file from an earlier kernel but i don't think it was supposed to, was it?

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#22 lore raw
Quoted 8 lines · Robert P. J. Day
Quoted 2 lines · Steven Rostedt

Can you add this patch and see if it fixes your issue. If so, can I add your "tested-by" to this patch?

just to be clear, that patch didn't solve the issue involving a
config file from an earlier kernel but i don't think it was supposed to, was it?

No, and honestly, I don't see that as an issue ;-) Old configs with new kernels will always have issues if a new dependency is created. In other words, that's a WONTFIX bug.

make localmodconfig is to disable only the configs not needed for the loaded modules. If a required config was not in the original .config, then that's out of scope for localmodconfig. But the bug you reported was, localmodconfig was disabling a required config that was in the original .config.

-- Steve

#23 lore raw
Quoted 6 lines · Steven Rostedt
Quoted 5 lines · Robert P. J. Day
Quoted 2 lines · Steven Rostedt

Can you add this patch and see if it fixes your issue. If so, can I add your "tested-by" to this patch?

Quoted 7 lines
Quoted 3 lines

just to be clear, that patch didn't solve the issue involving a
config file from an earlier kernel but i don't think it was supposed to, was it?

No, and honestly, I don't see that as an issue ;-) Old configs with new kernels will always have issues if a new dependency is created. In other words, that's a WONTFIX bug.

no, that's fine, that's what i assumed.

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#24 lore raw
In reply to Steven Rostedt
Quoted 40 lines · Steven Rostedt

Can you add this patch and see if it fixes your issue. If so, can I add your "tested-by" to this patch?

Thanks,

-- Steve

scripts/kconfig/streamline_config.pl +7 -3
index 3368939..4606cdf 100644
@@ -156,7 +156,6 @@ sub read_kconfig {
 
     my $state = "NONE";
     my $config;
-    my @kconfigs;
 
     my $cont = 0;
     my $line;
@@ -190,7 +189,13 @@ sub read_kconfig {
 
 	# collect any Kconfig sources
 	if (/^source\s*"(.*)"/) {
-	    $kconfigs[$#kconfigs+1] = $1;
+	    my $kconfig = $1;
+	    # prevent reading twice.
+	    if (!defined($read_kconfigs{$kconfig})) {
+		$read_kconfigs{$kconfig} = 1;
+		read_kconfig($kconfig);
+	    }
+	    next;
 	}
 
 	# configs found
@@ -250,14 +255,6 @@ sub read_kconfig {
 	}
     }
     close($kinfile);
-

scripts/kconfig/streamline_config.pl sub read_kconfig { · line 260

Quoted 10 lines
scripts/kconfig/streamline_config.pl +0 -7
-    # read in any configs that were found.
-    foreach my $kconfig (@kconfigs) {
-	if (!defined($read_kconfigs{$kconfig})) {
-	    $read_kconfigs{$kconfig} = 1;
-	    read_kconfig($kconfig);
-	}
-    }
 }
 
 if ($kconfig) {

i'm interested -- should that Kconfig file have been written using a
different structure to avoid this issue? surely there are other Kconfig files that would have had the same problem, no? i can't believe this could be restricted to a single example involving atheros stuff.

rday

p.s. i'm going to submit at least one patch to reorg the atheros Kconfig file since it's a bit awkward at the moment -- when you select some options, other options suddenly appear in arbitrary other locations. i really hate that.

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#25 lore raw
Quoted 5 lines · Robert P. J. Day

i'm interested -- should that Kconfig file have been written using a
different structure to avoid this issue? surely there are other Kconfig files that would have had the same problem, no? i can't believe this could be restricted to a single example involving atheros stuff.

I did a quick search and there's lots of places that source is within if statements. But the config used isn't usually a tristate. That is, it is either enabled or not, but can't be a module.

Here the if condition was a module and is something that localmodconfig can disabled.

Hmm, I did find another case like this (and there may be more).

drivers/ipack/Kconfig does it too. But nobody noticed.

Anyway, it's fixed now, which is good.

-- Steve

#26 lore raw
In reply to Yann E. MORIN
Quoted 33 lines · Yann E. MORIN

Robert, All,

Quoted 30 lines · Robert P. J. Day

i'm going to take a wild, uneducated stab at this, but it matches
what i was starting to suspect, anyway. this has nothing to do with config processing, it has to do specifically with how the Kconfig entries related to atheros cards were changed.

here's the important part:

$ git show 23c1d7f
... snip ...
    So, this patch introduce new Kconfig variable ATH_CARDS for belonging
    to the "Atheros Wireless Cards" family; while ATH_COMMON becomes hidden
    variable to express dependency on common Atheros code in ath.ko. Modules
    that depend on this common code now express it by setting ATH_COMMON.
... snip ...
(quoted diff) +4 -1
-menuconfig ATH_COMMON
+config ATH_COMMON
+       tristate
+
+menuconfig ATH_CARDS
 
  in short, a new variable, ATH_CARDS, was introduced that doesn't

appear in the earlier .config so, unsurprisingly, when you run "make oldconfig", in the midst of all of the other manual answers, you have to specify what you want done, and look at the default:

$ make oldconfig
... many manual choices ...
Atheros Wireless Cards (ATH_CARDS) [N/m/?] (NEW)   <-- there's the culprit
... snip ...
Quoted 8 lines
Quoted 5 lines

so running the standard "yes '' | make oldconfig" is going to
deselect what looks like almost all ath9k-related stuff, simply because a new, low-level dependency variable was introduced.

am i making sense here?

Not sure how streamline_config,pl should behave. Cc-ing Steven as the original author, maybe he has a better understanding on this situation.

Running an older config on a newer kernel can have strange effects, although I do that all the time. I just expect the strange effects and fix them when they occur.

Looks like the above is one of the strange effects that need a manual fix. localmodconfig will not enable anything that wasn't enabled in the original config. If a new dependency is added by a newer kernel then you need to run an make oldconfig and make sure you have everything before doing a localmodconfig. Otherwise, you may lose a module.

Hmm, I may be able to have localmodconfig warn if it can not satisfy a module.

-- Steve

#27 lore raw
In reply to Yann E. MORIN
Quoted 43 lines · Yann E. MORIN

Robert, All,

Quoted 40 lines · Robert P. J. Day

probably a simple explanation for this, but my first time playing
with "make localmodconfig" and it appears to be tossing all my ath9k-related module settings.

currently running ubuntu on a 64-bit asus laptop with the following
ath9k-related modules:

$ lsmod | grep ath9k
ath9k                 149545  0
mac80211              558577  1 ath9k
ath9k_common           14054  1 ath9k
ath9k_hw              408874  2 ath9k,ath9k_common
ath                    23828  3 ath9k,ath9k_common,ath9k_hw
cfg80211              211955  3 ath9k,mac80211,ath
$

starting with current kernel "git pull", i do:

$ make allmodconfig

at which point i get:

$ grep ATH9K .config
CONFIG_ATH9K_HW=m
CONFIG_ATH9K_COMMON=m
CONFIG_ATH9K_DFS_DEBUGFS=y
CONFIG_ATH9K_BTCOEX_SUPPORT=y
CONFIG_ATH9K=m
CONFIG_ATH9K_PCI=y
CONFIG_ATH9K_AHB=y
CONFIG_ATH9K_DEBUGFS=y
CONFIG_ATH9K_DFS_CERTIFIED=y
CONFIG_ATH9K_MAC_DEBUG=y
CONFIG_ATH9K_RATE_CONTROL=y
CONFIG_ATH9K_HTC=m
CONFIG_ATH9K_HTC_DEBUGFS=y
$

which looks reasonable(?). then run:

Quoted 7 lines
Quoted 5 lines
$ make localmodconfig

have to answer maybe 4 questions manually, at which point i have:

$ grep ATH9K .config

Can you send the output of your lsmod, please?

hang on, something just seems weird here. let me start again with:

$ make distclean

now i'm going to copy the .config file that was the basis of the currently running kernel:

$ cp /boot/config-3.7.0-rc4+ .config

and i can certainly see that this .config has a number of ATH9K-related config settings:

$ grep ATH9K .config
CONFIG_ATH9K_HW=m
CONFIG_ATH9K_COMMON=m
CONFIG_ATH9K_BTCOEX_SUPPORT=y
CONFIG_ATH9K=m
CONFIG_ATH9K_PCI=y
CONFIG_ATH9K_AHB=y
CONFIG_ATH9K_DEBUGFS=y
CONFIG_ATH9K_MAC_DEBUG=y
CONFIG_ATH9K_RATE_CONTROL=y
CONFIG_ATH9K_HTC=m
CONFIG_ATH9K_HTC_DEBUGFS=y
$

but if i run:

$ yes '' | make oldconfig

i get:

$ grep ATH9K .config
$

that is, all the ATH9K-related modules are deselected. i don't understand that -- so it's not a "localmodconfig" thing, it's "oldconfig" that's wiping out my ATH9K config settings. thoughts? am i doing something invalid?

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================