summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortdeval <tdeval@openbsd.org>2002-12-13 22:45:37 +0000
committertdeval <tdeval@openbsd.org>2002-12-13 22:45:37 +0000
commite19a8785b74f6aaab2130aebda66a890f1370c89 (patch)
tree87f94c580b51c4e06ddac32f86f0805476ab0e6d
parentOnly WRITE_REQUEST_DATABLOCK are limited to the device's max_receive. (diff)
downloadwireguard-openbsd-e19a8785b74f6aaab2130aebda66a890f1370c89.tar.xz
wireguard-openbsd-e19a8785b74f6aaab2130aebda66a890f1370c89.zip
Limit our Data transfers only to the link speed imposed one.
Writes are now on a par with reads (-:
-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,