diff options
author | Thierry Deval <tdeval@cvs.openbsd.org> | 2002-12-13 22:54:30 +0000 |
---|---|---|
committer | Thierry Deval <tdeval@cvs.openbsd.org> | 2002-12-13 22:54:30 +0000 |
commit | 701646b2be2242f3f50f0f397f7745cf98729b88 (patch) | |
tree | 665cfc346cf5dce6966aeb4466cc2d24702293af /sys | |
parent | 9fce7d6ecd3d80eac29b3c86e42dd962feffa21a (diff) |
Some more cleaning...
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ieee1394/fwohci.c | 14 | ||||
-rw-r--r-- | sys/dev/ieee1394/fwscsi.c | 21 |
2 files changed, 11 insertions, 24 deletions
diff --git a/sys/dev/ieee1394/fwohci.c b/sys/dev/ieee1394/fwohci.c index 1606006f32c..520d3183974 100644 --- a/sys/dev/ieee1394/fwohci.c +++ b/sys/dev/ieee1394/fwohci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fwohci.c,v 1.7 2002/12/13 22:40:16 tdeval Exp $ */ +/* $OpenBSD: fwohci.c,v 1.8 2002/12/13 22:54:29 tdeval Exp $ */ /* $NetBSD: fwohci.c,v 1.54 2002/03/29 05:06:42 jmc Exp $ */ /* @@ -2088,6 +2088,9 @@ fwohci_handler_set(struct fwohci_softc *sc, int tcode, u_int32_t key1, sc->sc_ctx_ir[fc->fc_ctx] = NULL; fwohci_ctx_free(sc, fc); } + DPRINTFN(1, ("%s: ctx %d, tcode %x, key 0x%x, 0x%x [NULL]\n", + __func__, fc->fc_ctx, tcode, key1, key2)); + return 0; } s = splbio(); @@ -2107,8 +2110,8 @@ fwohci_handler_set(struct fwohci_softc *sc, int tcode, u_int32_t key1, LIST_INSERT_HEAD(&fc->fc_handler, fh, fh_list); splx(s); - DPRINTFN(1, ("%s: ctx %d, tcode %x, key 0x%x, 0x%x\n", __func__, - fc->fc_ctx, tcode, key1, key2)); + DPRINTFN(1, ("%s: ctx %d, tcode %x, key 0x%x, 0x%x [%08x]\n", + __func__, fc->fc_ctx, tcode, key1, key2, (u_int32_t)handler)); if (tcode == IEEE1394_TCODE_ISOCHRONOUS_DATABLOCK) { s = splbio(); @@ -4201,11 +4204,6 @@ fwohci_inreg(struct ieee1394_abuf *ab, int allow) high = ((ab->ab_addr & 0x0000ffff00000000) >> 32); lo = (ab->ab_addr & 0x00000000ffffffff); -#ifdef FWOHCI_DEBUG - if (ab->ab_retlen) - DPRINTF(("%s: retlen=%d\n", __func__, ab->ab_retlen)); -#endif /* FWOHCI_DEBUG */ - rv = 0; switch (ab->ab_tcode) { case IEEE1394_TCODE_READ_REQUEST_QUADLET: diff --git a/sys/dev/ieee1394/fwscsi.c b/sys/dev/ieee1394/fwscsi.c index 3336d5f2d48..f939c8eca15 100644 --- a/sys/dev/ieee1394/fwscsi.c +++ b/sys/dev/ieee1394/fwscsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fwscsi.c,v 1.4 2002/12/13 22:45:37 tdeval Exp $ */ +/* $OpenBSD: fwscsi.c,v 1.5 2002/12/13 22:54:29 tdeval Exp $ */ /* * Copyright (c) 2002 Thierry Deval. All rights reserved. @@ -708,7 +708,7 @@ fwscsi_scsi_cmd(struct scsi_xfer *xs) } bzero(data_ab, sizeof(*data_ab)); - data_ab->ab_req = (struct ieee1394_softc *)sc->sc_fwnode; + data_ab->ab_req = (struct ieee1394_softc *)fwsc; data_ab->ab_retlen = 0; datalen = roundup(xs->datalen, 4); data_ab->ab_length = datalen & 0xffff; @@ -754,7 +754,7 @@ fwscsi_scsi_cmd(struct scsi_xfer *xs) } DPRINTFN(2, ("\n")); #endif /* FWSCSI_DEBUG */ - sc->sc_fwnode->sc1394_inreg(data_ab, TRUE); + fwsc->sc1394_inreg(data_ab, TRUE); data_elm->data_ab = data_ab; cmd_orb->data_descriptor.node_id = htons(host_id); @@ -781,11 +781,11 @@ fwscsi_scsi_cmd(struct scsi_xfer *xs) #endif /* NO_THREAD */ #if 0 /* NO_THREAD */ - sbp2_command_add(sc->sc_fwnode, sc->sc_lun, cmd_orb, 8, xs->data, + sbp2_command_add(fwsc, sc->sc_lun, cmd_orb, 8, xs->data, fwscsi_status_notify); #else /* NO_THREAD */ timeout_add(&xs->stimeout, (xs->timeout * hz) / 1000); - sbp2_command_add(sc->sc_fwnode, sc->sc_lun, cmd_orb, 8, xs->data, + sbp2_command_add(fwsc, sc->sc_lun, cmd_orb, 8, xs->data, fwscsi_command_wait, (void *)xs); #endif /* NO_THREAD */ @@ -1125,16 +1125,6 @@ fwscsi_command_data(struct ieee1394_abuf *ab, int rcode) } DPRINTF(("\n")); -#if 0 - if (xs->resid > datalen) { - xs->resid -= datalen; - DPRINTFN(1, ("%s: Wait more", __func__)); - } else { - if (xs->resid != datalen) - xs->resid = xs->datalen = data_elm->data_len; - DPRINTFN(1, ("%s: Data block complete", __func__)); - } -#else if (xs->resid <= datalen) { xs->resid = 0; DPRINTFN(1, ("%s: Data block complete", __func__)); @@ -1142,7 +1132,6 @@ fwscsi_command_data(struct ieee1394_abuf *ab, int rcode) xs->resid -= datalen; DPRINTFN(1, ("%s: Wait more", __func__)); } -#endif DPRINTFN(1, (" -- resid = %d\n", xs->resid)); } #endif |