|
|
#include "scsi.h"
Each entry is of type struct scsi_dev_cfg. The fields in the structure are described below:
int index;
char *dev_name;
dev_t devnum;
unsigned char ha_num;
unsigned char id;
unsigned char lun;
unsigned char distributed;
int (*adapter_entry)();
struct exten *dext;
If your driver does not conform to the standard
naming convention established by the interface,
you can manually create your own configuration tables
rather than use those that are created automatically
by the kernel Link Kit.
When creating your own configuration tables,
ou must also write your own version of the
idscsi(ADM)"
program that the Link Kit calls
and you must provide driver access information
about the device to your users.
The Link Kit provides this
and should be used to ensure that your driver
can be brought up and tested
before you create your own system.
struct scsi_dev_cfg Stpcfg[]= { /* 0 */ {0x0, "Stp", (dev_t) 0x2e, (unsigned char) 0x0, (unsigned char) 0x2, (unsigned char) 0x0, (unsigned char) 0x0, bhba_entry, &extn[0] }, /* 1 */ {0x1, "Stp", (dev_t) 0x0, (unsigned char) 0x0, (unsigned char) 0x0, (unsigned char) 0x0, (unsigned char) 0x0, noha_entry, &extn[8] }, /* 2 */ {0x2, "Stp", (dev_t) 0x0, (unsigned char) 0x0, (unsigned char) 0x0, (unsigned char) 0x0, (unsigned char) 0x0, noha_entry, &extn[9] },The second example illustrates the definition of an array of ``Sdsk'' (generic SCSI disk drivers) peripheral drivers using the scsi_ha_cfg structure type.... /* 5 */ {0xff}, };
struct scsi_dev_cfg Sdskcfg[]= { /* 0 */ {0x0, "Sdsk", (dev_t) 0x2d, (unsigned char) 0x0, (unsigned char) 0x0, (unsigned char) 0x0, (unsigned char) 0x0, bhba_entry, &extn[1] }, ... /* 6 */ {0xff}, };