From owner-freebsd-hackers Sun Aug 23 14:44:12 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA26096 for freebsd-hackers-outgoing; Sun, 23 Aug 1998 14:44:12 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from shadow.spel.com (elevator.cablenet-va.com [208.206.84.25]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA26091 for ; Sun, 23 Aug 1998 14:44:10 -0700 (PDT) (envelope-from mturpin@shadow.spel.com) Received: from localhost (mturpin@localhost) by shadow.spel.com (8.8.8/8.8.5) with SMTP id RAA13088 for ; Sun, 23 Aug 1998 17:45:04 -0400 (EDT) Date: Sun, 23 Aug 1998 17:45:04 -0400 (EDT) From: Mark turpin To: FreeBSD hackers Subject: PCI Device driver question 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 Hello, This is my first attempt at writing a device driver.. I read most of the other drivers in the pci directory before starting and thought I knew what I was doing... Well, obviously I didn't :) So, I need your help.. All I want to do right now is make it show that it actually found the device on the startup list. Please help Thanks Mark Turpin I added the following line to files pci/if_rtk.c rtk device-driver and to GENERIC in i386/conf device rtk0 and here is my wonderful code.... #include "pci.h" #if NPCI > 0 #include #include #include #include #include #include #include "rtk.h" static char* rtk_pci_probe __P((pcici_t, pcidi_t)); static void rtk_pci_attach __P((pcici_t config_id, int unit)); static u_long rtk_pci_count = NRTK; static struct pci_device rtk_pci_driver = { "rtk", rtk_pci_probe, rtk_pci_attach, &rtk_pci_count, NULL }; static char* rtk_pci_probe (config_id, device_id) pcici_t config_id; pcidi_t device_id; { if (device_id && 0x813910ec) return ("RealTek 8139 10/100Mbps Ethernet"); return NULL; } static void rtk_pci_attach (config_id, unit) pcici_t config_id; int unit; { /* Attach stuff goes here */ return; } #endif /* NPCI > 0 */ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message