lkml.org 
[lkml]   [1999]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: PCMCIA eject timings
> As I understand, currently cards may happen to talk to empty slot if
> the card is taken out in the middle of long driver operation ?

Correct. The eject interrupt can't be fielded instantaneously.

> If it is not so, what is the mechanism that prevents it or what is
> the best way to be 100% sure about card being in slot ?

What most drivers do is to ensure that all loops will eventually
terminate regardless of whatever garbage a card's status registers may
contain. For instance, it doesn't matter if you push a packet out to
a nonexistent network interface, or read a packet that is half
garbage: upper layers will cope. If they can't (say, a user ejects a
SCSI adapter with mounted filesystems), then it is the user's fault.
However, it is very bad if an interrupt handler loops on a status
register value that is stuck at 0xff when a card is ejected.

Handling ejects gracefully is probably an impossible problem for the
general case, but I think we handle it almost-always-gracefully with
not much code crud.

-- Dave Hinds

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:50    [W:0.019 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site