diff options
author | gibbs <gibbs@FreeBSD.org> | 1995-08-23 23:03:34 +0000 |
---|---|---|
committer | gibbs <gibbs@FreeBSD.org> | 1995-08-23 23:03:34 +0000 |
commit | ae1e6673d90921816b6cdd6c732b2c8d0f5afcfa (patch) | |
tree | 261944881099a051f944dac2c7d547a51654fee4 /sys/i386/isa/aic6360.c | |
parent | 11e9122e645e253373e8b159fc45d1a53fc1ac4d (diff) | |
download | FreeBSD-src-ae1e6673d90921816b6cdd6c732b2c8d0f5afcfa.zip FreeBSD-src-ae1e6673d90921816b6cdd6c732b2c8d0f5afcfa.tar.gz |
Remove hard coded assumption that SCSI busses have 7 targets.
This change forces the controller drivers to allocate a scsibus_data struct
via a call to scsi_alloc_bus(), fill in the adapter_link field, and optionally
modify any other fields of the struct. Scsi_alloc_bus() initializes all fields
to the default, so the changes in most drivers are very minimal. For drivers
that support Wide controllers, the maxtarg field will have to be updated to
allow probing of all targets (for an example, look at the aic7xxx driver).
Scsi_attachdevs() now takes a scsibus_data* as its argument instead of an
sc_link*. This allows us to expand the role of the scsibus_data struct for
other bus level configuration setings (max number of transactions, current
transaction opennings, etc for better tagged queuing support).
Reviewed by: Rodney Grimes <rgrimes>, Peter Dufault <dufault>, Julian Elischer <julian>
Diffstat (limited to 'sys/i386/isa/aic6360.c')
-rw-r--r-- | sys/i386/isa/aic6360.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sys/i386/isa/aic6360.c b/sys/i386/isa/aic6360.c index 2e8912c..db5ea86 100644 --- a/sys/i386/isa/aic6360.c +++ b/sys/i386/isa/aic6360.c @@ -31,7 +31,7 @@ */ /* - * $Id: aic6360.c,v 1.8 1995/04/12 20:47:35 wollman Exp $ + * $Id: aic6360.c,v 1.9 1995/05/30 08:01:12 rgrimes Exp $ * * Acknowledgements: Many of the algorithms used in this driver are * inspired by the work of Julian Elischer (julian@tfs.com) and @@ -940,6 +940,7 @@ aicattach(parent, self, aux) #ifdef __FreeBSD__ int unit = dev->id_unit; struct aic_data *aic = aicdata[unit]; + struct scsibus_data *scbus; #else struct isa_attach_args *ia = aux; struct aic_softc *aic = (void *)self; @@ -964,10 +965,19 @@ aicattach(parent, self, aux) #ifdef __FreeBSD__ /* + * Prepare the scsibus_data area for the upperlevel + * scsi code. + */ + scbus = scsi_alloc_bus(); + if(!scbus) + return 0; + scbus->adapter_link = &aic->sc_link; + + /* * ask the adapter what subunits are present */ kdc_aic[unit].kdc_state = DC_BUSY; /* host adapters are always busy */ - scsi_attachdevs(&(aic->sc_link)); + scsi_attachdevs(scbus); return 1; #else |