Networking Forums

Networking Forums > Computer Networking > Linux Networking > Shutdown hangs at "Shutting down PCMCIA" if PCMCIA network interface still up

Reply
Thread Tools Display Modes

Shutdown hangs at "Shutting down PCMCIA" if PCMCIA network interface still up

 
 
Dan Harkless
Guest
Posts: n/a

 
      07-01-2003, 02:32 AM
My company is currently developing a Linux-based embedded device for
installation in airliners. The OS is based on SuSE 8.2 Pro's Minimum
System install.

We need to support networking via PCMCIA NICs. Things are working
fine except that if a PCMCIA network interface is up when the system
does a shutdown or reboot, the system hangs at:

Shutting down PCMCIA

It so happens the network card we're using is for Token-Ring (the IBM
16/4 Token-Ring CardBus Adapter), but I have no reason to believe the
same thing wouldn't happen with an Ethernet or wireless LAN card
(don't have either available to test with right now, but found threads
in Google Groups with people reporting this same problem with those
types of cards -- no solutions in any of those threads,
unfortunately).

PCMCIA_SYSTEM is set to the default of "kernel" in
/etc/sysconfig/pcmcia. (I tried setting it to "external" to see if
that would fix the problem, but with that setting the card didn't come
up at boot time.)

The card is configured via /etc/sysconfig/network/ifcfg-tr-pcmcia,
with STARTMODE in there set to 'hotplug'.

Since the hang wouldn't occur if the Token-Ring cable wasn't plugged
into the hub/concentrator, I tried manually taking down the PCMCIA
card interface with an 'ifdown tr0' prior to rebooting, and sure
enough, in this case "Shutting down PCMCIA" doesn't hang.

Thinking about it, it does seem wrong that PCMCIA gets taken down
prior to the network interfaces -- even if it didn't hang while
shutting down PCMCIA, you can imagine the shutdown of the PCMCIA
network interface(s) hanging or at least complaining because the
PCMCIA subsystem would be no longer working by that point.

I tried manually renaming the /etc/init.d/rc3.d/K##network script to
take place before K##pcmcia, and that fixed the problem, but of course
next time chkconfig gets run, the links get reordered to match the
dependencies in the INIT INFO section of the init.d scripts.

I'd love to be able to put "Required-Stop: network" in
/etc/init.d/pcmcia so that chkconfig could fix that K* order
automatically, but as documented in insserv(8):

the Required-Stop, X-UnitedLinux-Should-
Stop, and Default-Stop are ignored in SuSE Linux, because
the SuSE boot script concept uses a differential link
scheme (see init.d(7)).

First off, it's bogus for those *-Stop lines to appear in the SuSE
init.d scripts if they aren't functional. Also, that "differential
link scheme" isn't really explained anywhere -- I read the chkconfig,
init.d, and insserv man pages as well as the "SuSE Linux Boot Concept"
chapter of the 8.2 Administration Guide book, and there are no details
on that.

But I understand that the upshot is that init.d script always shut
down in reverse order of startup. I tried to change the INIT INFO
sections to get pcmcia to start up before network, but to avoid
dependency loops I would have to make the following changes:

network: add "Required-Start: pcmcia"
pcmcia: add "Required-Start: network",
remove "Required-Start: syslog" and
"X-UnitedLinux-Should-Stop: hotplug"

Is it safe to change all those dependencies? I assume they're there
for a reason...

Since I can't get chkconfig to do what I want, for now I've added a
call to "/etc/init.d/network stop" at the top of the "stop)" section
in 'pcmcia', but that's a pretty cheesy kludge.

What's the *right* fix for this?

--
Dan Harkless
(E-Mail Removed)
http://harkless.org/dan/
 
Reply With Quote
 
 
 
 
Dan Harkless
Guest
Posts: n/a

 
      07-01-2003, 06:06 AM
By the way, I checked my Red Hat 9 system at home, and on it we have:

% cd /etc/init.d
% grep chkconfig network pcmcia
network:# chkconfig: 2345 10 90
pcmcia:# chkconfig: 2345 24 96

So on Red Hat, 'network' is indeed set up to run prior to 'pcmcia'
both at startup _and_ shutdown, which is what seems to be necessary to
prevent the hang I'm getting on the SuSE 8.2 system.

The *-Start: / *-Stop: init.d script directives used by the
UnitedLinux version of chkconfig are clearly more elegant than the
hardcoded priority numbers used by Red Hat chkconfig, but SuSE's
half-baked Start-only implementation certainly seems to be broken.

--
Dan Harkless
(E-Mail Removed)
http://harkless.org/dan/
 
Reply With Quote
 
Dan Harkless
Guest
Posts: n/a

 
      07-01-2003, 10:44 PM
anc <(E-Mail Removed)> wrote:
> All I am willing to admit is that I have also had problems inthe past with
> pcmcia cards under linux. There is usually more than one way to do
> anything, I suppose any cure that works is the right cure.


Well, no, the right cure is one that SuSE could build in to future
versions, unlike the band-aid solution I'm using now.

> Token ring is pretty old,


As I said, I found posts with people reporting the same exact problem
with PCMCIA Ethernet and WLAN cards, so I think the card being for
Token-Ring is immaterial. I think the problem is just PCMCIA getting
shut down prior to PCMCIA network interfaces.

> and you have already found that 'ifdown tr0' will stop your
> machine hanging. If you can include a script to invoke 'ifdown tr0' before
> shutdown your problem is solved. You may be able to include this in
> /etc/init.d/rc5.d as a K##script. The services can be edited with chkconfig
> -e or Sys-V Init editor.


Yes, that's equivalent to what I'm doing now by calling
"/etc/init.d/network stop" at the top of the top of the "stop)"
section in 'pcmcia'.

I was posting to see if there was a NON-kludgy solution.

--
Dan Harkless
(E-Mail Removed)
http://harkless.org/dan/
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Speedtouch 576 hangs at "Acquiring Network Address" Wireless Ali Chambers Wireless Internet 0 09-21-2006 03:57 PM
Unable to use "shutdown" command on the network Vals56 Wireless Networks 0 10-01-2004 07:54 PM
Which driver? "ST Lab c-140 10/100 Cardbus pcmcia" Fredrik Jonson Linux Networking 2 04-19-2004 07:33 PM
PCMCIA on ThinkPad 755c: "anonymous memory" Karsten M. Self Linux Networking 0 02-16-2004 04:58 PM
Newbie: RH9 (Fedora) laptop PCMCIA networking "removed" Clive Long,UK Linux Networking 3 02-06-2004 11:12 AM



1 2 3 4 5 6 7 8 9 10 11