#tyndur · 2010-04-01
245 Nachrichten · Seite 1 von 2 · Original-CSV herunterladen
- eddybkwolf: do you happen to be around?
- kwolfI do
- kwolfMorning eddyb
- eddybso
- eddybXanClic told me you're a qemu developer
- eddybis that right?
- eddybkwolf: ping
- kwolfeddyb: Yes, it is
- kwolfAs is XanClic now that his patch was accepted ;-)
- eddybi've had some strange problems with usb mass storage
- eddybwhat do you know about usb code?
- eddybs/\?/ in qemu?/
- kwolfI'm not much into the device emulation
- eddybthen
- kwolfAnything specific you're looking for?
- eddybcan you point me to someone who works on/know about it?
- kwolfI mean I have had a look at USB functions some time, but I don't know it inside out
- kwolfThere's no real maintainer for the USB code
- eddybto quote myself: "i either am a complete fool, either i've found a big bug in qemu"
- eddybthere's something funny going around
- eddybi need someone who worked on uhci
- kwolfWell, git log would tell you
- eddybor on usb mass storage
- kwolfWhich is probably different people
- kwolfTry using the OHCI emulation to rule UHCI out
- kwolfOr try passthrough with a real MSD
- eddybis there passthrough?
- eddybah, right
- eddybbut i have no MSD around :(
- JarvixHi guys :D
- kwolfYou have no MSD around? Don't you use any external media at all or do you still use floppies? ;-)
- kwolfMoin Jarvix
- Jarvixkwolf, what is ur part in the qemu?
- Jarvixmoin
- JarvixMSD = ?
- Jarvixmicro stick device?
- Jarvixdriver?
- Jarvixdick?
- kwolfMass Storage Device
- eddybthe first option
- kwolfJarvix: Mostly the block layer
- eddybi meant to buy one these days
- eddybblock?
- eddybwait
- Jarvixblock layer is what?
- eddybwhat kind of block?
- kwolfImage access
- kwolfAs in block device
- eddybhow close to SCSI?
- Jarvixaah
- Jarvixlol
- Jarvixdont ISE kwolf
- JarvixUSE*
- Jarvixdo u guys have access to all SATA docs :P?
- kwolfeddyb:
- eddyb?
- JarvixNice, whats the big trick on that?
- kwolfeddyb: I have touched it, but it's not really my main area. It's more the image format implementations and so on.
- eddybokey
- eddybi need someone to explain me the way it works, to put it simple
- JarvixSCSI?
- eddybbecause the code is a bit magic
- eddybSCSI+MSD+USB
- Jarvixi dont know SCSI
- Jarvixi have to write some HAL code, and managers first :P
- Jarvixneed some message passing for that
- eddybnah, i meant in qemu
- Jarvixthen i can write drivers :D
- Jarvixah
- Jarvixis it buggy?
- eddyblet's say
- Jarvixi vent seen anu code of qemu
- Jarvixhavent*
- eddybthere's almost no comment
- eddyband that right now...
- eddyb[13:33] <eddyb> to quote myself: "i either am a complete fool, either i've found a big bug in qemu"
- Jarvixfirst one
- Jarvix:)
- Jarvixhi Xan
- Jarvixmoin*
- eddyb*Clic
- kwolfeddyb: You might want to explain the problem in detail first
- XanClicMoin
- kwolfHey Clici ;-)
- eddybif it helps
- kwolfeddyb: It helps if you have a small test case with your expected result and the actual result
- kwolfThen it _should_ be possible to decide if your expectation or qemu is wrong
- 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)
- eddybwell
- 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
- eddybbut as the read has been completed, it's nomore in input mode, but rather in status mode
- eddybso then it fills my 1024 byte buffer with the status XD
- eddybnot deterministic when it happens
- kwolfHm, need to read through the code
- eddybit's big
- eddyband complex
- eddybi couldn't figure out the flow
- kwolfThat's all in usb-msd.c, no?
- eddybi think it should be fine there
- eddyb*if i'm right
- eddybalso if i'm right, the bug is in uhci
- eddybbut i may not be right, because i only make guesses
- kwolfYou only see this in Pedigree code, not in Linux or so, right?
- eddybhmm
- eddybthat's an idea
- kwolfIf you could reproduce with Linux it would be easy to try OHCI
- eddybi hope i still have that dsl image
- eddybwtf?
- eddyblinux reads 64 bytes once?
- eddybi do 1024 once
- kwolfIsn't 64 the maximum packet size?
- eddyb??
- XanClicYes, it is
- eddyb2047 is for uhci
- XanClicBut not for USB 1.x ;-)
- eddyb?
- eddybusb standard says that?
- XanClicAFAIK, full speed devices support bulk endpoints with up to 64 Bytes...
- XanClicAs MPS
- XanClichttp://wiki.osdev.org/USB#Maximum_Data_Payload_Size_3
- XanClic"Full-speed device endpoints may select a maximum data payload size of up to 64 bytes."
- eddybmaybe
- XanClicAh, no, that was wrong
- eddybthis is a bug
- XanClicThat's an interrupt transfer *g*
- XanClichttp://wiki.osdev.org/USB#Maximum_Data_Payload_Size_2 That's it
- eddyband hasn't been noticed yet because it happens when the data takes a little big more to fetch
- XanClic"Full-speed device endpoints may select a maximum data payload size of 8, 16, 32, or 64 bytes."
- XanClicI don't know if qemu just doesn't care about it
- XanClicBut real hardware will for sure
- eddyb64bytes is much less than 1024
- XanClic1024 would also be too much for high speed devices, which support 512 bytes
- XanClicMaybe you're lucky with superspeed *g*
- eddybwhat i want to say is that reading 64bytes once won't ever trigger this bug
- kwolfWhy?
- eddybbecause it takes way too less
- XanClicSo why don't you read 16 times?
- kwolfYou mean the completin happens too early?
- eddybi mean it could only happens when data is not ready in a short time
- eddyb*happen
- XanClicBut reading 1024 bytes in one packet is obviously totally wrong
- kwolfUntil when exactly? I don't see how it makes a difference for the MSD code
- XanClicSo if you say, reading 64 bytes 16 times won't trigger the bug
- XanClicThen there is no bug
- kwolfWell, with EHCI there still might be one
- kwolfOr with eddyHCI
- XanClicEHCI is full of bugs, isn't it? *g*
- kwolfThat it doesn't show up currently doesn't mean that it doesn't exist
- kwolfAnd that it's going to be hidden by other EHCI bugs doesn't mean that it doesn't exist either ;-)
- eddybEHCI will come to qemu some time?
- kwolfHowever, eddyb suspects a race and I don't think there is one
- kwolfEHCI does exist for qemu, in experimental git branches
- eddybif i could read 2048 once(instead of just 2047), i could prove it
- eddybnice...
- eddybwhen it's supposed to come to master?
- kwolf"When it's done", I guess
- kwolfWhich could still take some time because currently there's no company behind it
- XanClicWell, for 2048 bytes you need at least superspeed ;-)
- eddybuhci can do 2047 :P
- XanClicBut USB 1.1 cannot.
- XanClicOr USB 2.0 with full and low speed devices
- eddyband considering EHCI's qTDs got about 5 page fields....
- XanClicYou said, the problem is the MSD, isn't it?
- eddybhigh speed can do at least 8192
- XanClicNo, it can't
- XanClicThere is no transfer for it
- kwolfeddyb: You know it better than the specs?
- XanClicThe EHCI doesn't set the limits for USB 2.0 transfers
- eddybi dunno the exact flow, i can only suppose from what i see
- eddybas i added some additional debugging, i can only see the size difference between pedigree and linux
- 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
- XanClicThe only problem that appears to me, is that it might be necessary to build a new high speed MSD
- eddybcan be
- kwolfXanClic: If there was a race, it might as well trigger with 64 byte packets if you're unlucky enough
- eddybvery unlucky
- eddybconsidering it's not deterministic with 1024
- XanClicOK, so I take my statements back *g*
- kwolfYeah, sure. But relying on timing is always a bad idea
- XanClicHm, "take back"—is that Westerwave English?
- kwolfStill, I don't see that race
- kwolfXanClic: It's not ;-)
- XanClicFine :-)
- eddybholy crap
- eddybit seems to work, except for the 4 lines of debugging every 64byte transfer
- eddyband it does work :D
- XanClicBut you should also consider the real MPS
- eddybMPS?
- XanClicMaximum packet size
- XanClicFull speed bulk transfers can have an MPS of 8 to 64
- XanClicI guess, most use 64, but I wouldn't rely on it
- eddybi'll get to that when i do the usb redesign
- eddybbut i need to wait for matt, so not now
- eddybXanClic: hmm, it's a fixed size, what should i use for CSW?
- eddyb64, instead of 13?
- eddybnvm, linux uses 13
- XanClicIt's not fixed, it's the _maximum_ ;-)
- eddybwait
- eddybso for high speed, it's a maximum of 512?
- XanClicYes
- eddybbut it can be less?