From D.M.Pick@qmw.ac.uk Thu Mar 18 11:11:02 1999
Return-Path: <D.M.Pick@qmw.ac.uk>
Received: from gamma.qmw.ac.uk (gamma.qmw.ac.uk [138.37.6.8])
	by hub.freebsd.org (Postfix) with SMTP id E800B14E58
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 18 Mar 1999 11:10:42 -0800 (PST)
	(envelope-from D.M.Pick@qmw.ac.uk)
Received: from xi.css.qmw.ac.uk by gamma.qmw.ac.uk with SMTP-QMW with ESMTP;
          Thu, 18 Mar 1999 19:10:18 +0000
Received: from cgaa180 by xi.css.qmw.ac.uk 
          with local (Exim 1.92 #1)	for FreeBSD-gnats-submit@freebsd.org	id 10NiBK-0001tT-00;
          Thu, 18 Mar 1999 19:10:14 +0000
Message-Id: <E10NiBK-0001tT-00@xi.css.qmw.ac.uk>
Date: Thu, 18 Mar 1999 19:10:14 +0000
From: D.M.Pick@qmw.ac.uk
Sender: David Pick <D.M.Pick@qmw.ac.uk>
Reply-To: D.M.Pick@qmw.ac.uk
To: FreeBSD-gnats-submit@freebsd.org
Subject: DMPno3 - pcic module gets loaded twice and allocates too many slots
X-Send-Pr-Version: 3.2

>Number:         10655
>Category:       conf
>Synopsis:       DMPno3 - pcic module gets loaded twice and allocates too many slots
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    nate
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 18 11:20:00 PST 1999
>Closed-Date:    Thu Mar 18 12:54:55 PST 1999
>Last-Modified:  Thu Mar 18 12:56:11 PST 1999
>Originator:     David Pick
>Release:        FreeBSD 3.1-RELEASE i386
>Organization:
Queen Mary and Westfield College, University of London
>Environment:

	FreeBSD 3.1-RELEASE running on a Toshiba Libretto 50CT

>Description:

	I have built a custom kernel for this machine for 3.1-RELEASE
	in the same way I did for 3.0-RELEASE and 2.2.7-RELEASE. I have
	been having trouble with getting PCCards to work, and have come
	to the conclusion that the "pcic" module is getting loaded twice
	and so double the correct number of "slot"s are getting allocated
	because there are twice as many calls as there should be to
	"pccard_alloc_slot". If I put a PCCard into slot 1 I get told it
	has been inserted into slot 3. Ditto real slot 0 gets reported
	as slot 2. And the card(s) are not successfully picked up by
	the "pccardd" daemon (which may be a different problem, of course!).
	During startup I get the message:
		 "PC-Card %s (%d mem & %d I/O windows)\n"
	twice with two different irq numbers. I get:
		"Initializing PC-card drivers: fdc"
	once (between the other two messages.

	But more tellingly, the command:
		kldstat -v
	tells me I have a kernel (id=1) containing a module "pcic" (id=6)
	*and* I have another file "pcic.ko" containing a module "pcic" (id=23)
	as the only module in the file.

	So I suspect there's something not quite right with the configuration
	utilities so that the kernel has the module in it and also thinks it
	had to load another copy.

	Incidentally, it's not at all clear how many "pcic" lines you
	really need - "LINT" has two, but I've still got the problem
	with only one.

	Ratings are serious/medium because having spent some time installing
	the new release on the Libretto, I now can't use it in varying
	circumstances with a choice of PCCards depending on where I am at
	the time (Ethernet, Modem, GSM "modem", &c). I'm reluctant to
	build a whole set of alternative kernels because I'd fill the
	root partition; so I'd have to reinstall from scratch to resize it.
	Not something I would look forward to.

>How-To-Repeat:

	Build a kernel with the lines:
		controller	card0
		device		pcic0

>Fix:
	
	Sorry - that's why I'm asking!

-- 
	David Pick
	D.M.Pick@qmw.ac.uk


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: nate 
State-Changed-When: Thu Mar 18 12:54:55 PST 1999 
State-Changed-Why:  
Fixed in /etc/rc.pccard in both -stable and -current. 
Current: V1.10 
Stable:  V1.6.2.4 


Responsible-Changed-From-To: freebsd-bugs->nate 
Responsible-Changed-By: nate 
Responsible-Changed-When: Thu Mar 18 12:54:55 PST 1999 
Responsible-Changed-Why:  
I applied the patches to /etc/rc.pccard 
. 
>Unformatted:
