Re: PCCARD eject freeze (was Re: your mail)

1999-12-02 Thread Mike Smith
> In message <[EMAIL PROTECTED]> "Matthew N. >Dodd" writes: > : On Thu, 2 Dec 1999, Nick Hibma wrote: > : > PCMCIA has the problem that the hardware register you are talking to can > : > disappear on the spot, between 2 outb()s. > : > : Can't we do something about this using bus_space? This wou

Re: PCCARD eject freeze (was Re: your mail)

1999-12-02 Thread Matthew N. Dodd
On Thu, 2 Dec 1999, Warner Losh wrote: > I had the same thought, but w/o a signal or other out of band error > communication, I'm not sure how to implement this. Well, if we do the detach and set a timeout freeing the device_t & softc the next read or write will fail and the 'sleeper' can bail ou

Re: PCCARD eject freeze (was Re: your mail)

1999-12-02 Thread Warner Losh
In message <[EMAIL PROTECTED]> "Matthew N. Dodd" writes: : On Thu, 2 Dec 1999, Nick Hibma wrote: : > PCMCIA has the problem that the hardware register you are talking to can : > disappear on the spot, between 2 outb()s. : : Can't we do something about this using bus_space? This would give us a

Re: PCCARD eject freeze (was Re: your mail)

1999-12-02 Thread Warner Losh
In message <[EMAIL PROTECTED]> Nick Hibma writes: : PCMCIA has the problem that the hardware register you are talking to can : disappear on the spot, between 2 outb()s. Yes. That's why one must poll the device, from time to time, to see if it is gone. Yucky-poo. Warner To Unsubscribe: send m

Re: PCCARD eject freeze (was Re: your mail)

1999-12-02 Thread Matthew N. Dodd
On Thu, 2 Dec 1999, Nick Hibma wrote: > PCMCIA has the problem that the hardware register you are talking to can > disappear on the spot, between 2 outb()s. Can't we do something about this using bus_space? This would give us a fair bit of overhead for PCMCIA devices as well as require us to mor

Re: PCCARD eject freeze (was Re: your mail)

1999-12-02 Thread Nick Hibma
> There are other contexts for the same issues anyway. USB has devices > that go away suddenly, and it _is_ designed to be hot-removable, so > people are going to be pulling the plug on network adapters, ZIP > drives, etc. We need drivers that are capable of going away cleanly, > or at least wit

Re: PCCARD eject freeze (was Re: your mail)

1999-12-02 Thread Warner Losh
In message <[EMAIL PROTECTED]> Christopher Masto writes: : Hmm.. something's not right. I can eject my ed card (though I get : the "pccard: card removed, slot 0" message twice. But it doesn't : attach if I insert it again. "driver allocation failed for : Linksys(Combo PCMCIA EthernetCard (EC):

Re: PCCARD eject freeze (was Re: your mail)

1999-12-02 Thread Christopher Masto
On Wed, Dec 01, 1999 at 12:55:24AM -0700, Warner Losh wrote: > In message <[EMAIL PROTECTED]> Christopher Masto writes: > : Well, here's all I've got. It's basically just a sloppy version of > : what you suggested. > > I've cleaned this up, worked it around, and managed to insert and > eject my

Re: PCCARD eject freeze (was Re: your mail)

1999-12-01 Thread Nick Hibma
> : Hey, we're getting somewhere. It works, in that it stops the panic. > : I get the "ed0: unloaded" message, and the machine doesn't panic, but > : there are still some problems. It seems that device_delete_child > : is failing (I forgot to print the return code, but it is not zero), > : and r

Re: PCCARD eject freeze (was Re: your mail)

1999-12-01 Thread Christopher Masto
On Wed, Dec 01, 1999 at 12:02:54PM -0800, Mike Smith wrote: > > On Wed, Dec 01, 1999 at 09:05:38AM -0700, Warner Losh wrote: > > > In message <[EMAIL PROTECTED]> Mike Smith writes: > > > : The only "right" solution is for us to mandate that people down cards > > > : before ejecting them. > ... >

Re: PCCARD eject freeze (was Re: your mail)

1999-12-01 Thread Doug Rabson
On Tue, 30 Nov 1999, Warner Losh wrote: > In message <[EMAIL PROTECTED]> Christopher Masto writes: > : Hey, we're getting somewhere. It works, in that it stops the panic. > : I get the "ed0: unloaded" message, and the machine doesn't panic, but > : there are still some problems. It seems that d

