summaryrefslogtreecommitdiffstats
path: root/sys/pci
diff options
context:
space:
mode:
authorgibbs <gibbs@FreeBSD.org>1996-03-10 07:12:49 +0000
committergibbs <gibbs@FreeBSD.org>1996-03-10 07:12:49 +0000
commit61af932716ba3442f37fe2ea464a4739ac1275f4 (patch)
treede8a60afc508b83f332f18028a189ce8a2c85b22 /sys/pci
parenta3de4cbeec5219ad2fc0f9da2678c4c875b51ea5 (diff)
downloadFreeBSD-src-61af932716ba3442f37fe2ea464a4739ac1275f4.zip
FreeBSD-src-61af932716ba3442f37fe2ea464a4739ac1275f4.tar.gz
aic7870.c, ncr.c:
Cleanse the SCSI subsystem of its internally defined types u_int32, u_int16, u_int8, int32, int16, int8. Use the system defined *_t types instead. aic7870.c: Handle Seeprom data a little better.
Diffstat (limited to 'sys/pci')
-rw-r--r--sys/pci/aic7870.c19
-rw-r--r--sys/pci/ncr.c16
2 files changed, 15 insertions, 20 deletions
diff --git a/sys/pci/aic7870.c b/sys/pci/aic7870.c
index fc187fe..f464903 100644
--- a/sys/pci/aic7870.c
+++ b/sys/pci/aic7870.c
@@ -19,7 +19,7 @@
* 4. Modifications may be freely made to this file if the above conditions
* are met.
*
- * $Id: aic7870.c,v 1.24 1996/01/23 21:46:54 se Exp $
+ * $Id: aic7870.c,v 1.25 1996/01/29 03:18:20 gibbs Exp $
*/
#include <pci.h>
@@ -434,7 +434,7 @@ load_seeprom(ahc)
u_short *scarray = (u_short *)&sc;
u_short checksum = 0;
u_long iobase = ahc->baseport;
- u_char host_id;
+ u_char scsi_conf;
int have_seeprom, retval;
if(bootverbose)
@@ -459,11 +459,8 @@ load_seeprom(ahc)
printf ("checksum error");
have_seeprom = 0;
}
- else {
- if(bootverbose)
+ else if(bootverbose)
printf("done.\n");
- host_id = (sc.brtime_id & CFSCSIID);
- }
}
}
if (!have_seeprom) {
@@ -471,7 +468,7 @@ load_seeprom(ahc)
"using leftover BIOS values\n", ahc->unit);
retval = 0;
- host_id = 0x7; /* Assume a default */
+ scsi_conf = /*host_id*/0x7 | ENSPCHK; /* Assume a default */
/*
* If we happen to be an ULTRA card,
* default to non-ultra mode.
@@ -500,7 +497,9 @@ load_seeprom(ahc)
outb(DISC_DSB + iobase, ~(ahc->discenable & 0xff));
outb(DISC_DSB + iobase + 1, ~((ahc->discenable >> 8) & 0xff));
- host_id = sc.brtime_id & CFSCSIID;
+ scsi_conf = sc.brtime_id & CFSCSIID;
+ if(sc.adapter_control & CFSPARITY)
+ scsi_conf |= ENSPCHK;
if(ahc->type & AHC_ULTRA) {
/* Should we enable Ultra mode? */
@@ -511,9 +510,9 @@ load_seeprom(ahc)
retval = 1;
}
/* Set the host ID */
- outb(SCSICONF + iobase, host_id);
+ outb(SCSICONF + iobase, scsi_conf);
/* In case we are a wide card */
- outb(SCSICONF + 1 + iobase, host_id);
+ outb(SCSICONF + 1 + iobase, scsi_conf);
return(retval);
}
diff --git a/sys/pci/ncr.c b/sys/pci/ncr.c
index e308f57..ee41ac4 100644
--- a/sys/pci/ncr.c
+++ b/sys/pci/ncr.c
@@ -1,6 +1,6 @@
/**************************************************************************
**
-** $Id: ncr.c,v 1.63 1996/02/18 23:15:19 se Exp $
+** $Id: ncr.c,v 1.64 1996/02/19 00:03:50 se Exp $
**
** Device driver for the NCR 53C810 PCI-SCSI-Controller.
**
@@ -402,12 +402,8 @@
*/
#ifdef __NetBSD__
- #define INT32 int
- #define U_INT32 u_int
#define TIMEOUT (void*)
#else /*__NetBSD__*/
- #define INT32 int32
- #define U_INT32 u_int32
#define TIMEOUT (timeout_func_t)
#endif /*__NetBSD__*/
#define PRINT_ADDR(xp) sc_print_addr(xp->sc_link)
@@ -1200,7 +1196,7 @@ static void ncr_exception (ncb_p np);
static void ncr_free_ccb (ncb_p np, ccb_p cp, int flags);
static void ncr_getclock (ncb_p np);
static ccb_p ncr_get_ccb (ncb_p np, u_long flags, u_long t,u_long l);
-static U_INT32 ncr_info (int unit);
+static u_int32_t ncr_info (int unit);
static void ncr_init (ncb_p np, char * msg, u_long code);
static void ncr_intr (void *vnp);
static void ncr_int_ma (ncb_p np);
@@ -1223,7 +1219,7 @@ static void ncr_settags (tcb_p tp, lcb_p lp);
static void ncr_setwide (ncb_p np, ccb_p cp, u_char wide);
static int ncr_show_msg (u_char * msg);
static int ncr_snooptest (ncb_p np);
-static INT32 ncr_start (struct scsi_xfer *xp);
+static int32_t ncr_start (struct scsi_xfer *xp);
static void ncr_timeout (ncb_p np);
static void ncr_usercmd (ncb_p np);
static void ncr_wakeup (ncb_p np, u_long code);
@@ -1249,7 +1245,7 @@ static void ncr_attach (pcici_t tag, int unit);
static char ident[] =
- "\n$Id: ncr.c,v 1.63 1996/02/18 23:15:19 se Exp $\n";
+ "\n$Id: ncr.c,v 1.64 1996/02/19 00:03:50 se Exp $\n";
static u_long ncr_version = NCR_VERSION * 11
+ (u_long) sizeof (struct ncb) * 7
@@ -3130,7 +3126,7 @@ void ncr_min_phys (struct buf *bp)
**----------------------------------------------------------
*/
-U_INT32 ncr_info (int unit)
+u_int32_t ncr_info (int unit)
{
return (1); /* may be changed later */
}
@@ -3537,7 +3533,7 @@ ncr_intr(vnp)
**==========================================================
*/
-static INT32 ncr_start (struct scsi_xfer * xp)
+static int32_t ncr_start (struct scsi_xfer * xp)
{
ncb_p np = (ncb_p) xp->sc_link->adapter_softc;
OpenPOWER on IntegriCloud