Linux-kernel mailing list archive 2000-06,: IDE floppy + PCMCIA ATA card = trouble

# IDE floppy + PCMCIA ATA card = trouble

Eugene Crosser (crosser@average.org)
Thu, 10 Feb 2000 09:54:49 +0300 (MSK)

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Rogier Wolff: "Re: Capabilities"
- Previous message: Jes Sorensen: "Re: [PATCH] isa_{read,write}{w,l} fixed"

David, Andre and guys,

I have a SCSI based dual pentium box with only IDE floppy (LS-120) on
onboard IDE controller, and recently I bought an ISA PCMCIA card
reader to use with Smartmedia adapter. The kernel is 2.3.40, pcmcia
tools 3.1.10, IDE driver compiled as module and loaded on demand by
kmod. There where minor problems compiling the tools (qlogic_cs.c
from pcmcia tools uses MANFID_PIONEER that is not defined in the
kernel 2.3.40 headers, airo.c has unresolved symbol proc_register),
but the real trouble begins at runtime.

If you did not have PCMCIA card inserted and try to use IDE floppy,
ide-floppy module loads, recognizes onboard IDE as ide0 (usually at
irq14), floppy as /dev/hda and it works. If you plug in the ATA card
while ide modules are still loaded, ATA card is recognized as ide1
(usually at irq9), assigned to /dev/hdc and works. At this time you
can access both floppy and card.

Now, if you plug the card before using floppy or after all autoloaded
ide modules are rmmod'ed, it is recognized as ide0 at irq9 and it
works. BTW, when ide module is loaded to serve the card, it does
notice onboard ide chip and reports this:
PIIX3: IDE controller on PCI bus 00 dev 09
PIIX3: not 100% native mode: will probe irqs later
So far so good.

Now, regardless if wether you have unplugged the card or left it in
the slot, ide-mod stays loaded (cardmgr loads it without autoclean
and is not automatically rmmod'ed), and when you try to access the
floppy, the trouble begins. The kernel reports:
hda: LS-120 CSMO 05 UHD Floppy, ATAPI FLOPPY drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 9
Note that ide0 and irq9 where already assigned to the ATA card, now
the same resources are assigned to onboard ide despite the card may
be still in the slot.

Then different things may happen:
1. system freezes hard (magic sysrq does not work)
2. Oops and the process accessing the floppy segfaults
3. just timeouts and errors accessing the floppy, like this:
hda: lost interrupt
hda: lost interrupt
hda: lost interrupt
ide-floppy: hda: I/O error, pc = 23, key = 0, asc = 0, ascq = 0
ide-floppy: Can't get floppy parameters
hda: lost interrupt
hda: lost interrupt

Tell me if I need to provide more information, I am willing to help.

BTW, this may be related: when you stop cardmgr, you usually see this:
"Trying to free nonexistent resource <03e0-03e1>"

Thanks.

Eugene

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

- Next message: Rogier Wolff: "Re: Capabilities"
- Previous message: Jes Sorensen: "Re: [PATCH] isa_{read,write}{w,l} fixed"