qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [4294] FDC: Fix data transfer len (Herv?\195?\169 Poussineau)
@ 2008-05-01 19:05 Blue Swirl
  0 siblings, 0 replies; only message in thread
From: Blue Swirl @ 2008-05-01 19:05 UTC (permalink / raw)
  To: qemu-devel

Revision: 4294
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4294
Author:   blueswir1
Date:     2008-05-01 19:05:12 +0000 (Thu, 01 May 2008)

Log Message:
-----------
FDC: Fix data transfer len (Herv?\195?\169 Poussineau)

In floppy controller, transfer data len is not correctly calculated.
We should read up to the last sector specified by the caller, and not up to
the last sector of the floppy.

Modified Paths:
--------------
    trunk/hw/fdc.c

Modified: trunk/hw/fdc.c
===================================================================
--- trunk/hw/fdc.c	2008-05-01 19:03:31 UTC (rev 4293)
+++ trunk/hw/fdc.c	2008-05-01 19:05:12 UTC (rev 4294)
@@ -1137,9 +1137,9 @@
     } else {
         int tmp;
         fdctrl->data_len = 128 << (fdctrl->fifo[5] > 7 ? 7 : fdctrl->fifo[5]);
-        tmp = (cur_drv->last_sect - ks + 1);
+        tmp = (fdctrl->fifo[6] - ks + 1);
         if (fdctrl->fifo[0] & 0x80)
-            tmp += cur_drv->last_sect;
+            tmp += fdctrl->fifo[6];
         fdctrl->data_len *= tmp;
     }
     fdctrl->eot = fdctrl->fifo[6];

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-05-01 19:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-01 19:05 [Qemu-devel] [4294] FDC: Fix data transfer len (Herv?\195?\169 Poussineau) Blue Swirl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).