From owner-freebsd-current@FreeBSD.ORG Wed Sep 24 20:49:41 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F47B106568B for ; Wed, 24 Sep 2008 20:49:41 +0000 (UTC) (envelope-from shoesoft@gmx.net) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id A98208FC12 for ; Wed, 24 Sep 2008 20:49:40 +0000 (UTC) (envelope-from shoesoft@gmx.net) Received: (qmail invoked by alias); 24 Sep 2008 20:49:38 -0000 Received: from 85-127-94-178.dynamic.xdsl-line.inode.at (EHLO taxman.pepperland) [85.127.94.178] by mail.gmx.net (mp063) with SMTP; 24 Sep 2008 22:49:38 +0200 X-Authenticated: #16703784 X-Provags-ID: V01U2FsdGVkX19AMs5wqdJAtghNMye/y6hW3kU8h5I26Sehryn+fE tY5TTA1mwbJzC0 From: Stefan Ehmann To: John Baldwin Date: Wed, 24 Sep 2008 22:49:37 +0200 User-Agent: KMail/1.10.1 (FreeBSD/7.1-PRERELEASE; KDE/4.1.1; i386; ; ) References: <200809201305.13339.shoesoft@gmx.net> <200809231525.03606.jhb@freebsd.org> In-Reply-To: <200809231525.03606.jhb@freebsd.org> MIME-Version: 1.0 Message-Id: <200809242249.38107.shoesoft@gmx.net> X-Y-GMX-Trusted: 0 X-FuHaFi: 0.52,0.52 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-current@freebsd.org Subject: Re: prvxxx: cxm_iic attach fails X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Sep 2008 20:49:41 -0000 On Tuesday 23 September 2008 21:25:03 John Baldwin wrote: > On Saturday 20 September 2008 07:05:12 am Stefan Ehmann wrote: > > Hello, > > > > I'm using the port from > > http://usleepless.110mb.com/pvrxxx_port.tgz > > for my PVR-150 card. > > > > I get this error on kldload cxm: > > Sep 20 12:07:48 taxman kernel: cxm0: mem > > 0xd8000000-0xdbffffff irq 18 at device 15.0 on pci0 > > Sep 20 12:07:48 taxman kernel: cxm_iic0: > controller> on cxm0 > > Sep 20 12:07:48 taxman kernel: cxm_iic0: could not attach iicbb > > Sep 20 12:07:48 taxman kernel: device_attach: cxm_iic0 attach returned 6 > > Sep 20 12:07:48 taxman kernel: cxm0: could not attach cxm_iic > > Sep 20 12:07:48 taxman kernel: device_attach: cxm0 attach returned 6 > > > > > > Build fails on recent current because minor(9) is now a macro. > > > > The cause is this define in cxm.h > > # define dev_t struct cdev * > > > > I added this ugly hack to get it build. Not sure if it's correct but I > > don't think it's the cause of the problem. > > #undef minor > > #define minor(d) ((d) ? (d)->si_drv0 : -1) > > > > Haven't tested previously on CURRENT. But the card is working on > > RELENG_7: Sep 20 12:38:50 taxman kernel: cxm0: > Coder> mem 0xd8000000-0xdbffffff irq 18 at device 15.0 on pci0 > > Sep 20 12:38:50 taxman kernel: cxm_iic0: > controller> on cxm0 > > Sep 20 12:38:50 taxman kernel: iicbb0: on > > cxm_iic0 Sep 20 12:38:50 taxman kernel: iicbus0: on > > iicbb0 master- only > > Sep 20 12:38:50 taxman kernel: iicbus0: at addr 0 > > Sep 20 12:38:50 taxman kernel: iicbus0: at addr 0 > > > > Any ideas? > > cxm needs to include its own 'DEVICE_DRIVER' line for iicbus in HEAD now. > Basically, it needs this line: > > DRIVER_MODULE(iicbb, cxm_iic, iicbb_driver, iicbb_devclass, 0, 0); Thanks, that fixed it!