From owner-freebsd-mobile Tue Apr 11 1:22: 9 2000 Delivered-To: freebsd-mobile@freebsd.org Received: from tasogare.imasy.or.jp (tasogare.imasy.or.jp [202.227.24.5]) by hub.freebsd.org (Postfix) with ESMTP id 7679237B897 for ; Tue, 11 Apr 2000 01:22:05 -0700 (PDT) (envelope-from iwasaki@jp.FreeBSD.org) Received: from localhost (isdn19.imasy.or.jp [202.227.24.211]) by tasogare.imasy.or.jp (8.9.3+3.2W/3.7W-tasogare/smtpfeed 1.01) with ESMTP id RAA02122; Tue, 11 Apr 2000 17:22:02 +0900 (JST) (envelope-from iwasaki@jp.FreeBSD.org) Message-Id: <200004110822.RAA02122@tasogare.imasy.or.jp> To: imp@village.org Cc: sanpei@sanpei.org, FreeBSD-mobile@FreeBSD.ORG Subject: Re: [NEWCARD] pcic_handle in pcic_{enable,disable}_socket In-Reply-To: Your message of "Mon, 03 Apr 2000 22:25:30 -0600" <200004040425.WAA66194@harmony.village.org> References: <200004040425.WAA66194@harmony.village.org> X-Mailer: Mew version 1.93 on Emacs 19.34 / Mule 2.3 (SUETSUMUHANA) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Tue, 11 Apr 2000 17:21:59 +0900 From: Mitsuru IWASAKI X-Dispatcher: imput version 980905(IM100) Lines: 74 Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi, > I've spent a few minutes looking into this. I've managed to make it > boot. I can insert and remove cards, but the CIS isn't mapping. So > pccard_cis_scan can't really find anything... It seems that sc->dev has no parent and this cause bus_alloc_resource() failure in pccard_scan_cis(). And one more thing, sc->dev(0xc090aa00) and device_t dev (0xc090e000) in pccard_card_attach() differ. Is it correct? pcic0 at port 0x3e0 iomem 0xd0000 irq 10 on isa0 pcic ident regs: 0x83 0xff 0xff 0xff pcic0: controller 0 (Intel 82365SL Revision 1) has socket A only pccard0: on pcic0 [snip] Mounting root from ufs:/dev/ad0s3a pcic0: intr pccard0: 00 CD be pccard0: enqueing INSERTION event pccard0: insertion event pcic_attach_card h 0xc0911848 h->dev 0xc090e000 pccard0: pccard_card_attach pccard0: chip_socket_enable pccard0: pcic_chip_socket_enable cardtype mem 40 pccard0: parent of sc->dev(0xc090aa00) is NULL, bus_alloc_resource() will fail for this device pccard0: read_cis pccard0: chip_socket_disable pcic_chip_socket_disable pccard0: check_cis_quirks pcic0: intr pccard0: 00 CD b2 pccard0: deactivating card pccard0: enqueing REMOVAL event pccard0: removal event Index: pccard.c =================================================================== RCS file: /home/ncvs/src/sys/dev/pccard/pccard.c,v retrieving revision 1.9 diff -u -r1.9 pccard.c --- pccard.c 2000/03/26 07:01:51 1.9 +++ pccard.c 2000/04/11 07:50:10 @@ -117,6 +117,11 @@ DEVPRINTF((dev, "chip_socket_enable\n")); POWER_ENABLE_SOCKET(device_get_parent(dev), dev); + if (device_get_parent(sc->dev) == 0) { + DEVPRINTF((dev, "parent of sc->dev(%p) is NULL, " + "bus_alloc_resource() will fail for this device\n", + sc->dev)); + } DEVPRINTF((dev, "read_cis\n")); pccard_read_cis(sc); Index: power_if.m =================================================================== RCS file: /home/ncvs/src/sys/dev/pccard/power_if.m,v retrieving revision 1.2 diff -u -r1.2 power_if.m --- power_if.m 2000/01/06 07:30:28 1.2 +++ power_if.m 2000/04/11 08:02:54 @@ -26,6 +26,8 @@ # $FreeBSD: src/sys/dev/pccard/power_if.m,v 1.2 2000/01/06 07:30:28 imp Exp $ # +#include + INTERFACE power; # To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message