summaryrefslogtreecommitdiffstats
path: root/sys/dev/ppbus/immio.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2008-11-16 17:42:02 +0000
committerjhb <jhb@FreeBSD.org>2008-11-16 17:42:02 +0000
commit51d2cc2053b7f7f5b8d7d908edfbe54ce19e0e2a (patch)
treeb65bdf61a799cb56906bea0847235a1bd148de23 /sys/dev/ppbus/immio.c
parentf5d16a4d6617f527e4a33953e48f82272ee8d572 (diff)
downloadFreeBSD-src-51d2cc2053b7f7f5b8d7d908edfbe54ce19e0e2a.zip
FreeBSD-src-51d2cc2053b7f7f5b8d7d908edfbe54ce19e0e2a.tar.gz
Various whitespace and style fixes.
Diffstat (limited to 'sys/dev/ppbus/immio.c')
-rw-r--r--sys/dev/ppbus/immio.c41
1 files changed, 23 insertions, 18 deletions
diff --git a/sys/dev/ppbus/immio.c b/sys/dev/ppbus/immio.c
index 3a0e1e5..bd0c0c9 100644
--- a/sys/dev/ppbus/immio.c
+++ b/sys/dev/ppbus/immio.c
@@ -250,10 +250,10 @@ static struct ppb_microseq spp_outbyte_submicroseq[] = {
MS_CASS(0x4),
/* loop: */
- MS_RASSERT_P(1, MS_REG_DTR),
+ MS_RASSERT_P(1, MS_REG_DTR),
MS_CASS(0x5),
MS_DBRA(0), /* decrement counter */
- MS_RASSERT_P(1, MS_REG_DTR),
+ MS_RASSERT_P(1, MS_REG_DTR),
MS_CASS(0x0),
MS_DBRA(-6 /* loop */),
@@ -265,14 +265,14 @@ static struct ppb_microseq spp_outbyte_submicroseq[] = {
/* EPP 1.7 microsequences, ptr and len set at runtime */
static struct ppb_microseq epp17_outstr[] = {
MS_CASS(0x4),
- MS_RASSERT_P(MS_ACCUM, MS_REG_EPP_D),
+ MS_RASSERT_P(MS_ACCUM, MS_REG_EPP_D),
MS_CASS(0xc),
MS_RET(0),
};
static struct ppb_microseq epp17_instr[] = {
MS_CASS(PCD | 0x4),
- MS_RFETCH_P(MS_ACCUM, MS_REG_EPP_D, MS_FETCH_ALL),
+ MS_RFETCH_P(MS_ACCUM, MS_REG_EPP_D, MS_FETCH_ALL),
MS_CASS(PCD | 0xc),
MS_RET(0),
};
@@ -416,7 +416,7 @@ imm_detect(struct vpoio_data *vpo)
/* release the bus now */
imm_disconnect(vpo, &error, 1);
- /* ensure we are disconnected or daisy chained peripheral
+ /* ensure we are disconnected or daisy chained peripheral
* may cause serious problem to the disk */
if (error) {
@@ -479,7 +479,7 @@ imm_select(struct vpoio_data *vpo, int initiator, int target)
/* initialize the select microsequence */
ppb_MS_init_msq(select_microseq, 1,
SELECT_TARGET, 1 << initiator | 1 << target);
-
+
ppb_MS_microseq(ppbus, vpo->vpo_dev, select_microseq, &ret);
return (ret);
@@ -514,7 +514,7 @@ imm_wait(struct vpoio_data *vpo, int tmo)
ppb_MS_microseq(ppbus, vpo->vpo_dev, wait_microseq, &err);
if (err)
- return (0); /* command timed out */
+ return (0); /* command timed out */
return(ret);
}
@@ -540,7 +540,7 @@ imm_negociate(struct vpoio_data *vpo)
if (ret)
return (VP0_ENEGOCIATE);
#endif
-
+
ppb_MS_init_msq(negociate_microseq, 1,
NEGOCIATED_MODE, negociate_mode);
@@ -580,7 +580,7 @@ imm_probe(device_t dev, struct vpoio_data *vpo)
int
imm_attach(struct vpoio_data *vpo)
{
- DECLARE_NIBBLE_INBYTE_SUBMICROSEQ;
+ DECLARE_NIBBLE_INBYTE_SUBMICROSEQ;
device_t ppbus = device_get_parent(vpo->vpo_dev);
int error = 0;
@@ -601,7 +601,7 @@ imm_attach(struct vpoio_data *vpo)
INB_NIBBLE_H, (void *)&(vpo)->vpo_nibble.h,
INB_NIBBLE_L, (void *)&(vpo)->vpo_nibble.l,
INB_NIBBLE_F, nibble_inbyte_hook,
- INB_NIBBLE_P, (void *)&(vpo)->vpo_nibble);
+ INB_NIBBLE_P, (void *)&(vpo)->vpo_nibble);
/*
* Initialize mode dependent in/out microsequences
@@ -666,7 +666,7 @@ imm_reset_bus(struct vpoio_data *vpo)
* Send an SCSI command
*
*/
-int
+int
imm_do_scsi(struct vpoio_data *vpo, int host, int target, char *command,
int clen, char *buffer, int blen, int *result, int *count,
int *ret)
@@ -690,7 +690,8 @@ imm_do_scsi(struct vpoio_data *vpo, int host, int target, char *command,
return (error);
if (not_connected) {
- *ret = VP0_ECONNECT; goto error;
+ *ret = VP0_ECONNECT;
+ goto error;
}
/*
@@ -714,7 +715,8 @@ imm_do_scsi(struct vpoio_data *vpo, int host, int target, char *command,
}
if (!(r = imm_wait(vpo, VP0_LOW_SPINTMO))) {
- *ret = VP0_ESTATUS_TIMEOUT; goto error;
+ *ret = VP0_ESTATUS_TIMEOUT;
+ goto error;
}
if ((r & 0x30) == 0x10) {
@@ -725,14 +727,15 @@ imm_do_scsi(struct vpoio_data *vpo, int host, int target, char *command,
negociated = 1;
}
- /*
- * Complete transfer ...
+ /*
+ * Complete transfer ...
*/
*count = 0;
for (;;) {
if (!(r = imm_wait(vpo, VP0_LOW_SPINTMO))) {
- *ret = VP0_ESTATUS_TIMEOUT; goto error;
+ *ret = VP0_ESTATUS_TIMEOUT;
+ goto error;
}
/* stop when the ZIP+ wants to send status */
@@ -782,13 +785,15 @@ imm_do_scsi(struct vpoio_data *vpo, int host, int target, char *command,
negociated = 1;
if (imm_instr(vpo, &l, 1)) {
- *ret = VP0_EOTHER; goto error;
+ *ret = VP0_EOTHER;
+ goto error;
}
/* check if the ZIP+ wants to send more status */
if (imm_wait(vpo, VP0_FAST_SPINTMO) == (char)0xb8)
if (imm_instr(vpo, &h, 1)) {
- *ret = VP0_EOTHER+2; goto error;
+ *ret = VP0_EOTHER + 2;
+ goto error;
}
/* Experience showed that we should discard this */
OpenPOWER on IntegriCloud