Re: PCCARD eject freeze (was Re: your mail)

1999-12-01 Thread Doug Rabson
On Tue, 30 Nov 1999, Mike Smith wrote: > > Hmmm... That's something... How do you know that the delete_child is > > failing? An if printing that it failed or conjecture based on the > > insertion results? > > You should definitely check the delete result, yes. > > Also, are you calling bus_g

Re: PCCARD eject freeze (was Re: your mail)

1999-12-01 Thread Mike Smith
> On Wed, Dec 01, 1999 at 09:05:38AM -0700, Warner Losh wrote: > > In message <[EMAIL PROTECTED]> Mike Smith writes: > > : The only "right" solution is for us to mandate that people down cards > > : before ejecting them. ... > I would like to see that something along the lines of a method to shut

Re: PCCARD eject freeze (was Re: your mail)

1999-12-01 Thread Warner Losh
--- Blind-Carbon-Copy To: Christopher Masto <[EMAIL PROTECTED]> Subject: Re: PCCARD eject freeze (was Re: your mail) Cc: [EMAIL PROTECTED] In-reply-to: Your message of "Wed, 01 Dec 1999 12:36:29 EST." <[EMAIL PROTECTED]> References: <[EMAIL PROTEC

Re: PCCARD eject freeze (was Re: your mail)

1999-12-01 Thread Christopher Masto
On Wed, Dec 01, 1999 at 09:05:38AM -0700, Warner Losh wrote: > In message <[EMAIL PROTECTED]> Mike Smith writes: > : The only "right" solution is for us to mandate that people down cards > : before ejecting them. The physical design of pccards basically gives us > : no other option. No matter

Re: PCCARD eject freeze (was Re: your mail)

1999-12-01 Thread Warner Losh
In message <[EMAIL PROTECTED]> Mike Smith writes: : The only "right" solution is for us to mandate that people down cards : before ejecting them. The physical design of pccards basically gives us : no other option. No matter how hard we try to get it "right" for : spontaneous removal, we can'

Re: PCCARD eject freeze (was Re: your mail)

1999-12-01 Thread Mike Smith
> In message <[EMAIL PROTECTED]> Christopher Masto writes: > : On Tue, Nov 30, 1999 at 04:52:33PM -0700, Warner Losh wrote: > : > It would help me if you could send me your patches... > : > : Well, here's all I've got. It's basically just a sloppy version of > : what you suggested. > > OK. Thi

Re: PCCARD eject freeze (was Re: your mail)

1999-11-30 Thread Warner Losh
In message <[EMAIL PROTECTED]> Christopher Masto writes: : Well, here's all I've got. It's basically just a sloppy version of : what you suggested. I've cleaned this up, worked it around, and managed to insert and eject my ep card 5 times in a row on my desktop kludge environment. It even appear

Re: PCCARD eject freeze (was Re: your mail)

1999-11-30 Thread Warner Losh
In message <[EMAIL PROTECTED]> Christopher Masto writes: : On Tue, Nov 30, 1999 at 04:52:33PM -0700, Warner Losh wrote: : > It would help me if you could send me your patches... : : Well, here's all I've got. It's basically just a sloppy version of : what you suggested. OK. This should help.

Re: PCCARD eject freeze (was Re: your mail)

1999-11-30 Thread Christopher Masto
On Tue, Nov 30, 1999 at 04:52:33PM -0700, Warner Losh wrote: > It would help me if you could send me your patches... Well, here's all I've got. It's basically just a sloppy version of what you suggested. Index: pccard.c === RCS fil

Re: PCCARD eject freeze (was Re: your mail)

1999-11-30 Thread Warner Losh
In message <[EMAIL PROTECTED]> Christopher Masto writes: : Ho hum. sio_pccard_detach also needs to be fixed to return 0, but I : don't think that explains the freeze. Unfortunately, while I can : sometimes squeeze in a few minutes to try quick fixes, my current : job doesn't leave me with time t

Re: PCCARD eject freeze (was Re: your mail)

1999-11-30 Thread Warner Losh
In message <[EMAIL PROTECTED]> Mike Smith writes: : You should definitely check the delete result, yes. : : Also, are you calling bus_generic_detach() after deleting the child? : I got the impression from Doug that this is required... In the child? device_delete_child() already calls device_det

Re: PCCARD eject freeze (was Re: your mail)

1999-11-30 Thread Mike Smith
> Hmmm... That's something... How do you know that the delete_child is > failing? An if printing that it failed or conjecture based on the > insertion results? You should definitely check the delete result, yes. Also, are you calling bus_generic_detach() after deleting the child? I got the im

Re: PCCARD eject freeze (was Re: your mail)

1999-11-30 Thread Christopher Masto
I'm on my way out for dinner, just thought I'd mention the latest experiment results. On Tue, Nov 30, 1999 at 04:19:18PM -0700, Warner Losh wrote: > : And further data on the CDPD card.. removing it while PPP is still > : running just paniced in sioioctl. However, the delete_child didn't > : fai

Re: PCCARD eject freeze (was Re: your mail)

1999-11-30 Thread Warner Losh
In message <[EMAIL PROTECTED]> Christopher Masto writes: : I added a check of the return value. It seemed to be returning 12 : (ENOMEM), but I'm not sure if that's real or garbage, since I'm having : trouble finding a code path that would return that. You might want to make ed_pccard_detach retu

Re: PCCARD eject freeze (was Re: your mail)

1999-11-30 Thread Christopher Masto
On Tue, Nov 30, 1999 at 04:04:40PM -0700, Warner Losh wrote: > In message <[EMAIL PROTECTED]> Christopher Masto writes: > : Hey, we're getting somewhere. It works, in that it stops the panic. > : I get the "ed0: unloaded" message, and the machine doesn't panic, but > : there are still some proble

Re: PCCARD eject freeze (was Re: your mail)

1999-11-30 Thread Warner Losh
In message <[EMAIL PROTECTED]> Christopher Masto writes: : It's not quite working. I think I got away ok with the ethernet card : because it wasn't being accessed, but my CDPD card with a running PPP : session pretty reliably still freezes up. Hrm. No, it's not freezing : up, it's a panic, but

Re: PCCARD eject freeze (was Re: your mail)

1999-11-30 Thread Warner Losh
In message <[EMAIL PROTECTED]> Frank Mayhar writes: : I'll bet Warner meant : device_delete_child(pccarddev, kid[i]); : up there, and not : device_delete_child(pccarddev, kid[0]); : : Did you try that? Yes. He did. Likely won't make a difference here because we don'

Re: PCCARD eject freeze (was Re: your mail)

1999-11-30 Thread Christopher Masto
On Tue, Nov 30, 1999 at 02:54:28PM -0800, Frank Mayhar wrote: > > On Tue, Nov 30, 1999 at 02:59:10PM -0700, Warner Losh wrote: > > > pccarddev = devclass_get_device(pccard_devclass, slt->slot); > > > device_get_children(pccarddev, &kids, &nkids) > > > for (i = 0; i < nkids; i++) > > >

Re: PCCARD eject freeze (was Re: your mail)

1999-11-30 Thread Warner Losh
In message <[EMAIL PROTECTED]> Christopher Masto writes: : Hey, we're getting somewhere. It works, in that it stops the panic. : I get the "ed0: unloaded" message, and the machine doesn't panic, but : there are still some problems. It seems that device_delete_child : is failing (I forgot to prin

Re: PCCARD eject freeze (was Re: your mail)

1999-11-30 Thread Frank Mayhar
Christopher Masto wrote: > On Tue, Nov 30, 1999 at 02:59:10PM -0700, Warner Losh wrote: > > In message <[EMAIL PROTECTED]> Christopher Masto writes: > > : I found that the only message printed was "ready to power off". > > > > bingo. looks like we're not deleting the child. Try replacing that >

Re: PCCARD eject freeze (was Re: your mail)

1999-11-30 Thread Christopher Masto
On Tue, Nov 30, 1999 at 02:59:10PM -0700, Warner Losh wrote: > In message <[EMAIL PROTECTED]> Christopher Masto writes: > : I found that the only message printed was "ready to power off". > > bingo. looks like we're not deleting the child. Try replacing that > for loop with something like: > >

Re: PCCARD eject freeze (was Re: your mail)

1999-11-30 Thread Warner Losh
In message <[EMAIL PROTECTED]> Christopher Masto writes: : I found that the only message printed was "ready to power off". bingo. looks like we're not deleting the child. Try replacing that for loop with something like: pccarddev = devclass_get_device(pccard_devclass, slt->slot);