Date: Fri, 22 Nov 2002 13:31:01 -0700 From: yiding_wang@agilent.com To: freebsd-questions@FreeBSD.ORG Subject: Questions about scsi hba driver Message-ID: <334DD5C2ADAB9245B60F213F49C5EBCD019C7AA3@axcs03.cos.agilent.com>
next in thread | raw e-mail | index | archive | help
This is the first expecrience for me with FreeBSD and I am going to start making fuss here. I am planning to write drivers for iSCSI and FC initiator as well as target ramdisk on FreeBSD, and just installed 4.7 and downloaded a few docs. By looking into CVS, I got a bit confused on driver building and loading process as well as source file layout. I will use Buslogic driver bt.c as an example. For better understanding, any reference to scsi driver under Linux, Unixware. Solaris, SCO OS5 will be welcomed since I have written drivers for scsi / FC / iSCSI under those enviornments. Here comes the first set of question: 1, I noticed that there are a few places drivers are spreaded. For example /sys/dev/buslogic/bt.c, v /sys/dev/buslogic/bt_pci.c, v /sys/dev/buslogic/btreg.h, v and same files and others which cover same hardware are located at: /sys/i386/scsi/Attic/bt.c, v /sys/i386/scsi/Attic/btreg.h, v /sys/pci/Attic/bt9xx.c, v /sys/pci/Attic/bt_pci.c, v etc. Why these drivers are spreaded? If I have a pci initiator driver, can the source only be located under /sys/dev/vendor instead of also put some part of code under /sys/pci/Attic? Does FreeBSD requires realmode driver to boot? Those bus (EISA, ISA, PCI) related subdirectories look like Solaris realmode driver distribution. 2, Where is proper place for driver source code? If this driver does not intend for a boot device, can it be placed anywhere like other Unixes? 3, There are Makefiles for aic7xxx, e.g. under module, but nothing for bt.c. Does that mean buslogic driver not supporting loadable module? 4, There are utility of "pkg_add" for driver loading, similar to Solaris, and "kldload" for module loading, similar to Linux. Can I assume both methods work for scsi driver. The difference will be kldload works only for this boot and module will be gone after "kldunload" or system reboot but "pag_add" will hook driver to kernel from boot to boot till pag_delete is performed. 5, If driver will be loaded with pkg_add, where are those related package required header files located? Many thanks! Eddie (Yiding) Wang SPG, Agilent Technologies 3175 Bowers Ave., MS 88C Santa Clara, Ca 95054 Tel: (408) 970-3059 Fax: (408) 970-3099 E-Mail: yiding_wang@agilent.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?334DD5C2ADAB9245B60F213F49C5EBCD019C7AA3>