Hi , I trying to port USB stack to WinNT and have some difficult. I realize that the problem caused by my wrappers around the stack (i tested same scenario with linux and all works fine) but may be someone can give me a clue about what going on here. First of all it's base on 2.4.12 kernel stack and i speak about uhci.c
The situation: I have a device with 2 bulk pipes ( in/out), pipesize is 64 bytes. Device sending data and at end of transfer (128 bytes) send zero packet. I read successfully 128 and and in second attempt read Zero packet till now all fine. But next attempt to read 128 bring me 64 bytes. in first td i have data that should be in second td (i now it by printing data) and second td is empty. Same behavior if i terminated transfer with short packet ( < pipesize) I try to delay sending zero packet from device in this case i didn't get interrupt at all for transfer until delay zero packet comes ( since only second td generate interrupt). if i didn't send zero packet all works fine and all data arrived without corruption. I also tested sending only short packets. An this work too. So it's seems like any short packet ( packetsize > packet >= 0) corrupt the next one if he comes after "usual" full packet. Here is a td's that i printed in submit_bulk and result_interrupt I simulate data flow by writing data to device and send it back : registered new driver generic uhci_submit_bulk: write 128 Registers : c1 0 f 65e 7d48978 40 95 80 Qh 1: self 0x7bfc000 0x1 0x7e58000 td 1, Self 0x7e58000: 0x1f9000 0x38800000 0x7e282e1 0x7bf7000 0x7e58000 0x877c16a8 0x86e61d08 0xfee5001c td data 0xdeaddead 0xdeadbeaf 0xdead1234 0x1234beaf 0x10 0x0 td 2, Self 0x1f9000: 0x1 0x39800000 0x7ea82e1 0x7bf7040 0x1f9000 0x877c16a8 0x86e61d08 0x87ab5ebc td data 0x10 0x11 0x12 0x13 0x14 0x15 uhci_result_interrupt : write result Registers : c1 0 f 662 7d48988 40 95 80 td 0, Self 0x7e58000: 0x1f9000 0x3800003f 0x7e282e1 0x7bf7000 0x7e58000 0x877c16a8 0x86e61d08 0xfee5001c td data 0xdeaddead 0xdeadbeaf 0xdead1234 0x1234beaf 0x10 0x0 td 1, Self 0x1f9000: 0x1 0x3900003f 0x7ea82e1 0x7bf7040 0x1f9000 0x877c16a8 0x86e61d08 0x87ab5ebc td data 0x10 0x11 0x12 0x13 0x14 0x15 uhci_submit_bulk: read 128 Registers : c1 0 f 6e9 7d48ba4 40 95 80 Qh 1: self 0x205000 0x1 0x7e58000 td 1, Self 0x7e58000: 0x13c2000 0x38800000 0x7e30269 0x7e00000 0x7e58000 0x877c16a8 0x86e61d08 0xfee5001c td data 0xaaaaaaaa 0xaaaaaaaa 0xaaaaaaaa 0xaaaaaaaa 0xaaaaaaaa 0xaaaaaaaa td 2, Self 0x13c2000: 0x1 0x39800000 0x7eb0269 0x7e00040 0x13c2000 0x877c16a8 0x86e61d08 0x87ab5ebc td data 0xaaaaaaaa 0xaaaaaaaa 0xaaaaaaaa 0xaaaaaaaa 0xaaaaaaaa 0xaaaaaaaa uhci_result_interrupt : read result Registers : c1 0 f 6ee 7d48bb8 40 95 80 td 0, Self 0x7e58000: 0x13c2000 0x3800003f 0x7e30269 0x7e00000 0x7e58000 0x877c16a8 0x86e61d08 0xfee5001c td data 0xdeaddead 0xdeadbeaf 0xdead1234 0x1234beaf 0x10 0x0 td 1, Self 0x13c2000: 0x1 0x3900003f 0x7eb0269 0x7e00040 0x13c2000 0x877c16a8 0x86e61d08 0x87ab5ebc td data 0x10 0x11 0x12 0x13 0x14 0x15 uhci_submit_bulk: read 128 Registers : c1 0 f 318 7d48c60 40 95 80 Qh 1: self 0x1290000 0x1 0x7e58000 td 1, Self 0x7e58000: 0x7b8d000 0x38800000 0x7e30269 0x7c0b000 0x7e58000 0x877c16a8 0x86e61d08 0xfee5001c td data 0xaaaaaaaa 0xaaaaaaaa 0xaaaaaaaa 0xaaaaaaaa 0xaaaaaaaa 0xaaaaaaaa td 2, Self 0x7b8d000: 0x1 0x39800000 0x7eb0269 0x7c0b040 0x7b8d000 0x877c16a8 0x86e61d08 0x87ab5ebc td data 0xaaaaaaaa 0xaaaaaaaa 0xaaaaaaaa 0xaaaaaaaa 0xaaaaaaaa 0xaaaaaaaa uhci_result_interrupt : read result zero buffer Registers : c1 0 f 31b 7d48c6c 40 95 80 td 0, Self 0x7e58000: 0x7b8d000 0x380007ff 0x7e30269 0x7c0b000 0x7e58000 0x877c16a8 0x86e61d08 0xfee5001c td data 0xaaaaaaaa 0xaaaaaaaa 0xaaaaaaaa 0xaaaaaaaa 0xaaaaaaaa 0xaaaaaaaa td 1, Self 0x7b8d000: 0x1 0x39800000 0x7eb0269 0x7c0b040 0x7b8d000 0x877c16a8 0x86e61d08 0x87ab5ebc td data 0xaaaaaaaa 0xaaaaaaaa 0xaaaaaaaa 0xaaaaaaaa 0xaaaaaaaa 0xaaaaaaaa uhci_result_interrupt: 3 ( short transfer indicator) uhci_submit_bulk: write 128 Registers : c1 0 f 746 7d48d18 40 95 80 Qh 1: self 0x36a2000 0x1 0x1c000 td 1, Self 0x1c000: 0x799f000 0x38800000 0x7e282e1 0x7b5a000 0x1c000 0x877c16a8 0x86e61d08 0xfee4d01c td data 0xdeaddead 0xdeadbeaf 0xdead1234 0x1234beaf 0x11 0x0 td 2, Self 0x799f000: 0x1 0x39800000 0x7ea82e1 0x7b5a040 0x799f000 0x877c16a8 0x86e61d08 0x87ab5ebc td data 0x10 0x11 0x12 0x13 0x14 0x15 uhci_result_interrupt : write result Registers : c1 0 f 74a 7d48d28 40 95 80 td 0, Self 0x1c000: 0x799f000 0x3800003f 0x7e282e1 0x7b5a000 0x1c000 0x877c16a8 0x86e61d08 0xfee4d01c td data 0xdeaddead 0xdeadbeaf 0xdead1234 0x1234beaf 0x11 0x0 td 1, Self 0x799f000: 0x1 0x3900003f 0x7ea82e1 0x7b5a040 0x799f000 0x877c16a8 0x86e61d08 0x87ab5ebc td data 0x10 0x11 0x12 0x13 0x14 0x15 uhci_submit_bulk: read 128 Registers : c1 0 f 320 7d48c80 40 95 80 Qh 1: self 0x11e9000 0x1 0x79d7000 td 1, Self 0x79d7000: 0x7be6000 0x38800000 0x7e30269 0x79e4000 0x79d7000 0x877c16a8 0x86e61d08 0xfee4d01c td data 0xaaaaaaaa 0xaaaaaaaa 0xaaaaaaaa 0xaaaaaaaa 0xaaaaaaaa 0xaaaaaaaa td 2, Self 0x7be6000: 0x1 0x39800000 0x7eb0269 0x79e4040 0x7be6000 0x877c16a8 0x86e61d08 0x87ab5ebc td data 0xaaaaaaaa 0xaaaaaaaa 0xaaaaaaaa 0xaaaaaaaa 0xaaaaaaaa 0xaaaaaaaa uhci_result_interrupt : read result second buffer recieved Registers : c1 0 f 338 7d48ce0 40 95 80 td 0, Self 0x79d7000: 0x7be6000 0x3800003f 0x7e30269 0x79e4000 0x79d7000 0x877c16a8 0x86e61d08 0xfee4d01c td data 0x10 0x11 0x12 0x13 0x14 0x15 td 1, Self 0x7be6000: 0x1 0x390007ff 0x7eb0269 0x79e4040 0x7be6000 0x877c16a8 0x86e61d08 0x87ab5ebc td data 0xaaaaaaaa 0xaaaaaaaa 0xaaaaaaaa 0xaaaaaaaa 0xaaaaaaaa 0xaaaaaaaa (zero buffer 7ff len) uhci_result_interrupt: 3 Did somebody see something unusual here ? Or can somebody think about any reason why controller may swallow packet ( i mean that i can damage inside controller? ) Thanks for any help, Regard Ilya. _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel