From owner-freebsd-isdn Fri Jul 31 08:02:51 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA06215 for freebsd-isdn-outgoing; Fri, 31 Jul 1998 08:02:51 -0700 (PDT) (envelope-from owner-freebsd-isdn@FreeBSD.ORG) Received: from berkeley.pickering.org (syntonet.demon.co.uk [193.237.143.6]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA06177 for ; Fri, 31 Jul 1998 08:02:40 -0700 (PDT) (envelope-from rob@pickering.org) Message-Id: <6111.199807311501@berkeley.pickering.org> Subject: i4b panic when card configured but not present (i4b-00.63-alpha-100798 on OpenBSD 2.3) To: freebsd-isdn@FreeBSD.ORG Date: Fri, 31 Jul 1998 16:01:23 +0100 (BST) From: Rob Pickering X-Mailer: ELM [version 2.4ME+ PL31 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-isdn@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi, Whilst trying to build an OpenBSD 2.3 system with i4b-00.63-alpha-100798 I've found a problem when cards are configured but not installed. I installed i4b on a spare machine and built a kernel config for my Teles 16.3 but didn't yet install the card (because it's currently in my main production server running OpenBSD 2.2 + bisdn with an uptime of 63 days and I can't afford to move the system over until I'm confident it will probably work). When booting the machine without the card present the new kernel panics. I've tracked this down to isa_isic_probe() where the logic flow when a card isn't discovered allows args_unmap to be called twice on the same mapping. The second time causes OpenBSD to panic because the mapping doesn't now exist. The following small patch kludges the problem by making args_unmap mark as zero size mappings it has already removed so it doesn't try to remove them again. I guess a better fix would be to change the logic in isa_isic_probe so that unmap gets called exactly once for each mapping. *** isa_isic.c Fri Jun 19 10:26:22 1998 --- ../../layer1/isa_isic.c Fri Jul 31 15:25:36 1998 *************** *** 737,742 **** int i; for (i = 0; i < num_mappings; i++) ! if (maps[i].size) bus_space_unmap(maps[i].t, maps[i].h, maps[i].size); } --- 737,744 ---- int i; for (i = 0; i < num_mappings; i++) ! if (maps[i].size){ bus_space_unmap(maps[i].t, maps[i].h, maps[i].size); + maps[i].size = 0; + } } --- -- Rob Pickering. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message