Bug 208854

Summary: Detection of ISA Card 3c509 does not work after installation
Product: [openSUSE] SUSE Linux 10.1 Reporter: Dieter Jurzitza <dieter.jurzitza>
Component: YaST2Assignee: Michal Zugec <mzugec>
Status: RESOLVED WONTFIX QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None CC: englundc, roger
Version: Final   
Target Milestone: ---   
Hardware: i586   
OS: SuSE Linux 10.1   
Whiteboard:
Found By: Customer Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: patch against sysconfig to handle module loading for isa-cards
Optimized patch / less error-detection prone
output of hwinfo --netcard
Output of grep . /sys/bus/pnp/devices/*/id
Output when running the file through YaST as suggested by Michal

Description Dieter Jurzitza 2006-09-28 19:42:26 UTC
The 3c509 is problemlessly detected by Yast and installable. However, after the next boot, the network card is not present.

This is due to the fact that the module 3c509 is never loaded - even though the corresponding configuration exists in /etc/sysconfig/hardware.

The entry is:
/etc/sysconfig/hardware/hwcfg-bus-isa-00:02.00

it's contents:
MODULE='3c509'
MODULE_OPTIONS=''
STARTMODE='auto'

I have to load the module 3c509 in /etc/init.d/boot to make it work. Then everything works as expected (modprobe 3c509 in /etc/init.d/boot.local). This should not be neccessary IMHO.

I appreciate to test anything neccessary to fix this.
Take care



Dieter Jurzitza
Comment 1 Lars Marowsky-Bree 2006-09-29 09:40:18 UTC
This isn't a kernel bug. The hot/coldplug system should load the module on boot, then.
Comment 2 Kay Sievers 2006-09-29 11:32:38 UTC
ISA cards are not detectable today and need a static sysconfig entry. Or you can put the module name into: /etc/sysconfig/kernel::MODULES_LOADED_ON_BOOT=.

An existing static config would be applied by the udev boot script. Christian, how is such a config supposed to be created?
Comment 3 Christian Zoz 2006-09-29 12:34:46 UTC
YaST should create it.
Comment 4 Dieter Jurzitza 2006-09-29 18:44:25 UTC
Dear SuSE - Team,
the strange thing about this is the fact that good old SuSE 9.3 (oh I know, nobody wants to hear this ... :-)) does load the module. So something must have changed in the boot process that leaves the module unloaded.

Mr. Sievers - this will always work since there is no difference to putting a corresponding entry into /etc/init.d/boot.local, but this is difficult for the "normal" user and hard to understand, because the detection of the card works problemlessly (in yast when searching for network cards it is found automatically). Given this a corresponding message in yast would be required or - yast should simply add it to the MODULE_LOADED_ON_BOOT - variable.

Just my 2 cents here ...
Take care


Dieter Jurzitza
Comment 5 Thomas Fehr 2006-10-04 11:35:28 UTC
Reassigned to yast2-network
Comment 6 Dieter Jurzitza 2006-12-10 20:08:32 UTC
Created attachment 109028 [details]
patch against sysconfig to handle module loading for isa-cards

Dear maintainers,
after installation of SuSE 10.2 I was faced with the old problem I had had found for SuSE 10.1 (and before).
So I thought it might make sense to supply a patch; this one goes against sysconfig, please check and let me know.
Whatever you find bad about it: as a matter of fact it is working :-)
Thank you for considering,
take care


Dieter Jurzitza
Comment 7 Dieter Jurzitza 2006-12-15 11:59:49 UTC
Created attachment 109898 [details]
Optimized patch / less error-detection prone

This is a slight optimization of my initial bug; the possibility to wrongly detect wrong names has been reduced in order to avoid double - naming issues.
Take care


Dieter Jurzitza
Comment 8 Michal Zugec 2006-12-15 13:05:29 UTC
Christian, 
could you check this script and eventually apply it?
Comment 9 Christian Zoz 2006-12-15 14:53:28 UTC
No, i will not apply this patch, because it does not fit into the design of hotplug/netcontrol. And it is not necessary.

All we need is a single additional keyword in the hwcfg-* filename: 'static'.
Name it hwcfg-static-bus-isa-00:02.00 and everything is fine. In this case 'bus-isa-00:02.00' is pure description and could be any string. All configurations starting with 'hwcfg-static' will be applied unconditionally at boot time. That is what kay meant with 'static config' in comment 2.

Note that 'network' and 'ifup' are not responsible for device initialisation. They only deal on registered network interfaces.
Comment 10 Dieter Jurzitza 2006-12-15 21:57:16 UTC
Hi Christian,
thank you for clarifying. You are perfectly right - and after your additional comments I understood what Kay had had meant.
Thanks - for me it is working now, I will sit and wait until someone finds the time to actually fix things in yast.
Thanks again,
take care


Dieter Jurzitza
Comment 11 Michal Zugec 2007-05-30 19:59:53 UTC
Sorry for delay.
Kay, I don't understand this:

Dieter:
The 3c509 is problemlessly detected by Yast and installable.

You:
ISA cards are not detectable today 

How it is detected during installation? Do you have any ISA card (I need just to see "hwinfo --netcard" output)?
Comment 12 Kay Sievers 2007-05-31 01:37:24 UTC
Hwinfo may probe isapnp (not sure) during installation and suggest the right module, but such functionality does not exist in hotplug/udev/modalias stuff.

Just for the record, Dieter, what does:
  grep . /sys/bus/pnp/devices/*/id
