From owner-freebsd-hackers Sat Dec 8 15: 1:36 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mta06ps.bigpond.com (mta06ps.bigpond.com [144.135.25.138]) by hub.freebsd.org (Postfix) with ESMTP id 374B737B41C for ; Sat, 8 Dec 2001 15:01:30 -0800 (PST) Received: from voicetronix.com.au ([144.135.25.84]) by mta06ps.bigpond.com (Netscape Messaging Server 4.15) with SMTP id GO1S9R00.2U3; Sun, 9 Dec 2001 09:08:15 +1000 Received: from 144.137.194.16 ([144.137.194.16]) by psmam06.mailsvc.email.bigpond.com(MailRouter V2.9k 8419/35334204); 09 Dec 2001 09:01:23 Message-ID: <3C129CD6.32663F24@voicetronix.com.au> Date: Sun, 09 Dec 2001 09:35:58 +1030 From: David Rowe Organization: Voicetronix X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.2-2 i686) X-Accept-Language: en MIME-Version: 1.0 To: Brooks Davis , hackers@freebsd.org Subject: Re: Newbie: Driver for PLX9050 References: <3C11C69B.F2898B1D@voicetronix.com.au> <20011208132933.A6980@Odin.AC.HMC.Edu> <3C128D82.CBF9DFB3@voicetronix.com.au> <20011208140528.A16554@Odin.AC.HMC.Edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > No, you can claim PCI devices after boot. It works fine. Stick some > printfs in your probe code to be sure it's being called correctly and > what it's being called on. > OK - this is my probe function: static int mypci_probe(device_t dev) { uprintf("MyPCI Probe\n" "Vendor ID : 0x%x\n" "Device ID : 0x%x\n",pci_get_vendor(dev),pci_get_device(dev)); return ENXIO; } OK - here is what happens: su-2.05# kldload -v ./mypci.ko MyPCI Probe Vendor ID : 0x15e2 Device ID : 0x500 MyPCI Probe Vendor ID : 0x5333 Device ID : 0x5631 Loaded ./mypci.ko, id=7 Note: - none of these are my PLX chip (vender ID 0x9050) which has already been assigned to the chip2 device, for example here is the output of pciconf -l: su-2.05# pciconf -l chip0@pci0:0:0: class=0x060000 card=0x00000000 chip=0x71008086 rev=0x01 hdr=0x00 isab0@pci0:7:0: class=0x060100 card=0x00000000 chip=0x71108086 rev=0x01 hdr=0x00 atapci0@pci0:7:1: class=0x010180 card=0x00000000 chip=0x71118086 rev=0x01 hdr=0x00 uhci0@pci0:7:2: class=0x0c0300 card=0x00000000 chip=0x71128086 rev=0x01 hdr=0x00 chip1@pci0:7:3: class=0x068000 card=0x00000000 chip=0x71138086 rev=0x01 hdr=0x00 none0@pci0:9:0: class=0x040100 card=0x00000000 chip=0x050015e2 rev=0x00 hdr=0x00 chip2@pci0:10:0: class=0x068000 card=0x56345654 chip=0x905010b5 rev=0x02 hdr=0x00 none1@pci0:11:0: class=0x030000 card=0x00000000 chip=0x56315333 rev=0x06 hdr=0x00 ed0@pci0:12:0: class=0x020000 card=0x802910ec chip=0x802910ec rev=0x00 hdr=0x00 As far as I can see - it is _only_ the PCI devices without drivers that are presented to mypci_probe. As my device has already been assigned to the chip2 driver, it is not presented to the probe function. Is there any way to probe those devices that already have drivers? Is it possible to replace an exixiting driver (e.g. chip2) with my driver? Thanks, David > -- Brooks > > -- > Any statement of the form "X is the one, true Y" is FALSE. > PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 > > ------------------------------------------------------------------------ > Part 1.2Type: application/pgp-signature To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message