From owner-freebsd-mobile Mon Apr 3 20:56:55 2000 Delivered-To: freebsd-mobile@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id 8F6F637B89E for ; Mon, 3 Apr 2000 20:56:52 -0700 (PDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id VAA90802; Mon, 3 Apr 2000 21:56:48 -0600 (MDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id VAA65987; Mon, 3 Apr 2000 21:56:07 -0600 (MDT) Message-Id: <200004040356.VAA65987@harmony.village.org> To: MIHIRA Sanpei Yoshiro Subject: Re: [NEWCARD] pcic_handle in pcic_{enable,disable}_socket Cc: FreeBSD-mobile@FreeBSD.ORG In-reply-to: Your message of "Tue, 04 Apr 2000 02:49:41 +0900." <200004031749.CAA42107@lavender.yy.cs.keio.ac.jp> References: <200004031749.CAA42107@lavender.yy.cs.keio.ac.jp> Date: Mon, 03 Apr 2000 21:56:07 -0600 From: Warner Losh Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org In message <200004031749.CAA42107@lavender.yy.cs.keio.ac.jp> MIHIRA Sanpei Yoshiro writes: : I'm trying and test NEWCARD configuration(/sys/dev/pccard,pcic) : for Native-CardBus support under FreeBSD. Yea! : I can compile. But if I insert PC-Card, kernel panicked..... Boo. : I read /sys/dev/pcic/i82365.c, I think current problem is below : NULL pointer(Yes I know this line has XXXIMPXXX!!). : : int : pcic_enable_socket(device_t dev, device_t child) : { : struct pcic_handle *h = NULL; /* XXXIMPXXX */ : ~~~~ : i82365.c:pcic_attach function ph_read/write are setted. : : Warner-san, What plan do you have? OK. Each pccard child of pcic (or other bridges that supports a 16bit card) has a pcic_handle as its ivar. So, what needs to happen here is that we need to get the right device, and get its ivars. I've just committed a few changes that make sure that this is the case. Now, we get much further than before. We get into the reading of the CIS before we die. Looks like we/re passing a bad pointer to bus_alloc_resource in pccard_cis_scan. Looks like a bogus cast to struct device * of the pccard_softc. Those aren't right. I'm working on that part of things. Any cast of softc to a struct device is likely wrong, in case you see any in the code. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message