print?

No, I don't have any ISA hardware.

Thanks!
Comment 13 Michal Zugec 2007-05-31 06:54:28 UTC
And paste here output from "hwinfo --netcard" please
Comment 14 Dieter Jurzitza 2007-05-31 08:11:11 UTC
Hi Folks,
unfortunately I have to work ;-). Therefore I cannot provide the requested information prior to this evening.
Sorry for that, but keep you informed!


Dieter
Comment 15 Dieter Jurzitza 2007-05-31 17:45:00 UTC
Hi Kay, hi Michael,
Chritian already said what is needed: the card is easily detected from YaST2. You configure it, you leave YaST2 and it works. You reboot - and it is gone.
The reason behind:
Christian mentioned correctly that the card needs the "static" string in the name of 

"hwcfg-bus-isa-01:02.00"

that gets written to /etc/sysconfig/hardware by YaST.

Because this does not happen, (by the way, it happens to everything else like the soundcard has been detected by pnp detection, the corresponding entry in /etc/sysconfig/hardware is called hwcfg-static-sound-0) this file is not parsed for the module that ought to be loaded and consequently the card vanishes after reboot because the module does not get loaded.
I kind of fixed this with my script checking whether all modules that are written into hwcfg-files in /etc/sysconfig/hardware get loaded at boot and load them if not, but Christian made the right suggestion.
YaST2 ought to add the string "static" to the filename, too.
This bug is older than Methusalem :-), I cannot tell why nobody before me ever told you about it.

