atom feed64 messages in org.freebsd.freebsd-archRe: Racing interrupts
FromSent OnAttachments
Warner LoshOct 23, 1999 11:08 pm 
Wes PetersOct 24, 1999 12:06 am 
Matthew JacobOct 24, 1999 8:25 pm 
Nate WilliamsOct 25, 1999 9:46 am 
Warner LoshOct 25, 1999 11:22 am 
Nate WilliamsOct 25, 1999 11:27 am 
Warner LoshOct 25, 1999 11:40 am 
Warner LoshOct 25, 1999 11:50 am 
Matthew JacobOct 25, 1999 11:52 am 
Nate WilliamsOct 25, 1999 11:57 am 
Nate WilliamsOct 25, 1999 12:02 pm 
Matthew JacobOct 25, 1999 12:12 pm 
Nate WilliamsOct 25, 1999 12:14 pm 
Matthew JacobOct 25, 1999 12:15 pm 
Nate WilliamsOct 25, 1999 12:20 pm 
Matthew JacobOct 25, 1999 12:35 pm 
Warner LoshOct 25, 1999 12:46 pm 
Matthew JacobOct 25, 1999 12:49 pm 
Terry LambertOct 25, 1999 5:55 pm 
Terry LambertOct 25, 1999 6:03 pm 
Nate WilliamsOct 25, 1999 6:04 pm 
Terry LambertOct 25, 1999 6:09 pm 
Terry LambertOct 25, 1999 6:12 pm 
Terry LambertOct 25, 1999 7:20 pm 
Nate WilliamsOct 25, 1999 8:55 pm 
Wes PetersOct 25, 1999 9:54 pm 
Randell JesupOct 26, 1999 4:13 am 
Nate WilliamsOct 26, 1999 8:24 am 
Randell JesupOct 26, 1999 8:37 am 
Bill FumerolaOct 26, 1999 9:06 am 
Wes PetersOct 26, 1999 11:27 am 
Nate WilliamsOct 26, 1999 1:07 pm 
Wes PetersOct 26, 1999 1:08 pm 
Terry LambertOct 26, 1999 6:40 pm 
Terry LambertOct 26, 1999 6:48 pm 
Nate WilliamsOct 26, 1999 7:01 pm 
Nate WilliamsOct 26, 1999 7:03 pm 
Warner LoshOct 26, 1999 7:58 pm 
Christopher MastoOct 27, 1999 1:04 am 
Daniel O'ConnorOct 27, 1999 1:11 am 
Warner LoshOct 27, 1999 9:27 am 
Nate WilliamsOct 27, 1999 10:03 am 
Warner LoshOct 27, 1999 10:11 am 
Wes PetersOct 27, 1999 10:16 am 
Nate WilliamsOct 27, 1999 10:17 am 
Warner LoshOct 27, 1999 10:20 am 
Nate WilliamsOct 27, 1999 10:32 am 
Warner LoshOct 27, 1999 10:39 am 
Wes PetersOct 27, 1999 10:48 am 
Christopher MastoOct 27, 1999 11:34 am 
Warner LoshOct 27, 1999 11:57 am 
Daniel O'ConnorOct 27, 1999 5:33 pm 
Warner LoshOct 27, 1999 8:35 pm 
Daniel O'ConnorOct 27, 1999 8:38 pm 
Wes PetersOct 28, 1999 1:23 pm 
Terry LambertOct 29, 1999 9:56 am 
Nate WilliamsOct 29, 1999 11:51 am 
Terry LambertOct 30, 1999 2:23 pm 
Terry LambertOct 30, 1999 2:26 pm 
Nate WilliamsOct 30, 1999 3:09 pm 
Wes PetersOct 30, 1999 5:04 pm 
Warner LoshOct 30, 1999 10:31 pm 
Terry LambertNov 1, 1999 12:11 pm 
Warner LoshNov 1, 1999 2:35 pm 
Subject:Re: Racing interrupts
From:Wes Peters (we@softweyr.com)
Date:Oct 26, 1999 1:08:07 pm
List:org.freebsd.freebsd-arch

Bill Fumerola wrote:

On Mon, 25 Oct 1999, Nate Williams wrote:

The system will not crash as a result of this.

Not true, it will hang the system. I can show this if more proof is needed on my laptop. There is no software solution that will avoid all problems.

Then you have borked drivers or some other bogon. I can cleanly do all of the things Terry says without problem. This alone means it is not only possible, but there exists a method to do it properly.

Try this: hang a disk drive off a SlimSCSI and start something I/O intensive on the drive, like a disk benchmark write test. Now pop the SCSI card out during the I/O.

I'm trying not to add noise because I have no idea of the technical workings behind pccard ejection, but lets certainly not discount it just because on someone's laptop it doesn't work.

First you should know PCMCIA was designed with memory cards in mind.

The ejection mechanism tells you the card is going away by providing an interrupt. It's the same interrupt that all other notifications from the card use. It does this by having a short pin on the connector; when the short pin becomes detached the PCMCIA Controller in your system generates the interrupt. You have some small amount of time before the rest of the pins become detached in which you can still communicate with the card, but this time is not fixed, it will depend on the card, the ejector, and on how hard the user pushes the ejector button.

If you've just begun to process another interrupt from the card, such as I/O ready or I/O complete, you won't be able to process the ejection interrupt until your current interrupt completes, but what happens if the card goes away before your current interrupt completes? Then you're attempting to read and write I/O ports and/or memory locations that no longer exist, but you don't know they no longer exist.

The "right" thing to do would be for the hardware controller to generate a bus error if you try to write registers or memory addresses for a card that has gone away, but it doesn't.

You're also left with questions about what to do with outstanding I/O requests when the device goes away, and how to handle the open references to the device.

None of the design is simple, and it is complicated by the fact that PCMCIA wasn't developed for I/O devices. If you want to jump in and help, I'm sure everyone involved would welcome the help. Buy the PCMCIA and CardBus architecture books, familiarize yourself with the code, and ponder how to handle these and other stick issues as cleanly as possible. Submit working patches, ask intelligent questions, and give intelligent answers. You know, kind of like working on FreeBSD. ;^)

To Unsubscribe: send mail to majo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message