Date: Fri, 19 Nov 1999 10:40:19 -0700 From: Warner Losh <imp@village.org> To: Josef Karthauser <joe@pavilion.net> Cc: Dan Moschuk <dan@FreeBSD.ORG>, hackers@FreeBSD.ORG Subject: Re: VAIO F270, ep0 and -current Message-ID: <199911191740.KAA33661@harmony.village.org> In-Reply-To: Your message of "Fri, 19 Nov 1999 17:20:25 GMT." <19991119172025.A97321@florence.pavilion.net> References: <19991119172025.A97321@florence.pavilion.net> <19991118192338.D55314@florence.pavilion.net> <19991117143759.A3011@spirit.jaded.net> <19991118192338.D55314@florence.pavilion.net> <199911182135.OAA28043@harmony.village.org>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <19991119172025.A97321@florence.pavilion.net> Josef Karthauser writes: : If you can give me some clues I'll work on it. I've got zero familiarity : with the code :(. Sure. I posted this once to -mobile, so you might want to look in the archives there as well as here. The basic problem is that it appears that detach may be called AFTER the power is removed from the card generating an interrupt causing the interrupt routine to be called when the card is no longer there, which leads to an instant hang. Either that, or the act of removing the card causes an interupt to the card, then on the pcic which pulls the rug out from under the card and then it just hangs. I'm not completely sure and don't have a machine to test this on extenstively right now, so here goes at an off the cuff analysis. Looking at pcicintr in sys/pccard/pcic.c we see that the card_inserted event gets called (pccard_event in sys/pccard/pccard.c). This calls disable_slot and sets the state of the slot to empty and wakes up the pccardd proces. Looking at code it appears that we go ahead and delete the child in disable_slot (which should really be delayed until spl has been lowered via a timeout) which should be right. We then wait 1/2 second and power off the slot. Looks like we call the controllers disable routine for the slot (which is pcic_disable in pcic.c) where we turn off the card at the bridge chip. It is when we power the card off that we hang in the cards interrupt routine. Given this sequence of events, we should be safe. For the ep card we if_down, teardown the interrupt and free the resources and print unload. Somewhere in the above, something goes wrong :-(. Maybe it is the first parenthetical statement about waiting for the spl to be lowered, which would be something like: /* * disable_slot - Disables the slot by removing * the power and unmapping the I/O */ static void real_disable_slot(struct slot *slt); static void disable_slot(struct slot *slt) { slt->poff_ch = timeout(real_disable_slot, (caddr_t) slot, 0); } static void real_disable_slot(struct slot *slt) { // guts of the old disable_slot goes here } but there may be some more complicated book keeping needed... Lemme know if this helps... Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199911191740.KAA33661>