Floppy: Properly handle Sense Interrupt Status after FDC Reset

Original text below.

Attached is a patch that changes how the emulated floppy controller replies to Sense Interrupt Status commands immediately after a controller reset. The specs state that after a Reset the 82078 goes into polling mode which needs four Sense Interrupt Status commands to be issued afterwards to clear the status of each drive. Currently we always respond to Sense Interrupt Status with a SEEK END instead of POLLING. This causes a problem with the SCO Openserver installer which is expects a POLLING state after reset. This patch returns a POLLING status for four Sense Interrupt Status requests immediately after a controller reset. This approach mirrors the way Bochs handles this situation. With the attached patch applied Openserver gets further when trying to load storage drivers from the floppy disk (blocked by another issue, patch on its way). I have successfully tested the floppy drive on the following OSs after applying this patch: Windows 98, Windows XP SP2, Linux x86 (SysRescCD 1.1.3 and Ubuntu 8.10).

Justin

Changelog:

Properly handle Sense Interrupt Status after FDC Reset

Signed-off-by: Justin Chevrier <theburner1@yahoo.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6416 c046a42c-6fe2-441c-8c8c-71466251a162
1 file changed
tree: 93098930010f99fbd36e24011d4c3fbb600176b5
  1. audio/
  2. bsd-user/
  3. darwin-user/
  4. fpu/
  5. gdb-xml/
  6. hw/
  7. keymaps/
  8. linux-user/
  9. pc-bios/
  10. slirp/
  11. target-alpha/
  12. target-arm/
  13. target-cris/
  14. target-i386/
  15. target-m68k/
  16. target-mips/
  17. target-ppc/
  18. target-sh4/
  19. target-sparc/
  20. tcg/
  21. tests/
  22. .gitignore
  23. a.out.h
  24. aes.c
  25. aes.h
  26. aio.c
  27. alpha-dis.c
  28. alpha.ld
  29. arm-dis.c
  30. arm-semi.c
  31. arm.ld
  32. balloon.h
  33. block-bochs.c
  34. block-cloop.c
  35. block-cow.c
  36. block-dmg.c
  37. block-nbd.c
  38. block-parallels.c
  39. block-qcow.c
  40. block-qcow2.c
  41. block-raw-posix.c
  42. block-raw-win32.c
  43. block-vmdk.c
  44. block-vpc.c
  45. block-vvfat.c
  46. block.c
  47. block.h
  48. block_int.h
  49. bswap.h
  50. bt-host.c
  51. bt-vhci.c
  52. buffered_file.c
  53. buffered_file.h
  54. cache-utils.c
  55. cache-utils.h
  56. Changelog
  57. cocoa.m
  58. configure
  59. console.c
  60. console.h
  61. COPYING
  62. COPYING.LIB
  63. cpu-all.h
  64. cpu-defs.h
  65. cpu-exec.c
  66. cris-dis.c
  67. curses.c
  68. curses_keys.h
  69. cutils.c
  70. d3des.c
  71. d3des.h
  72. def-helper.h
  73. device_tree.c
  74. device_tree.h
  75. dis-asm.h
  76. disas.c
  77. disas.h
  78. dyngen-exec.h
  79. elf.h
  80. elf_ops.h
  81. exec-all.h
  82. exec.c
  83. feature_to_c.sh
  84. gdbstub.c
  85. gdbstub.h
  86. gen-icount.h
  87. host-utils.c
  88. host-utils.h
  89. hostregs_helper.h
  90. hpet.h
  91. hppa-dis.c
  92. hppa.ld
  93. i386-dis.c
  94. i386.ld
  95. ia64.ld
  96. keymaps.c
  97. kqemu.c
  98. kqemu.h
  99. kvm-all.c
  100. kvm.h
  101. libfdt_env.h
  102. LICENSE
  103. loader.c
  104. m68k-dis.c
  105. m68k-semi.c
  106. m68k.ld
  107. MAINTAINERS
  108. Makefile
  109. Makefile.target
  110. migration-exec.c
  111. migration-tcp.c
  112. migration.c
  113. migration.h
  114. mips-dis.c
  115. mips.ld
  116. mipsel.ld
  117. monitor.c
  118. nbd.c
  119. nbd.h
  120. net-checksum.c
  121. net.c
  122. net.h
  123. osdep.c
  124. osdep.h
  125. pci-ids.txt
  126. posix-aio-compat.c
  127. posix-aio-compat.h
  128. ppc-dis.c
  129. ppc.ld
  130. ppc64.ld
  131. qemu-aio.h
  132. qemu-binfmt-conf.sh
  133. qemu-char.c
  134. qemu-char.h
  135. qemu-common.h
  136. qemu-doc.texi
  137. qemu-img.c
  138. qemu-img.texi
  139. qemu-lock.h
  140. qemu-log.h
  141. qemu-malloc.c
  142. qemu-nbd.c
  143. qemu-nbd.texi
  144. qemu-sockets.c
  145. qemu-tech.texi
  146. qemu-timer.h
  147. qemu-tool.c
  148. qemu_socket.h
  149. readline.c
  150. README
  151. rules.mak
  152. s390-dis.c
  153. s390.ld
  154. savevm.c
  155. sdl.c
  156. sdl_keysym.h
  157. sh4-dis.c
  158. softmmu-semi.h
  159. softmmu_defs.h
  160. softmmu_exec.h
  161. softmmu_header.h
  162. softmmu_template.h
  163. sparc-dis.c
  164. sparc.ld
  165. sparc64.ld
  166. sys-queue.h
  167. sysemu.h
  168. tap-win32.c
  169. texi2pod.pl
  170. thunk.c
  171. thunk.h
  172. TODO
  173. translate-all.c
  174. uboot_image.h
  175. usb-bsd.c
  176. usb-linux.c
  177. usb-stub.c
  178. VERSION
  179. vgafont.h
  180. vl.c
  181. vnc.c
  182. vnc_keysym.h
  183. vnchextile.h
  184. x86_64.ld
  185. x_keymap.c