From owner-cvs-all Sat Mar 11 12:22:18 2000 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 1E9B437BCAF; Sat, 11 Mar 2000 12:22:10 -0800 (PST) (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id MAA77573; Sat, 11 Mar 2000 12:22:09 -0800 (PST) (envelope-from imp@FreeBSD.org) Message-Id: <200003112022.MAA77573@freefall.freebsd.org> From: Warner Losh Date: Sat, 11 Mar 2000 12:22:09 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/isa sio.c Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG imp 2000/03/11 12:22:09 PST Modified files: sys/isa sio.c Log: Fix crashes on card eject for pccard modems. We check for NULL when we get the com address. If so, we go ahead and return. Bruce thinks there's a bug in the pccard layer that it terminates devices with extreme prejustice rather than letting them deside for themselves when to terminate (and he's likely right). This fix doesn't change that, but instead works around it by checking for NULL pointers at more places than before. The detach routine still calls functions at interrupt level that aren't reentrant. In theory this could cause a problem, but none showed up in practice. Future versions should correct this problem, likely by making the detach process a thread/process at the pccard level. NEWCARD will do this, and the current pccard layer should likely be modified to that as well, should it live long enough. A few style nits of the same form that were in my original patch sent off to bde were also fixed as part of this process. Mostly use of !ptr and return ENOPARENS. This should prevent a crash on suspend with an active ppp link as well, but that wasn't tested. Reviewed by: bde Approved by: jkh Revision Changes Path 1.291 +18 -13 src/sys/isa/sio.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message