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 [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message