By the way, please find both outputs you requested in further attachements.
The name will help to distinguish!
Comment 16 Dieter Jurzitza 2007-05-31 17:46:24 UTC
Created attachment 143289 [details]
output of hwinfo --netcard
Comment 17 Dieter Jurzitza 2007-05-31 17:47:08 UTC
Created attachment 143290 [details]
Output of grep . /sys/bus/pnp/devices/*/id
Comment 18 Kay Sievers 2007-05-31 18:06:47 UTC
What does:
  /sbin/modinfo 3c509 | grep alias
print?
Comment 19 Dieter Jurzitza 2007-05-31 19:56:27 UTC
Nothing!

/sbin/modinfo 3c509:
fred@djunix2:~> /sbin/modinfo 3c509 
filename:       /lib/modules/2.6.18.8-0.3-default/kernel/drivers/net/3c509.ko
description:    3Com Etherlink III (3c509, 3c509B) ISA/PnP ethernet driver
license:        GPL
vermagic:       2.6.18.8-0.3-default SMP mod_unload 586 REGPARM gcc-4.1
depends:        
srcversion:     BB22246C35D996A8F9B633A
parm:           nopnp:disable ISA PnP support (0-1) (int)
parm:           max_interrupt_work:maximum events handled per interrupt (int)
parm:           xcvr:transceiver(s) (0=internal, 1=external) (array of int)
parm:           irq:IRQ number(s) (assigned) (array of int)
parm:           debug:debug level (0-6) (int)
Comment 20 Kay Sievers 2007-06-01 05:32:58 UTC
Just to explain why it isn't working anymore:

Hwinfo has a built-in list of some ISA cards, and "eisa 0x5094" is included, so it can match the card and knows what module to use. That's the reason older SUSE releases loaded the module, because they used hwinfo information.

Todays generic autoloading mechanism, relies entirely on information provided by the kernel modules itself, and not an (always outdated) list in system management tools. The module provided aliases match against the devices the kernel discovers.

That is your card:
  /sys/bus/pnp/devices/01:02.00/id -> TCM5094
but there is no match for it in the kernel module. The module containing the driver would need to export something like:
  alias: pnp:dTCM5094
to make todays module autoloading working.
Comment 23 Michal Zugec 2007-06-01 10:49:27 UTC
From howinfo output in comment #16 I see that YaST needs to parse "SysFS ID" option but SCR-probe agent doesn't provide it.
Martin, can you fix it?
After that reassign it back to me, thanks
Comment 24 Dieter Jurzitza 2007-06-01 18:52:12 UTC
Kay,
sorry for commenting on a comment: I understood #20. But why the heck does YaST then write a 
/etc/sysconfig/hardware/hwcfg-static-sound-0
(please note the "static" expression) 
for the soundcard:

hwinfo --sound:
33: ISA(PnP) 01.0: 0401 Multimedia audio controller
  [Created at isapnp.142]
  UDI: /org/freedesktop/Hal/devices/pnp_CTL0043
  Unique ID: R_Yp.lL9Gp+oo7k0
  SysFS ID: /devices/pnp1/01:01/01:01.00
  SysFS BusID: 01:01.00
  Hardware Class: sound
  Model: "Creative ViBRA16X"
  Vendor: CTL "Creative Technology Ltd."
  Device: eisa 0x00f0 "Creative ViBRA16X"
  SubVendor: CTL "Creative Technology Ltd."
  SubDevice: eisa 0x0043 
  Driver Info #0:
    Driver Status: snd-sb16 is active
    Driver Activation Cmd: "modprobe snd-sb16"
  Config Status: cfg=yes, avail=yes, need=no, active=unknown

and does write a

/etc/sysconfig/hardware/hwcfg-bus-isa-01:02.00

for the network card? Strange enough, the soundcard gives a bunch of aliases with
modinfo snd-sb16, 

but YaST denotes it as "static". And, if I rename it to hwcfg-bus-isa-01:01.00 what would IMHO correspond to the naming convention of the network card, the module of the soundcard is not detected, though according to your arguments it should probably be because it exports aliases?

Sometimes it is hard to understand things if you haven't got the appropriate documentation (or you do not know where to look for it :-))

Anyway, thank you for your time, folks!
Take care



Dieter
Comment 25 Kay Sievers 2007-06-04 18:33:25 UTC
Yes, that's unfortunately inconsistent. But we are moving away from hwcfg files anyway, so that behavior will change in the future.

That may work with autoloading, yes, but for historical reasons, SUSE disables autoloading for audio cards and depends on hwcfg files. It was planned to change that, but I'm not sure about the current state.
Comment 26 Martin Vidner 2007-06-05 08:40:12 UTC
comment 23: "sysfs_id" added to yast2-hardware-detection-2.15.4.
Comment 27 Michal Zugec 2007-06-07 15:47:39 UTC
fixed in yast2-network-2.15.41
Comment 28 Michal Zugec 2007-06-08 10:30:25 UTC
*** Bug 150248 has been marked as a duplicate of this bug. ***
Comment 29 Dieter Jurzitza 2007-06-10 07:43:55 UTC
Hi folks,
I compiled yast2-hardware-2.15.4 on my SuSE 10.2 and patched yast2-network accordingly, derived from Michal Zugec's patch.
Unfortunately, the content of hw["sysfs_id"]:"" is not "pnp" here, it is empty.
Anyone having a suggestion for me? Or doesn't this work on 10.2.

I implemented the following patch:

***************************************************************************
--- yast2-network-2.14.12/src/modules/Lan.ycp   2007-06-09 13:01:08.000000000 +0200
+++ yast2-network-2.14.12/src/modules/Lan.ycp   2007-06-09 13:01:08.000000000 +0200
@@ -605,8 +605,14 @@

     // name of hwcfg
     if(busid != nil && busid != "") {
-       nm_name = "bus-" + hw["bus"]:"" + "-" + hw["busid"]:"";
+     // #208854 - include "static" string 
+       if(issubstring(hw["sysfs_id"]:"", "pnp")){
+            nm_name = "static-bus-" + hw["bus"]:"" + "-" + hw["busid"]:""; 
+       }
+       else{
+       nm_name = "bus-" + hw["bus"]:"" + "-" + hw["sysfs_id"]:"" + "-" + hw["busid"]:"";
        if(Arch::s390 ()) nm_name = type + "-" + nm_name;
+       }
     }
     else {
        // #42421
***************************************************************************
to detect the contents of hw["sysfs_id"]:"" by just adding it to the network card's hardware-filename (only for debugging).
Anyone having an idea what went wrong?
Thank you!
Take care


Dieter Jurzitza
Comment 30 Michal Zugec 2007-06-10 10:21:33 UTC
Hi Dieter,
first quick note - package name is yast2-hardware-detection, not yast2-hardware (I hope it's only typo) and that works for me
can you create code like:
****
{
 y2internal("network hardware : %1", SCR::Read(.probe.netcard));
}
****
run it as root and paste here log line containig "network hardware" string?
Comment 31 Dieter Jurzitza 2007-06-10 12:16:04 UTC
Hi Michal,

1.) yes, it was a typo. I should have written yast2-hardware-detection, and I took the version from http://download.opensuse.org/distribution/SL-OSS-factory.

2.) I can read what you typed, but I do not know how to wrap this into a program I know how to compile - exceeds my programming capabilities :-(.
I'd need some additional help what you want to be written for **** in order to get this going.

Hope you folks do not mind me trying to play quality department here - but if I yell I think it is at least fair to verify - in contrast to you I do not use a PC always running latest SuSE software - I simply do not have the time to keep the pace.

Thanks again,
take care



Dieter
Comment 32 Michal Zugec 2007-06-10 14:10:54 UTC
2) just create file /tmp/test.ycp and put code between **** there
after that run "yast /tmp/test.ycp"  as root and paste output from tail /var/log/YaST2/y2log here

I'm just surprise, why it doesn't works for you while for me it works
Comment 33 Dieter Jurzitza 2007-06-10 16:00:13 UTC
Created attachment 145190 [details]
Output when running the file through YaST as suggested by Michal

The attached file is the result of running
yast /tmp/testit.ycp
Comment 34 Dieter Jurzitza 2007-06-10 16:00:55 UTC
Hi Michal,
this was easy :-). Take a look into the new attachement,
take care


Dieter
Comment 35 Michal Zugec 2007-06-10 19:01:58 UTC
Hi Dieter,
welcome to yast-hackers world ;-)
but I see that "sysfs_id":"/devices/pnp1/01:02/01:02.00" is there.
So problem is that your patch isn't enought. In routines/hardware.ycp put into function "ReadHardware(string hwtype)"
something like :


	one["name"] = DeviceName(card);
	one["type"] = controller;
+        one["sysfs_id"] = card["sysfs_id"]:""; // here is needed change
	one["unique"] = card["unique_key"]:"";
	one["requires"] = card["requires"]:[];

Enjoy it and give me please feedback whether that works


Comment 36 Dieter Jurzitza 2007-06-10 19:48:08 UTC
Hi Michal,
thank you very much. This was indeed all what had been missing :-).
So, indeed, I arrived in the world of yast-hacking!
Thanks - I close the bug again.
Have a nice start into the new week,
take care


Dieter
Comment 37 Dieter Jurzitza 2007-10-14 10:01:58 UTC
Dear Team,
new OS 10.3 - new luck - no, no luck - everything is new in 10.3 but no go, the card can be configured but is not detected after reboot :-(((((
The config files out of /etc/sysconfig/hardware have vanished, but that's no improvement here ;-)
Take care



Dieter Jruzitza
Comment 40 Michal Zugec 2007-11-22 13:39:22 UTC
I discussed with other people and unfortunate I must close this bugreport as WONTFIX, ISA cards are no more supported. 
You can write (as workaround) 3c509 into /etc/sysconfig/kernel file, MODULE_LOADED_AT_BOOT section
Comment 41 Michal Zugec 2007-11-30 08:59:02 UTC
*** Bug 333572 has been marked as a duplicate of this bug. ***
Comment 42 Michal Zugec 2007-12-13 22:00:29 UTC
*** Bug 348553 has been marked as a duplicate of this bug. ***
Comment 43 Roger Hayter 2007-12-14 08:18:42 UTC
As ISA cards are no longer supported it would be good to add this to the yast help text for the network card module, perhaps even a reference to /etc/sysconfig/kernel.    And remove the GUI facility to add a new card by adding the module name, as it doesn't work.  Would have saved me re-reporting this in 10.3.