USB HID does not support Set_Idle

I found that the QEMU USB keyboard support does not work properly with
the Set_Idle command.  Once a non-zero value is given to Set_Idle,
then the keyboard reports an event on every poll - not based on the
time issued in the Set_Idle command.

I changed the code (see patch below) and it works for me.  I'm not
that familiar with the qemu internals, so I'm not sure if this is the
best way to implement this feature.

-Kevin

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
1 file changed
tree: 6e4ac17b5500ecf401968dc0d2eb3ed0a9e42788
  1. audio/
  2. block/
  3. bsd-user/
  4. darwin-user/
  5. default-configs/
  6. docs/
  7. fpu/
  8. gdb-xml/
  9. hw/
  10. linux-user/
  11. net/
  12. pc-bios/
  13. QMP/
  14. roms/
  15. slirp/
  16. target-alpha/
  17. target-arm/
  18. target-cris/
  19. target-i386/
  20. target-m68k/
  21. target-microblaze/
  22. target-mips/
  23. target-ppc/
  24. target-s390x/
  25. target-sh4/
  26. target-sparc/
  27. tcg/
  28. tests/
  29. .gitignore
  30. .gitmodules
  31. a.out.h
  32. acl.c
  33. acl.h
  34. aes.c
  35. aes.h
  36. aio.c
  37. alpha-dis.c
  38. alpha.ld
  39. arm-dis.c
  40. arm-semi.c
  41. arm.ld
  42. async.c
  43. balloon.h
  44. block-migration.c
  45. block-migration.h
  46. block.c
  47. block.h
  48. block_int.h
  49. bswap.h
  50. bt-host.c
  51. bt-host.h
  52. bt-vhci.c
  53. buffered_file.c
  54. buffered_file.h
  55. cache-utils.c
  56. cache-utils.h
  57. Changelog
  58. check-qdict.c
  59. check-qfloat.c
  60. check-qint.c
  61. check-qjson.c
  62. check-qlist.c
  63. check-qstring.c
  64. cmd.c
  65. cmd.h
  66. cocoa.m
  67. CODING_STYLE
  68. config.h
  69. configure
  70. console.c
  71. console.h
  72. COPYING
  73. COPYING.LIB
  74. cpu-all.h
  75. cpu-common.h
  76. cpu-defs.h
  77. cpu-exec.c
  78. create_config
  79. cris-dis.c
  80. curses.c
  81. curses_keys.h
  82. cutils.c
  83. d3des.c
  84. d3des.h
  85. def-helper.h
  86. device_tree.c
  87. device_tree.h
  88. dis-asm.h
  89. disas.c
  90. disas.h
  91. dma-helpers.c
  92. dma.h
  93. dyngen-exec.h
  94. elf.h
  95. envlist.c
  96. envlist.h
  97. exec-all.h
  98. exec.c
  99. feature_to_c.sh
  100. gdbstub.c
  101. gdbstub.h
  102. gen-icount.h
  103. host-utils.c
  104. host-utils.h
  105. hpet.h
  106. hppa-dis.c
  107. hppa.ld
  108. hxtool
  109. i386-dis.c
  110. i386.ld
  111. ia64.ld
  112. input.c
  113. ioport-user.c
  114. ioport.c
  115. ioport.h
  116. json-lexer.c
  117. json-lexer.h
  118. json-parser.c
  119. json-parser.h
  120. json-streamer.c
  121. json-streamer.h
  122. keymaps.c
  123. keymaps.h
  124. kvm-all.c
  125. kvm.h
  126. libfdt_env.h
  127. LICENSE
  128. linux-aio.c
  129. m68k-dis.c
  130. m68k-semi.c
  131. m68k.ld
  132. MAINTAINERS
  133. Makefile
  134. Makefile.hw
  135. Makefile.objs
  136. Makefile.target
  137. Makefile.user
  138. microblaze-dis.c
  139. migration-exec.c
  140. migration-fd.c
  141. migration-tcp.c
  142. migration-unix.c
  143. migration.c
  144. migration.h
  145. mips-dis.c
  146. mips.ld
  147. module.c
  148. module.h
  149. monitor.c
  150. monitor.h
  151. nbd.c
  152. nbd.h
  153. net-checksum.c
  154. net.c
  155. net.h
  156. osdep.c
  157. osdep.h
  158. path.c
  159. pci-ids.txt
  160. posix-aio-compat.c
  161. ppc-dis.c
  162. ppc.ld
  163. ppc64.ld
  164. qbool.c
  165. qbool.h
  166. qdict-test-data.txt
  167. qdict.c
  168. qdict.h
  169. qemu-aio.h
  170. qemu-binfmt-conf.sh
  171. qemu-char.c
  172. qemu-char.h
  173. qemu-common.h
  174. qemu-config.c
  175. qemu-config.h
  176. qemu-doc.texi
  177. qemu-img-cmds.hx
  178. qemu-img.c
  179. qemu-img.texi
  180. qemu-io.c
  181. qemu-lock.h
  182. qemu-log.h
  183. qemu-malloc.c
  184. qemu-monitor.hx
  185. qemu-nbd.c
  186. qemu-nbd.texi
  187. qemu-objects.h
  188. qemu-option.c
  189. qemu-option.h
  190. qemu-options.hx
  191. qemu-queue.h
  192. qemu-sockets.c
  193. qemu-tech.texi
  194. qemu-thread.c
  195. qemu-thread.h
  196. qemu-timer.h
  197. qemu-tool.c
  198. qemu.sasl
  199. qemu_socket.h
  200. qerror.c
  201. qerror.h
  202. qfloat.c
  203. qfloat.h
  204. qint.c
  205. qint.h
  206. qjson.c
  207. qjson.h
  208. qlist.c
  209. qlist.h
  210. qobject.h
  211. qstring.c
  212. qstring.h
  213. readline.c
  214. readline.h
  215. README
  216. rules.mak
  217. rwhandler.c
  218. rwhandler.h
  219. s390-dis.c
  220. s390.ld
  221. savevm.c
  222. sdl.c
  223. sdl_keysym.h
  224. sdl_zoom.c
  225. sdl_zoom.h
  226. sdl_zoom_template.h
  227. sh4-dis.c
  228. softmmu-semi.h
  229. softmmu_defs.h
  230. softmmu_exec.h
  231. softmmu_header.h
  232. softmmu_template.h
  233. sparc-dis.c
  234. sparc.ld
  235. sparc64.ld
  236. sysemu.h
  237. targphys.h
  238. tcg-runtime.c
  239. texi2pod.pl
  240. thunk.c
  241. thunk.h
  242. TODO
  243. translate-all.c
  244. uboot_image.h
  245. usb-bsd.c
  246. usb-linux.c
  247. usb-stub.c
  248. VERSION
  249. vgafont.h
  250. vl.c
  251. vnc-auth-sasl.c
  252. vnc-auth-sasl.h
  253. vnc-auth-vencrypt.c
  254. vnc-auth-vencrypt.h
  255. vnc-tls.c
  256. vnc-tls.h
  257. vnc.c
  258. vnc.h
  259. vnc_keysym.h
  260. vnchextile.h
  261. x86_64.ld
  262. x_keymap.c
  263. x_keymap.h