Re: [NTLK] ATA News (was: Re: Dreaming of the ATA driver....)

From: Paul Guyot (pguyot_at_kallisys.net)
Date: Sat Jun 23 2001 - 06:49:47 PDT


>If by handling brutal removal you mean deal with all of the loose
>ends when someone just ejects a card perhaps what Newton does when I
>remove a 'normal' memory card would suffice: my Newton usually says
>something like, "Hey, I'm still using that. Put it back." I put
>the card back, then it says, "OK, you can now remove card xxx."

Of course, it would suffice. But this isn't easy at all to implement.
Indeed, when the card is brutally removed, EmergencyShutdown method
of the card handler is called. Then, I think I should stop any driver
access, try to convince the OS to ask you the card back (currently it
doesn't ask anything), be sure that the OS won't dispose the card
handler (currently it does), try to figure out what happens if the
card is reinserted (or if a wrong card is reinserted), then resume
the driver call and finally initiate a global unmount process of all
stores and offer the user to eject the card when all that is over.

Brutal removal of the card was a nightmare for Apple's developers.
The reason is that when the Newton asks for the card, no card access
can be made (since the card is away, we can't read or write on it).

>I assume that the OS just suspends all pending activity for the card
>until the Human puts it back in, tidies things up, then tells the
>Human that -now- it's safe to remove the card.

It's more or less what happens. But it is quite an important work to
get it working as with linear cards.

Paul

-- 
Home page: http://www.kallisys.com/
Newton-powered WebServer: http://newt.dyndns.org:8080/
--
This is the Newtontalk mailinglist - http://www.newtontalk.net
To unsubscribe or manage: visit the above link or
	mailto:newtontalk-request_at_newtontalk.net?Subject=unsubscribe


This archive was generated by hypermail 2.1.5 : Sat Mar 08 2003 - 11:37:03 PST