summaryrefslogtreecommitdiff
path: root/sys/dev/ieee1394
diff options
context:
space:
mode:
authorThierry Deval <tdeval@cvs.openbsd.org>2002-12-13 22:45:38 +0000
committerThierry Deval <tdeval@cvs.openbsd.org>2002-12-13 22:45:38 +0000
commit9fce7d6ecd3d80eac29b3c86e42dd962feffa21a (patch)
tree83acc8085a88aae2222d32d84f6f57948cf6f4de /sys/dev/ieee1394
parent9ecee4a68b7aa0439d9cff9bac88827721dd678f (diff)
Limit our Data transfers only to the link speed imposed one.
Writes are now on a par with reads (-:
Diffstat (limited to 'sys/dev/ieee1394')
-rw-r--r--sys/dev/ieee1394/fwscsi.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/sys/dev/ieee1394/fwscsi.c b/sys/dev/ieee1394/fwscsi.c
index 210804a74fd..3336d5f2d48 100644
--- a/sys/dev/ieee1394/fwscsi.c
+++ b/sys/dev/ieee1394/fwscsi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fwscsi.c,v 1.3 2002/12/13 22:25:31 tdeval Exp $ */
+/* $OpenBSD: fwscsi.c,v 1.4 2002/12/13 22:45:37 tdeval Exp $ */
/*
* Copyright (c) 2002 Thierry Deval. All rights reserved.
@@ -724,10 +724,11 @@ fwscsi_scsi_cmd(struct scsi_xfer *xs)
data_ab->ab_tcode =
IEEE1394_TCODE_READ_REQUEST_DATABLOCK;
#if 1
+ options |= (7 + fwsc->sc_sc1394.sc1394_link_speed) << 4;
+#else
options |=
- ((sc->sc_fwnode->sc_sc1394.sc1394_max_receive - 1)
+ ((fwsc->sc_sc1394.sc1394_max_receive - 1)
& 0xF) << 4;
-#else
options |= 0x9 << 4; /* 2048 max payload */
#endif
DPRINTFN(1, (" -- OUT(%d/%X)\n", datalen,
@@ -736,10 +737,11 @@ fwscsi_scsi_cmd(struct scsi_xfer *xs)
data_ab->ab_tcode =
IEEE1394_TCODE_WRITE_REQUEST_DATABLOCK;
options |= 0x0800;
-#if 0
- options |= (sc->sc_maxpayload & 0xF) << 4;
- options |= ((sc->sc_fwnode->sc_sc1394.sc1394_max_receive -1) & 0xF) << 4;
+#if 1
+ options |= (7 + fwsc->sc_sc1394.sc1394_link_speed) << 4;
#else
+ options |= (sc->sc_maxpayload & 0xF) << 4;
+ options |= ((fwsc->sc_sc1394.sc1394_max_receive -1) & 0xF) << 4;
options |= 0x9 << 4; /* 2048 max payload */
#endif
DPRINTFN(1, (" -- IN(%d/%X)\n", datalen,