summaryrefslogtreecommitdiffstats
path: root/sys/scsi/scsiconf.c
diff options
context:
space:
mode:
authorgibbs <gibbs@FreeBSD.org>1995-07-17 23:38:16 +0000
committergibbs <gibbs@FreeBSD.org>1995-07-17 23:38:16 +0000
commit5fa4b742aea5aa85a02d5669d70b27bd476ff05d (patch)
treee6aac2b0d579342bd4f87e50bae9270464edff6e /sys/scsi/scsiconf.c
parentb104528a4f81d68fcc596e81db6cf2c2888512a5 (diff)
downloadFreeBSD-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 'sys/scsi/scsiconf.c')
-rw-r--r--sys/scsi/scsiconf.c44
1 files changed, 32 insertions, 12 deletions
diff --git a/sys/scsi/scsiconf.c b/sys/scsi/scsiconf.c
index b5d670b..93e77bd 100644
--- a/sys/scsi/scsiconf.c
+++ b/sys/scsi/scsiconf.c
@@ -16,7 +16,7 @@
*
* New configuration setup: dufault@hda.com
*
- * $Id: scsiconf.c,v 1.30 1995/05/30 08:13:45 rgrimes Exp $
+ * $Id: scsiconf.c,v 1.31 1995/06/14 12:28:32 amurai Exp $
*/
#include <sys/types.h>
@@ -475,9 +475,9 @@ scsi_init(void)
* specified in config:
*/
for (i = 0; scsi_cinit[i].driver; i++)
- if (IS_SPECIFIED(scsi_cinit[i].unit) &&
- free_bus <= scsi_cinit[i].unit)
- free_bus = scsi_cinit[i].unit + 1;
+ if (IS_SPECIFIED(scsi_cinit[i].scbus) &&
+ free_bus <= scsi_cinit[i].scbus)
+ free_bus = scsi_cinit[i].scbus + 1;
/* Lowest free unit for each type for auto-configure is one
* more than the first one not specified in the config file:
@@ -516,22 +516,42 @@ scsi_bus_conf(sc_link_proto)
bus = SCCONF_UNSPEC;
for (i = 0; scsi_cinit[i].driver; i++) {
- if (IS_SPECIFIED(scsi_cinit[i].unit))
+ if (IS_SPECIFIED(scsi_cinit[i].scbus))
{
- if (!strcmp(sc_link_proto->adapter->name, scsi_cinit[i].driver) &&
- (sc_link_proto->adapter_unit == scsi_cinit[i].unit) )
+ if (!strcmp(sc_link_proto->adapter->name, scsi_cinit[i].driver)
+ &&(sc_link_proto->adapter_unit == scsi_cinit[i].unit))
{
- bus = scsi_cinit[i].bus;
- if (bootverbose)
- printf("Choosing drivers for scbus configured at %d\n",
- bus);
- break;
+ if (IS_SPECIFIED(scsi_cinit[i].bus)) {
+ if (sc_link_proto->adapter_bus==scsi_cinit[i].bus){
+ bus = scsi_cinit[i].scbus;
+ break;
+ }
+ }
+ else if (sc_link_proto->adapter_bus == 0) {
+ /* Backwards compatibility for single bus cards */
+ bus = scsi_cinit[i].scbus;
+ break;
+ }
+ else {
+ printf("Ambiguous scbus configuration for %s%d "
+ "bus %d, cannot wire down. The kernel "
+ "config entry for scbus%d should specify "
+ "a controller bus.\n"
+ "Scbus will be assigned dynamically.\n",
+ sc_link_proto->adapter->name,
+ sc_link_proto->adapter_unit,
+ sc_link_proto->adapter_bus);
+ break;
+ }
}
}
}
+
if (bus == SCCONF_UNSPEC)
bus = free_bus++;
+ else if (bootverbose)
+ printf("Choosing drivers for scbus configured at %d\n", bus);
return bus;
}
OpenPOWER on IntegriCloud