diff options
author | gibbs <gibbs@FreeBSD.org> | 1995-07-17 23:38:16 +0000 |
---|---|---|
committer | gibbs <gibbs@FreeBSD.org> | 1995-07-17 23:38:16 +0000 |
commit | 5fa4b742aea5aa85a02d5669d70b27bd476ff05d (patch) | |
tree | e6aac2b0d579342bd4f87e50bae9270464edff6e /usr.sbin/config | |
parent | b104528a4f81d68fcc596e81db6cf2c2888512a5 (diff) | |
download | FreeBSD-src-5fa4b742aea5aa85a02d5669d70b27bd476ff05d.zip FreeBSD-src-5fa4b742aea5aa85a02d5669d70b27bd476ff05d.tar.gz |
Allow the specification of the controller bus when wiring down scsi buses.
This is performed by using a line similar to:
controller scbus0 at ahc0 bus 1
to wire scbus0 to the second bus on an adaptec 2742T controller.
Reviewed by: Peter Dufault(dufault@hda.com), Rod Grimes(rgrimes@FreeBSD.org)
Diffstat (limited to 'usr.sbin/config')
-rw-r--r-- | usr.sbin/config/config.y | 9 | ||||
-rw-r--r-- | usr.sbin/config/lang.l | 1 | ||||
-rw-r--r-- | usr.sbin/config/mkioconf.c | 9 |
3 files changed, 15 insertions, 4 deletions
diff --git a/usr.sbin/config/config.y b/usr.sbin/config/config.y index 221e388..cc21222 100644 --- a/usr.sbin/config/config.y +++ b/usr.sbin/config/config.y @@ -10,6 +10,7 @@ %token ARGS %token AT %token BIO +%token BUS %token COMMA %token CONFIG %token CONFLICTS @@ -572,6 +573,14 @@ Info_list: Info: CSR NUMBER = { cur.d_addr = $2; } | + BUS NUMBER + = { + if (cur.d_conn != 0 && cur.d_conn->d_type == CONTROLLER) + cur.d_slave = $2; + else + yyerror("can't specify a bus to something " + other than a controller"); + } | TARGET NUMBER = { cur.d_target = $2; } | UNIT NUMBER diff --git a/usr.sbin/config/lang.l b/usr.sbin/config/lang.l index 7d887b2..84fdf70 100644 --- a/usr.sbin/config/lang.l +++ b/usr.sbin/config/lang.l @@ -54,6 +54,7 @@ struct kt { { "at", AT }, #if MACHINE_I386 { "bio", BIO }, + { "bus", BUS }, { "conflicts", CONFLICTS }, #endif MACHINE_I386 { "config", CONFIG }, diff --git a/usr.sbin/config/mkioconf.c b/usr.sbin/config/mkioconf.c index d2b1535..d180203 100644 --- a/usr.sbin/config/mkioconf.c +++ b/usr.sbin/config/mkioconf.c @@ -818,10 +818,10 @@ scbus_devtab(fp, dev_idp) fprintf(fp, "#include \"scsi/scsiconf.h\"\n"); fprintf(fp, "\nstruct scsi_ctlr_config scsi_cinit[] = {\n"); - fprintf(fp, "/* unit driver driver unit */\n"); + fprintf(fp, "/* scbus, driver, driver unit, ctlr bus*/\n"); /* XXX: Why do we always get an entry such as: - * { '?', "ncr", '?' }, + * { '?', "ncr", '?', '?' }, */ for (dp = dtab; dp; dp = dp->d_next) { @@ -832,9 +832,10 @@ scbus_devtab(fp, dev_idp) } fprintf(fp, "{ %s, ", id(dp->d_unit)); fprintf(fp, "\"%s\", ", mp->d_name); - fprintf(fp, "%s },\n", id(mp->d_unit)); + fprintf(fp, "%s, ", id(mp->d_unit)); + fprintf(fp, "%s },\n", id(dp->d_slave)); } - fprintf(fp, "{ 0, 0, 0 }\n};\n"); + fprintf(fp, "{ 0, 0, 0, 0 }\n};\n"); fprintf(fp, "\nstruct scsi_device_config scsi_dinit[] = {\n"); fprintf(fp, "/* name unit cunit target LUN flags */\n"); |