diff options
-rw-r--r-- | sys/dev/ic/aic7xxx.c | 8 | ||||
-rw-r--r-- | sys/dev/ic/aic7xxx_openbsd.c | 13 |
2 files changed, 8 insertions, 13 deletions
diff --git a/sys/dev/ic/aic7xxx.c b/sys/dev/ic/aic7xxx.c index f0d78356682..29c979c0634 100644 --- a/sys/dev/ic/aic7xxx.c +++ b/sys/dev/ic/aic7xxx.c @@ -28,10 +28,10 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: aic7xxx.c,v 1.44 2003/01/05 22:41:35 deraadt Exp $ + * $Id: aic7xxx.c,v 1.45 2003/03/21 14:58:06 drahn Exp $ * * $FreeBSD: src/sys/dev/aic7xxx/aic7xxx.c,v 1.80 2001/12/16 17:38:30 gibbs Exp $ - * $OpenBSD: aic7xxx.c,v 1.44 2003/01/05 22:41:35 deraadt Exp $ + * $OpenBSD: aic7xxx.c,v 1.45 2003/03/21 14:58:06 drahn Exp $ */ #ifdef __OpenBSD__ @@ -558,8 +558,8 @@ ahc_handle_seqint(struct ahc_softc *ahc, u_int intstat) scb->flags |= SCB_AUTO_NEGOTIATE; } hscb->cdb_len = sizeof(*sc); - hscb->dataptr = ahc_htole32(sg->addr); - hscb->datacnt = ahc_htole32(sg->len); + hscb->dataptr = sg->addr; + hscb->datacnt = sg->len; hscb->sgptr = scb->sg_list_phys | SG_FULL_RESID; hscb->sgptr = ahc_htole32(hscb->sgptr); scb->sg_count = 1; diff --git a/sys/dev/ic/aic7xxx_openbsd.c b/sys/dev/ic/aic7xxx_openbsd.c index 77fa6f166a0..5afa40c1721 100644 --- a/sys/dev/ic/aic7xxx_openbsd.c +++ b/sys/dev/ic/aic7xxx_openbsd.c @@ -29,10 +29,10 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: aic7xxx_openbsd.c,v 1.10 2003/01/05 22:41:35 deraadt Exp $ + * $Id: aic7xxx_openbsd.c,v 1.11 2003/03/21 14:58:06 drahn Exp $ * * $FreeBSD: src/sys/dev/aic7xxx/aic7xxx_freebsd.c,v 1.26 2001/07/18 21:39:47 gibbs Exp $ - * $OpenBSD: aic7xxx_openbsd.c,v 1.10 2003/01/05 22:41:35 deraadt Exp $ + * $OpenBSD: aic7xxx_openbsd.c,v 1.11 2003/03/21 14:58:06 drahn Exp $ */ #include <dev/ic/aic7xxx_openbsd.h> @@ -731,7 +731,7 @@ ahc_done(ahc, scb) */ memset(&xs->sense, 0, sizeof(struct scsi_sense_data)); memcpy(&xs->sense, ahc_get_sense_buf(ahc, scb), - ahc_le32toh((scb->sg_list->len & AHC_SG_LEN_MASK))); + ahc_le32toh(scb->sg_list->len) & AHC_SG_LEN_MASK); xs->error = XS_SENSE; } @@ -1063,7 +1063,7 @@ ahc_execute_scb(arg, dm_segs, nsegments) scb->hscb->dataptr = scb->sg_list->addr; scb->hscb->datacnt = scb->sg_list->len; } else { - scb->hscb->sgptr = SG_LIST_NULL; + scb->hscb->sgptr = ahc_htole32(SG_LIST_NULL); scb->hscb->dataptr = 0; scb->hscb->datacnt = 0; } @@ -1095,11 +1095,6 @@ ahc_execute_scb(arg, dm_segs, nsegments) panic("ahc bad sg_count"); #endif - /* Fixup byte order */ - scb->hscb->dataptr = ahc_htole32(scb->hscb->dataptr); - scb->hscb->datacnt = ahc_htole32(scb->hscb->datacnt); - scb->hscb->sgptr = ahc_htole32(scb->hscb->sgptr); - tinfo = ahc_fetch_transinfo(ahc, SCSIID_CHANNEL(ahc, scb->hscb->scsiid), SCSIID_OUR_ID(scb->hscb->scsiid), SCSIID_TARGET(ahc, scb->hscb->scsiid), |