summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/siop.c72
-rw-r--r--sys/dev/ic/siop_common.c18
-rw-r--r--sys/dev/ic/siopvar.h4
-rw-r--r--sys/dev/ic/siopvar_common.h10
-rw-r--r--sys/dev/microcode/siop/ncr53cxxx.c4
-rw-r--r--sys/dev/microcode/siop/siop.ss6
-rw-r--r--sys/dev/pci/siop_pci.c4
-rw-r--r--sys/dev/pci/siop_pci_common.c4
8 files changed, 60 insertions, 62 deletions
diff --git a/sys/dev/ic/siop.c b/sys/dev/ic/siop.c
index 55706e19319..30e8bb6d5f0 100644
--- a/sys/dev/ic/siop.c
+++ b/sys/dev/ic/siop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: siop.c,v 1.3 2001/02/20 05:18:43 krw Exp $ */
+/* $OpenBSD: siop.c,v 1.4 2001/03/01 17:14:27 krw Exp $ */
/* $NetBSD: siop.c,v 1.39 2001/02/11 18:04:49 bouyer Exp $ */
/*
@@ -71,7 +71,7 @@
/* number of cmd descriptors per block */
#define SIOP_NCMDPB (PAGE_SIZE / sizeof(struct siop_xfer))
-/* Number of scheduler slot (needs to match script) */
+/* number of scheduler slots (needs to match script) */
#define SIOP_NSLOTS 40
void siop_reset __P((struct siop_softc *));
@@ -504,8 +504,8 @@ siop_intr(v)
switch (sstat1 & SSTAT1_PHASE_MASK) {
case SSTAT1_PHASE_STATUS:
/*
- * previous phase may be aborted for any reason
- * ( for example, the target has less data to
+ * Previous phase may have aborted for any reason
+ * (for example, the target has less data to
* transfer than requested). Just go to status
* and the command should terminate.
*/
@@ -517,7 +517,7 @@ siop_intr(v)
return 1;
case SSTAT1_PHASE_MSGIN:
/*
- * target may be ready to disconnect
+ * Target may be ready to disconnect.
* Save data pointers just in case.
*/
INCSTAT(siop_stat_intr_xferdisc);
@@ -585,13 +585,13 @@ siop_intr(v)
goto reset;
if ((istat & ISTAT_DIP) && (dstat & DSTAT_SIR)) {
/*
- * we have a script interrupt, it will
+ * We have a script interrupt. It will
* restart the script.
*/
goto scintr;
}
/*
- * else we have to restart it ourselve, at the
+ * Else we have to restart the script ourself, at the
* interrupted instruction.
*/
bus_space_write_4(sc->sc_rt, sc->sc_rh, SIOP_DSP,
@@ -708,8 +708,8 @@ scintr:
int msg, extmsg;
if (siop_cmd->siop_tables.msg_out[0] & 0x80) {
/*
- * message was part of a identify +
- * something else. Identify shoudl't
+ * Message was part of an identify +
+ * something else. Identify shouldn't
* have been rejected.
*/
msg = siop_cmd->siop_tables.msg_out[1];
@@ -721,7 +721,7 @@ scintr:
siop_cmd->siop_tables.msg_out[2];
}
if (msg == MSG_MESSAGE_REJECT) {
- /* MSG_REJECT for a MSG_REJECT !*/
+ /* MSG_REJECT for a MSG_REJECT! */
if (xs)
sc_print_addr(xs->sc_link);
else
@@ -938,9 +938,9 @@ scintr:
return 1;
end:
/*
- * restart the script now if command completed properly
+ * Restart the script now if command completed properly.
* Otherwise wait for siop_scsicmd_end(), it may need to put
- * a cmd in front of the queue
+ * a cmd at the front of the queue.
*/
if (letoh32(siop_cmd->siop_tables.status) == SCSI_OK &&
TAILQ_FIRST(&sc->urgent_list) != NULL)
@@ -990,13 +990,12 @@ siop_scsicmd_end(siop_cmd)
struct siop_lun *siop_lun = siop_cmd->siop_target->siop_lun[
xs->sc_link->lun];
/*
- * device didn't queue the command. We have to
- * retry it.
- * We insert it in the urgent list, hoping to preserve order.
- * But unfortunably, commands already in the scheduler may
- * be accepted before this one.
- * Also remember the condition, to avoid starting new commands
- * for this device before one is done.
+ * Device didn't queue the command. We have to retry
+ * it. We insert it into the urgent list, hoping to
+ * preserve order. But unfortunately, commands already
+ * in the scheduler may be accepted before this one.
+ * Also remember the condition, to avoid starting new
+ * commands for this device before one is done.
*/
INCSTAT(siop_stat_intr_qfull);
#ifdef SIOP_DEBUG
@@ -1127,9 +1126,9 @@ siop_handle_qtag_reject(siop_cmd)
}
/*
- * handle a bus reset: reset chip, unqueue all active commands, free all
- * target struct and report loosage to upper layer.
- * As the upper layer may requeue immediatly we have to first store
+ * Handle a bus reset: reset chip, unqueue all active commands, free all
+ * target structs and report losage to upper layer.
+ * As the upper layer may requeue immediately we have to first store
* all active commands in a temporary queue.
*/
void
@@ -1141,8 +1140,8 @@ siop_handle_reset(sc)
struct siop_lun *siop_lun;
int target, lun, tag;
/*
- * scsi bus reset. reset the chip and restart
- * the queue. Need to clean up all active commands
+ * SCSI bus reset. Reset the chip and restart
+ * the queue. Need to clean up all active commands.
*/
printf("%s: scsi bus reset\n", sc->sc_dev.dv_xname);
/* stop, reset and restart the chip */
@@ -1424,7 +1423,7 @@ siop_start(sc)
/*
* The queue management here is a bit tricky: the script always looks
- * at the slot from first to last, so if we always use the first
+ * at the slots from first to last, so if we always use the first
* free slot commands can stay at the tail of the queue ~forever.
* The algorithm used here is to restart from the head when we know
* that the queue is empty, and only add commands after the last one.
@@ -1495,7 +1494,7 @@ again:
0x80000000)
break;
}
- /* no more free slot, no need to continue */
+ /* no more free slots, no need to continue */
if (slot == SIOP_NSLOTS) {
goto end;
}
@@ -1564,7 +1563,7 @@ again:
/* handle timeout */
if (siop_cmd->status == CMDST_ACTIVE) {
if ((siop_cmd->xs->flags & SCSI_POLL) == 0) {
- /* start exire timer */
+ /* start expire timer */
timeout = (u_int64_t) siop_cmd->xs->timeout *
(u_int64_t)hz / 1000;
if (timeout == 0)
@@ -1619,11 +1618,10 @@ siop_timeout(v)
/* deactivate callout */
timeout_del(&siop_cmd->xs->stimeout);
- /* mark command as being timed out; siop_intr will handle it */
/*
- * mark command has being timed out and just return;
- * the bus reset will generate an interrupt,
- * it will be handled in siop_intr()
+ * Mark command as being timed out and just return. The bus
+ * reset will generate an interrupt, which will be handled
+ * in siop_intr().
*/
siop_cmd->flags |= CMDFL_TIMEOUT;
splx(s);
@@ -1926,8 +1924,8 @@ siop_add_dev(sc, target, lun)
lunsw = sc->targets[target]->lunsw;
if ((lunsw->lunsw_off + lunsw->lunsw_size) < sc->script_free_lo) {
/*
- * can't extend this slot. Probably not worth trying to deal
- * with this case
+ * Can't extend this slot. Probably not worth trying to deal
+ * with this case.
*/
#ifdef DEBUG
printf("%s:%d:%d: can't allocate a lun sw slot\n",
@@ -1939,9 +1937,9 @@ siop_add_dev(sc, target, lun)
ntargets = (sc->sc_link.adapter_buswidth - 1) - 1 - sc->sc_ntargets;
/*
- * we need 8 bytes for the lun sw additionnal entry, and
+ * We need 8 bytes for the lun sw additional entry, and
* eventually sizeof(tag_switch) for the tag switch entry.
- * Keep enouth free space for the free targets that could be
+ * Keep enough free space for the free targets that could be
* probed later.
*/
if (sc->script_free_lo + 2 +
@@ -1950,11 +1948,11 @@ siop_add_dev(sc, target, lun)
sc->script_free_hi - (sizeof(tag_switch) / sizeof(tag_switch[0])) :
sc->script_free_hi)) {
/*
- * not enouth space, probably not worth dealing with it.
+ * Not enough space, but probably not worth dealing with it.
* We can hold 13 tagged-queuing capable devices in the 4k RAM.
*/
#ifdef DEBUG
- printf("%s:%d:%d: not enouth memory for a lun sw slot\n",
+ printf("%s:%d:%d: not enough memory for a lun sw slot\n",
sc->sc_dev.dv_xname, target, lun);
#endif
return;
diff --git a/sys/dev/ic/siop_common.c b/sys/dev/ic/siop_common.c
index e6d93470787..7499240fef1 100644
--- a/sys/dev/ic/siop_common.c
+++ b/sys/dev/ic/siop_common.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: siop_common.c,v 1.2 2001/02/20 00:32:29 krw Exp $ */
+/* $OpenBSD: siop_common.c,v 1.3 2001/03/01 17:14:28 krw Exp $ */
/* $NetBSD: siop_common.c,v 1.12 2001/02/11 18:04:50 bouyer Exp $ */
/*
@@ -193,11 +193,11 @@ siop_wdtr_neg(siop_cmd)
sc->targets[target]->id |= (SCNTL3_EWS << 24);
break;
}
- /* FALLTHROUH */
+ /* FALLTHROUGH */
default:
/*
- * hum, we got more than what we can handle, shoudn't
- * happen. Reject, and stay async
+ * We got more than we can handle, which shouldn't
+ * happen. Reject, and stay async.
*/
siop_target->flags &= ~TARF_ISWIDE;
siop_target->status = TARST_OK;
@@ -424,7 +424,7 @@ siop_sdp(siop_cmd)
#endif
dbc = bus_space_read_4(sc->sc_rt, sc->sc_rh, SIOP_DBC) & 0x00ffffff;
if (siop_cmd->xs->flags & SCSI_DATA_OUT) {
- /* need to account stale data in FIFO */
+ /* need to account for stale data in FIFO */
int dfifo = bus_space_read_1(sc->sc_rt, sc->sc_rh, SIOP_DFIFO);
if (sc->features & SF_CHIP_FIFO) {
dfifo |= (bus_space_read_1(sc->sc_rt, sc->sc_rh,
@@ -467,7 +467,7 @@ siop_clearfifo(sc)
int ctest3 = bus_space_read_1(sc->sc_rt, sc->sc_rh, SIOP_CTEST3);
#ifdef DEBUG_INTR
- printf("DMA fifo not empty !\n");
+ printf("DMA fifo not empty!\n");
#endif
bus_space_write_1(sc->sc_rt, sc->sc_rh, SIOP_CTEST3,
ctest3 | CTEST3_CLF);
@@ -492,9 +492,9 @@ siop_modechange(sc)
int sist0, sist1, stest2, stest4;
for (retry = 0; retry < 5; retry++) {
/*
- * datasheet says to wait 100ms and re-read SIST1,
- * to check that DIFFSENSE is srable.
- * We may delay() 5 times for 100ms at interrupt time;
+ * Datasheet says to wait 100ms and re-read SIST1,
+ * to check that DIFFSENSE is stable.
+ * We may delay() 5 times for 100ms at interrupt time;
* hopefully this will not happen often.
*/
delay(100000);
diff --git a/sys/dev/ic/siopvar.h b/sys/dev/ic/siopvar.h
index c4b99252067..e63d7a47ef0 100644
--- a/sys/dev/ic/siopvar.h
+++ b/sys/dev/ic/siopvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: siopvar.h,v 1.1 2001/02/15 04:07:58 krw Exp $ */
+/* $OpenBSD: siopvar.h,v 1.2 2001/03/01 17:14:28 krw Exp $ */
/* $NetBSD: siopvar.h,v 1.13 2000/10/23 23:18:11 bouyer Exp $ */
/*
@@ -62,7 +62,7 @@ struct siop_softc {
int sc_currschedslot; /* current scheduler slot */
struct cbd_list cmds; /* list of command block descriptors */
struct cmd_list free_list; /* cmd descr free list */
- struct cmd_list urgent_list; /* hitgh priority cmd descr list */
+ struct cmd_list urgent_list; /* high priority cmd descr list */
struct cmd_list ready_list; /* cmd descr ready list */
struct lunsw_list lunsw_list; /* lunsw free list */
u_int32_t script_free_lo; /* free ram offset from sc_scriptaddr */
diff --git a/sys/dev/ic/siopvar_common.h b/sys/dev/ic/siopvar_common.h
index d4d30c3d0a1..a8cb3e971e9 100644
--- a/sys/dev/ic/siopvar_common.h
+++ b/sys/dev/ic/siopvar_common.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: siopvar_common.h,v 1.1 2001/02/15 04:07:59 krw Exp $ */
+/* $OpenBSD: siopvar_common.h,v 1.2 2001/03/01 17:14:28 krw Exp $ */
/* $NetBSD: siopvar_common.h,v 1.10 2001/01/26 21:58:56 bouyer Exp $ */
/*
@@ -81,9 +81,9 @@ struct siop_xfer {
} __attribute__((__packed__));
/*
- * This decribes a command handled by the SCSI controller
- * These are chained in either a free list or a active list
- * We have one queue per target
+ * This describes a command handled by the SCSI controller.
+ * These are chained in either a free list or a active list.
+ * We have one queue per target.
*/
struct siop_cmd {
TAILQ_ENTRY (siop_cmd) next;
@@ -116,7 +116,7 @@ struct siop_cbd {
#define CMDST_FREE 0 /* cmd slot is free */
#define CMDST_READY 1 /* cmd slot is waiting for processing */
#define CMDST_ACTIVE 2 /* cmd slot is being processed */
-#define CMDST_SENSE 3 /* cmd slot is being requesting sense */
+#define CMDST_SENSE 3 /* cmd slot is requesting sense */
#define CMDST_SENSE_ACTIVE 4 /* request sense active */
#define CMDST_SENSE_DONE 5 /* request sense done */
#define CMDST_DONE 6 /* cmd slot has been processed */
diff --git a/sys/dev/microcode/siop/ncr53cxxx.c b/sys/dev/microcode/siop/ncr53cxxx.c
index b736a00cd44..3ed99e86c75 100644
--- a/sys/dev/microcode/siop/ncr53cxxx.c
+++ b/sys/dev/microcode/siop/ncr53cxxx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ncr53cxxx.c,v 1.1 2001/02/15 04:07:59 krw Exp $ */
+/* $OpenBSD: ncr53cxxx.c,v 1.2 2001/03/01 17:14:27 krw Exp $ */
/* $NetBSD: ncr53cxxx.c,v 1.5 2000/10/23 14:51:51 bouyer Exp $ */
/*
@@ -1305,7 +1305,7 @@ fprintf (listfp, "Move data to register: %02x %d\n", data, reg);
!reserved("carry", tokenix+6)) {
errout("Expected 'WITH CARRY'");
} else if (op != 6) {
- errout("'WITH CARRY' only valide with '+'");
+ errout("'WITH CARRY' only valid with '+'");
}
op = 7;
}
diff --git a/sys/dev/microcode/siop/siop.ss b/sys/dev/microcode/siop/siop.ss
index d272e73f7fa..acf214e893f 100644
--- a/sys/dev/microcode/siop/siop.ss
+++ b/sys/dev/microcode/siop/siop.ss
@@ -1,4 +1,4 @@
-; $OpenBSD: siop.ss,v 1.1 2001/02/15 04:07:59 krw Exp $
+; $OpenBSD: siop.ss,v 1.2 2001/03/01 17:14:27 krw Exp $
; $NetBSD: siop.ss,v 1.12 2000/10/23 14:53:53 bouyer Exp $
;
@@ -147,7 +147,7 @@ script_sched:
; changes the FALSE to TRUE. The select script will change it back to false
; once the target is selected.
; The RAM could hold 370 slot entry, we limit it to 40. Should be more than
-; enouth.
+; enough.
script_sched_slot0:
JUMP abs_script_sched_slot0, IF FALSE;
JUMP abs_script_sched_slot0, IF FALSE;
@@ -201,7 +201,7 @@ reselect:
WAIT RESELECT REL(reselect_fail)
MOVE SSID & 0x8f to SFBR
MOVE SFBR to SCRATCHA0 ; save reselect ID
-; find the rigth param for this target
+; find the right param for this target
resel_targ0:
JUMP abs_targ0, IF 0xff;
JUMP abs_targ0, IF 0xff;
diff --git a/sys/dev/pci/siop_pci.c b/sys/dev/pci/siop_pci.c
index c57749cb05a..f43b6b0aa8d 100644
--- a/sys/dev/pci/siop_pci.c
+++ b/sys/dev/pci/siop_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: siop_pci.c,v 1.1 2001/02/15 04:07:58 krw Exp $ */
+/* $OpenBSD: siop_pci.c,v 1.2 2001/03/01 17:14:28 krw Exp $ */
/* $NetBSD: siop_pci.c,v 1.8 2000/05/15 07:53:17 bouyer Exp $ */
/*
@@ -62,7 +62,7 @@ siop_pci_match(parent, match, aux)
struct pci_attach_args *pa = aux;
const struct siop_product_desc *pp;
- /* look if it's a known product */
+ /* see if it's a known product */
pp = siop_lookup_product(pa->pa_id, PCI_REVISION(pa->pa_class));
if (pp)
return 1;
diff --git a/sys/dev/pci/siop_pci_common.c b/sys/dev/pci/siop_pci_common.c
index 17c0dd9fd30..2a6ffec49bc 100644
--- a/sys/dev/pci/siop_pci_common.c
+++ b/sys/dev/pci/siop_pci_common.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: siop_pci_common.c,v 1.2 2001/02/20 00:32:30 krw Exp $ */
+/* $OpenBSD: siop_pci_common.c,v 1.3 2001/03/01 17:14:28 krw Exp $ */
/* $NetBSD: siop_pci_common.c,v 1.6 2001/01/10 15:50:20 thorpej Exp $ */
/*
@@ -199,7 +199,7 @@ siop_pci_attach_common(sc, pa)
sc->sc_pp = siop_lookup_product(pa->pa_id, PCI_REVISION(pa->pa_class));
if (sc->sc_pp == NULL) {
- printf("sym: broken match/attach!!\n");
+ printf("siop: broken match/attach!\n");
return 0;
}
/* copy interesting infos about the chip */