Skip to contentSkip to conversation

Ejecting a CardBus device

DISCUSSION Felipe Alfaro Solana 2 participants 5 messages Sep 27, 2003

lore
Share & tools
lore
#0 lore raw

Hi All!

How can I tell the CardBus subsystem to eject my CardBus NIC by software with 2.6.0 kernels? In 2.4 I could use "cardctl eject", but I don't know how to do the same on 2.6.0-test5-mm4.

I need to eject my CardBus NIC if I want to be able to suspend the machine using APM. Resuming from APM when the "yenta_socket" and "pcmcia_core" modules are loaded causes a deadlock in the kernel during resume, and the machine never comes back completely. Thus, before suspending, I need to rmmod "pcmcia_core" and "yenta_socket" (well, and uhci-hcd and the sound modules).

Currently, I need to manually eject the card by pushing the eject button on the side of the laptop if I want to to rmmod "pcmcia_core" (not doing so, causes pcmcia_core to complain that it's busy). So, I wonder if there's a way to tell pcmcia_core to "eject" the CardBus NIC (without physically ejecting the card from the socket) in order to being able to rmmod it before trying to suspend.

Thanks!

Felipe Alfaro Solana

#1 lore raw
Quoted 3 lines · Felipe Alfaro Solana

How can I tell the CardBus subsystem to eject my CardBus NIC by software with 2.6.0 kernels? In 2.4 I could use "cardctl eject", but I don't know how to do the same on 2.6.0-test5-mm4.

The same works with 2.6.0-test5.

Quoted 4 lines

I need to eject my CardBus NIC if I want to be able to suspend the machine using APM. Resuming from APM when the "yenta_socket" and "pcmcia_core" modules are loaded causes a deadlock in the kernel during resume, and the machine never comes back completely.

It would be nice to solve this problem. Since APM suspend with 2.6 kernels seems to be a complete dead loss with my laptop, don't look to me to diagnose this one.

Signature · 4 lines
Russell King ([email protected])	http://www.arm.linux.org.uk/personal/
      Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
      maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                      2.6 Serial core
#2 lore raw
Quoted 6 lines · Russell King
Quoted 3 lines · Felipe Alfaro Solana

How can I tell the CardBus subsystem to eject my CardBus NIC by software with 2.6.0 kernels? In 2.4 I could use "cardctl eject", but I don't know how to do the same on 2.6.0-test5-mm4.

The same works with 2.6.0-test5.

I doesn't seem to work: "cardctl eject" complains that no pcmcia driver appears in /proc/devices. Any ideas?

Meanwhile, I'll take a look at the source code of cardctl to see if I can learn how to force the eject by software.

#3 lore raw
Quoted 10 lines · Felipe Alfaro Solana
Quoted 6 lines · Russell King
Quoted 3 lines · Felipe Alfaro Solana

How can I tell the CardBus subsystem to eject my CardBus NIC by software with 2.6.0 kernels? In 2.4 I could use "cardctl eject", but I don't know how to do the same on 2.6.0-test5-mm4.

The same works with 2.6.0-test5.

I doesn't seem to work: "cardctl eject" complains that no pcmcia driver appears in /proc/devices. Any ideas?

That'll be because ds got unloaded. Although ds isn't required for cardbus cards, it does provide the interface to cardctl.

Signature · 4 lines
Russell King ([email protected])	http://www.arm.linux.org.uk/personal/
      Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
      maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                      2.6 Serial core
#4 lore raw
Quoted 6 lines · Russell King
Quoted 3 lines

I doesn't seem to work: "cardctl eject" complains that no pcmcia driver appears in /proc/devices. Any ideas?

That'll be because ds got unloaded. Although ds isn't required for cardbus cards, it does provide the interface to cardctl.

Bingo! Now APM suspend is working flawlessly for the very first time in my life... Thanks.