From owner-freebsd-mobile Wed Sep 12 9: 4:15 2001 Delivered-To: freebsd-mobile@freebsd.org Received: from rover.village.org (rover.bsdimp.com [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id 9BB2337B410 for ; Wed, 12 Sep 2001 09:04:07 -0700 (PDT) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.11.3/8.11.3) with ESMTP id f8CG45614055; Wed, 12 Sep 2001 10:04:06 -0600 (MDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.11.3/8.11.4) with ESMTP id f8CG45t40527; Wed, 12 Sep 2001 10:04:05 -0600 (MDT) (envelope-from imp@harmony.village.org) Message-Id: <200109121604.f8CG45t40527@harmony.village.org> To: Lars Eggert Subject: Re: Partial Success! (Re: PC-Card broken: 4.4-RC4 & Dell Latitude C600) Cc: mobile@FreeBSD.ORG In-reply-to: Your message of "Wed, 12 Sep 2001 08:56:43 PDT." <3B9F85BB.70DE18A6@isi.edu> References: <3B9F85BB.70DE18A6@isi.edu> <3B9EC74D.CF3DECBD@isi.edu> <3B9E81C4.5CB017D@isi.edu> <3B9D0A4C.2090203@isi.edu> <200109111837.f8BIbft34551@harmony.village.org> <200109112134.f8BLYkt35748@harmony.village.org> <3B9E843A.54EA07A7@isi.edu> <200109121453.f8CEr2t39965@harmony.village.org> Date: Wed, 12 Sep 2001 10:04:05 -0600 From: Warner Losh Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org In message <3B9F85BB.70DE18A6@isi.edu> Lars Eggert writes: : Sorry, it doesn't change anything. Still immediate hang (no pccardd : message, etc.) when I eject any of the problematic cards. The good ones : still eject fine, too. A private message leads me to believe that we can't call the eject routine from the ISR... However, it looks like we're NOT acking the interrupt before the detach. So, if we enable interrupts any at all they might storm us before we can do that ack. I don't completely understand this problem just yet. It sounds a little like a bug in the spl code still. So, let's try the following patch. It isn't perfect style-wise, but let me know. We may need to do a little more than this. Index: pcic_pci.c =================================================================== RCS file: /home/imp/FreeBSD/CVS/src/sys/pccard/pcic_pci.c,v retrieving revision 1.54.2.16 diff -u -r1.54.2.16 pcic_pci.c --- pcic_pci.c 2001/09/06 20:59:49 1.54.2.16 +++ pcic_pci.c 2001/09/12 16:01:09 @@ -912,6 +912,10 @@ event = bus_space_read_4(sp->bst, sp->bsh, CB_SOCKET_EVENT); if (event != 0) { stat = bus_space_read_4(sp->bst, sp->bsh, CB_SOCKET_STATE); + + /* Ack the interrupt */ + bus_space_write_4(sp->bst, sp->bsh, 0, event); + if (bootverbose) device_printf(sc->dev, "Event mask 0x%x stat 0x%x\n", event, stat); @@ -934,8 +938,6 @@ if (stat & CB_SS_BADVCC) device_printf(sc->dev, "BAD Vcc request\n"); - /* Ack the interrupt */ - bus_space_write_4(sp->bst, sp->bsh, 0, event); } /* To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message