some basic question about the aic7xxx driver
Wenbiao Liang
wenbiao.liang at shaw.ca
Sun Sep 21 10:43:18 PDT 2003
Hi All,
I am planning to write a driver for my SCSI scanner. Being very new to both
Unix and Unix device driver programming, I think I need to read the source
code of existing SCSI device drivers to gain some basic understanding of the
system.
I installed FreeBSD 5.1 release, and I have one Adaptec 2940W controler that
uses aic7880 chip. The reason to choose FreeBSD is it supports SCSI target
mode.
I am reading the source code at /usr/src/sys/dev/aic7xxx, and I have some
questions regarding this driver, and I hope the SCSI aic7xxx guru's can
answer my questions. :)
1. Is there a Makefile for aic7xxx source code under FreeBSD?
/usr/src/sys/dev/aic7xxx folder does not have one, however, the one I
downloaded from the web is for Linux.
2. How do I install the driver after I build it? I read the Device Drivers
section in the FreeBSD Architecture Handbook, but I am still not very clear
how to do it. Do I need to create a custom kernel for it? As you can see,
coming from MS world did not help me much. :)
3. There are a number of source files, such as aic7xxx.c, aic7xxx_pci.c,
aic7xxx_osm.c, ahc_pci.c and etc. What is the difference among them? Which
is the "main" source file for the SCSI adapter control driver?
4. How to debug the driver?
Thank you very much!
Wenbiao
More information about the aic7xxx
mailing list