From owner-freebsd-hackers Fri Aug 11 11:33:14 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from wireless.net (wireless.net [207.137.156.159]) by hub.freebsd.org (Postfix) with ESMTP id 71BEB37B56D for ; Fri, 11 Aug 2000 11:33:08 -0700 (PDT) (envelope-from dbutter@wireless.net) Received: from db.wireless.net (db.wireless.net [209.75.70.101]) by wireless.net (8.9.3/8.9.3) with ESMTP id LAA28018 for ; Fri, 11 Aug 2000 11:33:11 -0700 (PDT) Received: from wireless.net (dbm.wireless.net [192.168.0.2]) by db.wireless.net (8.9.3/8.9.3) with ESMTP id LAA27540 for ; Fri, 11 Aug 2000 11:25:37 -0700 (PDT) (envelope-from dbutter@wireless.net) Message-ID: <399446E0.D4F51CCA@wireless.net> Date: Fri, 11 Aug 2000 11:33:04 -0700 From: Devin Butterfield X-Mailer: Mozilla 4.73 [en] (X11; I; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-hackers@FreeBSD.ORG Subject: Need help with driver.... Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi all, I'm a newbie to device driver writing and I have been learning well by reading the code of the other drivers in the system. I would ultimately like to port a linux driver for a VoIP telephony card (Quicknet PhoneJack) to FreeBSD, and so far I have a skeleton driver which does successfully probe the card. The problem I'm having is that I don't know how to tell whether or not the card is attaching correctly. How can I determine this? I thought that I would be able to make a device file in /dev if it correctly attached but MAKEDEV responds with: {root@dbm /dev]# ./MAKEDEV phone phone - no such device name For reference, here is my attach routine: static int ixj_isa_attach (dev) /* attach device */ device_t dev; { int unit = device_get_unit(dev); struct ixj_softc *sc = device_get_softc(dev); struct resource *res; int rid; int size; if (sc->port_used > 0) { size = sc->port_used; rid = sc->port_rid; res = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 0, ~0, size, RF_ACTIVE); if (res) { sc->port_rid = rid; sc->port_res = res; sc->port_used = size; } } make_dev(&ixj_cdevsw, UNIT(dev), UID_ROOT, GID_WHEEL, 0666, "phone%d", unit); return (0); } What am I doing wrong? How can I tell if this is working? Why can't I make the device file? Thanks in advance. -- Regards, Devin. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message