#tyndur · 2010-04-01

245 Nachrichten · Seite 1 von 2 · Original-CSV herunterladen

  1. eddybkwolf: do you happen to be around?
  2. kwolfI do
  3. kwolfMorning eddyb
  4. eddybso
  5. eddybXanClic told me you're a qemu developer
  6. eddybis that right?
  7. eddybkwolf: ping
  8. kwolfeddyb: Yes, it is
  9. kwolfAs is XanClic now that his patch was accepted ;-)
  10. eddybi've had some strange problems with usb mass storage
  11. eddybwhat do you know about usb code?
  12. eddybs/\?/ in qemu?/
  13. kwolfI'm not much into the device emulation
  14. eddybthen
  15. kwolfAnything specific you're looking for?
  16. eddybcan you point me to someone who works on/know about it?
  17. kwolfI mean I have had a look at USB functions some time, but I don't know it inside out
  18. kwolfThere's no real maintainer for the USB code
  19. eddybto quote myself: "i either am a complete fool, either i've found a big bug in qemu"
  20. eddybthere's something funny going around
  21. eddybi need someone who worked on uhci
  22. kwolfWell, git log would tell you
  23. eddybor on usb mass storage
  24. kwolfWhich is probably different people
  25. kwolfTry using the OHCI emulation to rule UHCI out
  26. kwolfOr try passthrough with a real MSD
  27. eddybis there passthrough?
  28. eddybah, right
  29. eddybbut i have no MSD around :(
  30. JarvixHi guys :D
  31. kwolfYou have no MSD around? Don't you use any external media at all or do you still use floppies? ;-)
  32. kwolfMoin Jarvix
  33. Jarvixkwolf, what is ur part in the qemu?
  34. Jarvixmoin
  35. JarvixMSD = ?
  36. Jarvixmicro stick device?
  37. Jarvixdriver?
  38. Jarvixdick?
  39. kwolfMass Storage Device
  40. eddybthe first option
  41. kwolfJarvix: Mostly the block layer
  42. eddybi meant to buy one these days
  43. eddybblock?
  44. eddybwait
  45. Jarvixblock layer is what?
  46. eddybwhat kind of block?
  47. kwolfImage access
  48. kwolfAs in block device
  49. eddybhow close to SCSI?
  50. Jarvixaah
  51. Jarvixlol
  52. Jarvixdont ISE kwolf
  53. JarvixUSE*
  54. Jarvixdo u guys have access to all SATA docs :P?
  55. kwolfeddyb:
  56. eddyb?
  57. JarvixNice, whats the big trick on that?
  58. kwolfeddyb: I have touched it, but it's not really my main area. It's more the image format implementations and so on.
  59. eddybokey
  60. eddybi need someone to explain me the way it works, to put it simple
  61. JarvixSCSI?
  62. eddybbecause the code is a bit magic
  63. eddybSCSI+MSD+USB
  64. Jarvixi dont know SCSI
  65. Jarvixi have to write some HAL code, and managers first :P
  66. Jarvixneed some message passing for that
  67. eddybnah, i meant in qemu
  68. Jarvixthen i can write drivers :D
  69. Jarvixah
  70. Jarvixis it buggy?
  71. eddyblet's say
  72. Jarvixi vent seen anu code of qemu
  73. Jarvixhavent*
  74. eddybthere's almost no comment
  75. eddyband that right now...
  76. eddyb[13:33] <eddyb> to quote myself: "i either am a complete fool, either i've found a big bug in qemu"
  77. Jarvixfirst one
  78. Jarvix:)
  79. Jarvixhi Xan
  80. Jarvixmoin*
  81. eddyb*Clic
  82. kwolfeddyb: You might want to explain the problem in detail first
  83. XanClicMoin
  84. kwolfHey Clici ;-)
  85. eddybif it helps
  86. kwolfeddyb: It helps if you have a small test case with your expected result and the actual result
  87. kwolfThen it _should_ be possible to decide if your expectation or qemu is wrong
  88. eddybthey way i (partially understand) MSD, is that when a read happens, it reads from scsi(with a callback that fills the packet), then return, or if the data hasn't been received yet, defer it and return USB_RET_ASYNC(which, afaik, resends the packet, internally)
  89. eddybwell
  90. eddybif the data comes in after it has been deferred, even if there's a call to usb_async_complete(or something like that), the packet still comes again in
  91. eddybbut as the read has been completed, it's nomore in input mode, but rather in status mode
  92. eddybso then it fills my 1024 byte buffer with the status XD
  93. eddybnot deterministic when it happens
  94. kwolfHm, need to read through the code
  95. eddybit's big
  96. eddyband complex
  97. eddybi couldn't figure out the flow
  98. kwolfThat's all in usb-msd.c, no?
  99. eddybi think it should be fine there
  100. eddyb*if i'm right
  101. eddybalso if i'm right, the bug is in uhci
  102. eddybbut i may not be right, because i only make guesses
  103. kwolfYou only see this in Pedigree code, not in Linux or so, right?
  104. eddybhmm
  105. eddybthat's an idea
  106. kwolfIf you could reproduce with Linux it would be easy to try OHCI
  107. eddybi hope i still have that dsl image
  108. eddybwtf?
  109. eddyblinux reads 64 bytes once?
  110. eddybi do 1024 once
  111. kwolfIsn't 64 the maximum packet size?
  112. eddyb??
  113. XanClicYes, it is
  114. eddyb2047 is for uhci
  115. XanClicBut not for USB 1.x ;-)
  116. eddyb?
  117. eddybusb standard says that?
  118. XanClicAFAIK, full speed devices support bulk endpoints with up to 64 Bytes...
  119. XanClicAs MPS
  120. XanClichttp://wiki.osdev.org/USB#Maximum_Data_Payload_Size_3
  121. XanClic"Full-speed device endpoints may select a maximum data payload size of up to 64 bytes."
  122. eddybmaybe
  123. XanClicAh, no, that was wrong
  124. eddybthis is a bug
  125. XanClicThat's an interrupt transfer *g*
  126. XanClichttp://wiki.osdev.org/USB#Maximum_Data_Payload_Size_2 That's it
  127. eddyband hasn't been noticed yet because it happens when the data takes a little big more to fetch
  128. XanClic"Full-speed device endpoints may select a maximum data payload size of 8, 16, 32, or 64 bytes."
  129. XanClicI don't know if qemu just doesn't care about it
  130. XanClicBut real hardware will for sure
  131. eddyb64bytes is much less than 1024
  132. XanClic1024 would also be too much for high speed devices, which support 512 bytes
  133. XanClicMaybe you're lucky with superspeed *g*
  134. eddybwhat i want to say is that reading 64bytes once won't ever trigger this bug
  135. kwolfWhy?
  136. eddybbecause it takes way too less
  137. XanClicSo why don't you read 16 times?
  138. kwolfYou mean the completin happens too early?
  139. eddybi mean it could only happens when data is not ready in a short time
  140. eddyb*happen
  141. XanClicBut reading 1024 bytes in one packet is obviously totally wrong
  142. kwolfUntil when exactly? I don't see how it makes a difference for the MSD code
  143. XanClicSo if you say, reading 64 bytes 16 times won't trigger the bug
  144. XanClicThen there is no bug
  145. kwolfWell, with EHCI there still might be one
  146. kwolfOr with eddyHCI
  147. XanClicEHCI is full of bugs, isn't it? *g*
  148. kwolfThat it doesn't show up currently doesn't mean that it doesn't exist
  149. kwolfAnd that it's going to be hidden by other EHCI bugs doesn't mean that it doesn't exist either ;-)
  150. eddybEHCI will come to qemu some time?
  151. kwolfHowever, eddyb suspects a race and I don't think there is one
  152. kwolfEHCI does exist for qemu, in experimental git branches
  153. eddybif i could read 2048 once(instead of just 2047), i could prove it
  154. eddybnice...
  155. eddybwhen it's supposed to come to master?
  156. kwolf"When it's done", I guess
  157. kwolfWhich could still take some time because currently there's no company behind it
  158. XanClicWell, for 2048 bytes you need at least superspeed ;-)
  159. eddybuhci can do 2047 :P
  160. XanClicBut USB 1.1 cannot.
  161. XanClicOr USB 2.0 with full and low speed devices
  162. eddyband considering EHCI's qTDs got about 5 page fields....
  163. XanClicYou said, the problem is the MSD, isn't it?
  164. eddybhigh speed can do at least 8192
  165. XanClicNo, it can't
  166. XanClicThere is no transfer for it
  167. kwolfeddyb: You know it better than the specs?
  168. XanClicThe EHCI doesn't set the limits for USB 2.0 transfers
  169. eddybi dunno the exact flow, i can only suppose from what i see
  170. eddybas i added some additional debugging, i can only see the size difference between pedigree and linux
  171. XanClicI mean, if the MSD is the problem—then there is none, because it was originally built as a full speed device and thus only supports 64 byte packets
  172. XanClicThe only problem that appears to me, is that it might be necessary to build a new high speed MSD
  173. eddybcan be
  174. kwolfXanClic: If there was a race, it might as well trigger with 64 byte packets if you're unlucky enough
  175. eddybvery unlucky
  176. eddybconsidering it's not deterministic with 1024
  177. XanClicOK, so I take my statements back *g*
  178. kwolfYeah, sure. But relying on timing is always a bad idea
  179. XanClicHm, "take back"—is that Westerwave English?
  180. kwolfStill, I don't see that race
  181. kwolfXanClic: It's not ;-)
  182. XanClicFine :-)
  183. eddybholy crap
  184. eddybit seems to work, except for the 4 lines of debugging every 64byte transfer
  185. eddyband it does work :D
  186. XanClicBut you should also consider the real MPS
  187. eddybMPS?
  188. XanClicMaximum packet size
  189. XanClicFull speed bulk transfers can have an MPS of 8 to 64
  190. XanClicI guess, most use 64, but I wouldn't rely on it
  191. eddybi'll get to that when i do the usb redesign
  192. eddybbut i need to wait for matt, so not now
  193. eddybXanClic: hmm, it's a fixed size, what should i use for CSW?
  194. eddyb64, instead of 13?
  195. eddybnvm, linux uses 13
  196. XanClicIt's not fixed, it's the _maximum_ ;-)
  197. eddybwait
  198. eddybso for high speed, it's a maximum of 512?
  199. XanClicYes
  200. eddybbut it can be less?