From owner-freebsd-hackers Mon Mar 27 12:54:31 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from hoemail2.firewall.lucent.com (hoemail2.lucent.com [192.11.226.163]) by hub.freebsd.org (Postfix) with ESMTP id 3120537B720 for ; Mon, 27 Mar 2000 12:54:27 -0800 (PST) (envelope-from gcorcora@mhmail.mh.lucent.com) Received: from hoemail2.firewall.lucent.com (localhost [127.0.0.1]) by hoemail2.firewall.lucent.com (Pro-8.9.3/8.9.3) with ESMTP id PAA08239 for ; Mon, 27 Mar 2000 15:54:17 -0500 (EST) Received: from mhmail.mh.lucent.com (h135-3-115-8.lucent.com [135.3.115.8]) by hoemail2.firewall.lucent.com (Pro-8.9.3/8.9.3) with ESMTP id PAA08078 for ; Mon, 27 Mar 2000 15:54:04 -0500 (EST) Received: from mhmail.mh.lucent.com by mhmail.mh.lucent.com (8.8.8+Sun/EMS-1.5 sol2) id PAA22339; Mon, 27 Mar 2000 15:54:02 -0500 (EST) Message-ID: <38DFCB7D.C86550@mhmail.mh.lucent.com> Date: Mon, 27 Mar 2000 15:58:37 -0500 From: "Gary T. Corcoran" Reply-To: gcorcoran@lucent.com Organization: Lucent Microelectronics - Modem and Multimedia Systems X-Mailer: Mozilla 4.06 [en] (Win98; U) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Subject: How to make a PCI network device loadable module? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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'm running FreeBSD 3.4. I'm not subscribed to the -hackers list, so please copy me on all replies. Thanks, Gary -- ======================================================= Gary Corcoran - Distinguished Member of Technical Staff Lucent Microelectronics - Modem & Multimedia Systems Communications Protocol & Driver Development Group "We make the drivers that make communications work" Email: gcorcoran@lucent.com ------------------------------------------------------- There are only two kinds of machines - those that fail little by little, and those that fail all at once. ======================================================= To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message