Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Jul 1998 16:01:23 +0100 (BST)
From:      Rob Pickering <rob@syntonet.co.uk>
To:        freebsd-isdn@FreeBSD.ORG
Subject:   i4b panic when card configured but not present (i4b-00.63-alpha-100798 on OpenBSD 2.3)
Message-ID:  <6111.199807311501@berkeley.pickering.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6111.199807311501>