summaryrefslogtreecommitdiffstats
path: root/sys/i386/eisa
diff options
context:
space:
mode:
authorgibbs <gibbs@FreeBSD.org>1998-10-09 17:42:28 +0000
committergibbs <gibbs@FreeBSD.org>1998-10-09 17:42:28 +0000
commitb9c44f55137fecbbad921b314afe7b67556bd3c0 (patch)
tree1d850a9e9030be712f2bf5fd1252ccc80c3fedee /sys/i386/eisa
parent6263e2fb9ef868db2b3c1d0a9290275f88448eba (diff)
downloadFreeBSD-src-b9c44f55137fecbbad921b314afe7b67556bd3c0.zip
FreeBSD-src-b9c44f55137fecbbad921b314afe7b67556bd3c0.tar.gz
Pass termination information via softc flags to the core driver. The
EISA probe missed out on this change in attach->core API.
Diffstat (limited to 'sys/i386/eisa')
-rw-r--r--sys/i386/eisa/ahc_eisa.c32
1 files changed, 19 insertions, 13 deletions
diff --git a/sys/i386/eisa/ahc_eisa.c b/sys/i386/eisa/ahc_eisa.c
index 1d4f5c7..e298bc2 100644
--- a/sys/i386/eisa/ahc_eisa.c
+++ b/sys/i386/eisa/ahc_eisa.c
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: aic7770.c,v 1.40 1997/07/20 06:31:08 bde Exp $
+ * $Id: ahc_eisa.c,v 1.1 1998/09/15 07:24:58 gibbs Exp $
*/
#include "eisa.h"
@@ -249,7 +249,13 @@ aic7770_attach(struct eisa_device *e_dev)
switch (chip & (AHC_EISA|AHC_VL)) {
case AHC_EISA:
{
- u_int8_t biosctrl = ahc_inb(ahc, HA_274_BIOSCTRL);
+ u_int biosctrl;
+ u_int scsiconf;
+ u_int scsiconf1;
+
+ biosctrl = ahc_inb(ahc, HA_274_BIOSCTRL);
+ scsiconf = ahc_inb(ahc, SCSICONF);
+ scsiconf1 = ahc_inb(ahc, SCSICONF + 1);
#if 0
for (i = TARG_SCSIRATE; i <= HA_274_BIOSCTRL; i+=8) {
@@ -273,10 +279,16 @@ aic7770_attach(struct eisa_device *e_dev)
ahc->flags |= AHC_USEDEFAULTS;
} else {
if ((ahc->features & AHC_WIDE) != 0) {
- ahc->our_id = ahc_inb(ahc, SCSICONF + 1) & HWSCSIID;
+ ahc->our_id = scsiconf1 & HWSCSIID;
+ if (scsiconf & TERM_ENB)
+ ahc->flags |= AHC_TERM_ENB_A;
} else {
- ahc->our_id = ahc_inb(ahc, SCSICONF) & HSCSIID;
- ahc->our_id_b = ahc_inb(ahc, SCSICONF) & HSCSIID;
+ ahc->our_id = scsiconf & HSCSIID;
+ ahc->our_id_b = scsiconf1 & HSCSIID;
+ if (scsiconf & TERM_ENB)
+ ahc->flags |= AHC_TERM_ENB_A;
+ if (scsiconf1 & TERM_ENB)
+ ahc->flags |= AHC_TERM_ENB_B;
}
}
break;
@@ -367,7 +379,6 @@ aha2840_load_seeprom(struct ahc_softc *ahc)
struct seeprom_config sc;
u_int16_t checksum = 0;
u_int8_t scsi_conf;
- u_int8_t sxfrctl1;
int have_seeprom;
sd.sd_tag = ahc->tag;
@@ -446,13 +457,8 @@ aha2840_load_seeprom(struct ahc_softc *ahc)
/* Set SCSICONF info */
ahc_outb(ahc, SCSICONF, scsi_conf);
- sxfrctl1 = ahc_inb(ahc, SXFRCTL1);
- if (sc.adapter_control & CF284XSTERM) {
- sxfrctl1 |= STPWEN;
- } else {
- sxfrctl1 &= ~STPWEN;
- }
- ahc_outb(ahc, SXFRCTL1, sxfrctl1);
+ if (sc.adapter_control & CF284XSTERM)
+ ahc->flags |= AHC_TERM_ENB_A;
}
}
OpenPOWER on IntegriCloud