From owner-freebsd-hackers Thu Jan 18 1:55:34 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from samar.sasi.com (samar.sasken.com [164.164.56.2]) by hub.freebsd.org (Postfix) with ESMTP id E9BD237B6A0 for ; Thu, 18 Jan 2001 01:55:05 -0800 (PST) Received: from samar (samar.sasi.com [164.164.56.2]) by samar.sasi.com (8.9.3/8.9.3) with SMTP id PAA08094 for ; Thu, 18 Jan 2001 15:24:49 +0530 (IST) Received: from suns3.sasi.com ([10.0.36.3]) by samar.sasi.com; Thu, 18 Jan 2001 15:24:47 +0000 (IST) Received: from localhost (sseth@localhost) by suns3.sasi.com (8.9.3/8.9.3) with ESMTP id PAA19173 for ; Thu, 18 Jan 2001 15:24:47 +0530 (IST) Date: Thu, 18 Jan 2001 15:24:47 +0530 (IST) From: Satyajeet Seth To: Subject: How to make a PCI network device loadable module? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I'd like to know how to make the network device driver I'm working on, a loadable module. It's for a PCI device. I was unable to find any examples of PCI network modules under /sys/pci. The examples under /usr/share/examples/kld are not very helpful either for a PCI network device. It appears I need to add an xxx_load() routine, but what should it do? How and when does my xxx_probe() routine get called? How and when does my xxx_attach() routine get called? What macro do I use to tell the system my driver is a kld? That is, I was unable to find a "NETDEV_MODULE" macro that might be equivalent to the "CDEV_MODULE" macro in the example character device module code... I am working on FreeBSD 4.0 -Satya To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message