Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 6838

Summary: making pcmcia rc script probe yenta/i82365 automatically
Product: Gentoo Linux Reporter: Alastair Tse (RETIRED) <liquidx>
Component: [OLD] Core systemAssignee: Chad Huneycutt (RETIRED) <chadh>
Status: RESOLVED FIXED    
Severity: enhancement CC: csimonut, pardsbane
Priority: High    
Version: 1.3   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: /etc/init.d/pcmcia update
/etc/conf.d/pcmcia patch to enable PCIC

Description Alastair Tse (RETIRED) gentoo-dev 2002-08-21 11:09:16 UTC
Hi,

Why don't we use /etc/conf.d/pcmcia's commented out options? I find it useful
for the PCIC to be defined and making /etc/init.d/pcmcia to automatically load
the necessary modules rather than to have it hacked into /etc/modules.autoload.

Here are 2 patches, one for the /etc/conf.d/pcmcia and the other for
/etc/init.d/pcmcia to use PCIC and automatically load and unload the card
controller modules. I can't see anything immediately wrong with this except that
we will need to change the relevant parts in the Gentoo Installation Guide. I'd
be happy to do that too :)

Cheers,

Alastair
Comment 1 Alastair Tse (RETIRED) gentoo-dev 2002-08-21 11:09:40 UTC
Created attachment 3262 [details, diff]
/etc/init.d/pcmcia update
Comment 2 Alastair Tse (RETIRED) gentoo-dev 2002-08-21 11:10:14 UTC
Created attachment 3263 [details, diff]
/etc/conf.d/pcmcia patch to enable PCIC
Comment 3 kirill 2002-08-22 06:36:16 UTC
Hi

I'd like to change patch for the init.d script from:
+	     	modprobe ${PCIC}
+		modprobe ds


to:
+	     	modprobe pcmcia_core ${CORE_OPTS}
+	     	modprobe ${PCIC} ${PCIC_OPTS}
+		modprobe ds

which would force those options (if needed!) for pcmcia_core and ${PCIC} to be 
appended to the modules. This saves us from hacking into modules.conf/modules.d 
manually


--kirill
Comment 4 kirill 2002-08-22 06:38:30 UTC
Hi

I'd like to change patch for the init.d script from:
+	     	modprobe ${PCIC}
+		modprobe ds


to:
+	     	modprobe pcmcia_core ${CORE_OPTS}
+	     	modprobe ${PCIC} ${PCIC_OPTS}
+		modprobe ds

which would force those options (if needed!) for pcmcia_core and ${PCIC} to be 
appended to the modules. This saves us from hacking into modules.conf/modules.d 
manually


--kirill
Comment 5 Chad Huneycutt (RETIRED) gentoo-dev 2002-10-21 19:11:18 UTC
Here was my problem with this approach:  How can you tell if the user has built
the modules into the kernel, left them out, or built them as modules.  Your test
finds out if they are loaded *if they were built as modules*.  We made the
decision to make the user explicitly load his basic pcmcia modules
(pcmcia-core,yenta_socket,ds, for example).

That is not to say that we won't change the scripts. We also didn't want init
scripts to be loading modules, although now that we have alsa, firewall, etc.,
this is not an issue.
Comment 6 Alastair Tse (RETIRED) gentoo-dev 2002-10-22 14:58:23 UTC
I guess I didn't explain why this would be helpful :) I'm on a laptop that needs
the PCMCIA PCIC and associated modules to be re-loaded (rmmod/insmod) everytime
I suspend/resume via apm. So adding the loading and unloading of modules in the
pcmcia init script would help cleanly unload these modules and then reload them
again. 

If they didn't have those compiled as modules, then the modprobes would just
fail, we could obviously just redirect the output elsewhere and make it silent.
If they didn't have the pcmcia support compiled anyway, then why would they
start the pcmcia init scripts in the first place. If they have the modules
compiled, then all is well and good. 

As for the unloading, if they compiled it in to the kernel, they can't unload it
anyway, so that shouldn't conflict with the them not being able to do rmmods. 

I just figured this it is more logical to make the pcmcia script smarter and log
the modules for the user rather than having them needing to add it tie
modules.autoload. Not that it is very difficult to add it in there.
Comment 7 Chad Huneycutt (RETIRED) gentoo-dev 2002-12-15 13:11:30 UTC
*** Bug 12177 has been marked as a duplicate of this bug. ***
Comment 8 Chad Huneycutt (RETIRED) gentoo-dev 2002-12-15 13:20:24 UTC
Okay, I am convinced about loading the modules in the init scripts.  I'll see
what I can do about getting this init script in the latest pcmcia version soon.
Comment 9 Chad Huneycutt (RETIRED) gentoo-dev 2002-12-15 16:08:31 UTC
Okay, I made the changes to /etc/init.d/pcmcia and /etc/conf.d/pcmcia.  Please
remerge pcmcia-cs-3.2.3 and make sure the new init script works for you.
Comment 10 Chad Huneycutt (RETIRED) gentoo-dev 2003-01-23 02:41:42 UTC
I haven't heard anything on this bug, so I am going to close it out.  There is a
new bug about some errors with the script, though, so we'll continue there.
Comment 11 Pardsbane 2003-02-05 00:37:08 UTC
Its a bit late, but I can confirm this works.