BACKGROUND:
I’m working on a medical device that will use a SanDisk ATA Flash Card as a
means to copy info to/from a laptop (basically a high capacity replacement
for a floppy).
I’m able to achieve this by having PcmciaLaunch run a program that does the
following:
(Card insertion - PcmciaLaunch executes my program - my program does the
following:)
Fsys.ata -aXXX -iY -nskd -NskD
mount -p /dev/skd0
Dosfsys d=/dev/skd0t4
(Card is now accessable as /dos/d)
(Card removed - PcmciaLaunch signals my program which performs the following
cleanup:)
Dosfsys -x
umount /dev/skd0
rm /dev/skd0
THE PROBLEM:
This works fine as long as the card is not removed at an ‘inappropriate
time’. If it is then QNX locks up. Not even any cursor movement - nothing.
This ‘inappropriate time’ appears to be the window from when the card is
removed until the clean up is done. I can force this to happen by disabling
the clean up when the card is removed. Then I simply remove the card and
attempt an ‘ls /dos/d’ command - immediate lockup occurs.
I realize that the user shouldn’t remove the card at an inappropriate time,
but if it can happen then it will happen. Also this is a medical device and
needs to be robust in every aspect of its functionality - QNX locking up is
not robust.
My expectation for how robust the PCMCIA cards should be are set by the
Floppy drive - I am unable to lock up the system by pulling the floppy at
any time. (Also - I seem to be able to pull the PCMCIA card from a laptop at
any time and no lock-ups occur.)
I’ve searched the newsgroups and knowledge base for help on this problem -
but have not found any.
Note that I can also use Fsys.eide and Fsys.vpn50 in place of Fsys.ata - but
the lock-ups still occur. The params to Fsys.eide and Fsys.vpn50 are
formatted differently than to Fsys.ata of course. Also - I’ve tried
Efsys.pcmcia but have not figured out how to use it - very little info in
documentation/newsgroups/knowledge-base regarding Efsys - perhaps this is
only to be used on linear flash devices? Not ATA style?.
Any help is greatly appreciated,
Ed Theobald
Revis & Associates
edtheobald@starband.net