Thank you for fast reply.
> That's horribly inefficient. You do not need to allocate a physically contiguous buffer if your device supports S/G operations, which you allude to later in your email.
You're right, i've just used it to ensure that driver basically works. I would never do this in final solution.
> When you are called by your superclass for ReportHBASpecificTaskDataSize(), you should think of this as your per-task specific "playground area" for commands and S/G segments. ... you can use GetHBADataPointer() to manipulate this per-task data and GetHBADataDescriptor() to get the IOMemoryDescriptor for it.
Yes, i understand and use this concept.
> And you call initWithSpecification() passing &MyController::OutputSegment as your segment function...
Thanks, i've missed that i may use custom segment function.
> If you advertise the proper maximum byte count, then the fLength should never be greater than UINT32_MAX
Can i also limit total transfer size somehow, or transfer fragmentation is on my own? kIOMaximumByteCount(Read/Write)Key make no sense.
P.S.: One more question. There is a paragraph in "I/O Kit Fundamentals": "If your DMA engine does complicated things, such as performing partial I/Os or synchronizing multiple accesses to a single IOMemoryDescriptor, you should write your driver assuming that the memory will be bounced. You don’t need to add code that checks for bouncing, because IODMACommand functions, such as synchronize, are no-ops when they are unnecessary."
Does this means, that i'm free of doing pre/post- read/write- synchronization operations?
And you call initWithSpecification() passing &MyController::OutputSegment as your segment function...
Thanks, i've missed that i may use custom segment function.If you advertise the proper maximum byte count, then the fLength should never be greater than UINT32_MAX
Can i also limit total transfer size somehow, or transfer fragmentation is on my own? kIOMaximumByteCount(Read/Write)Key make no sense.
P.S.: One more question. There is a paragraph in "I/O Kit Fundamentals": "If your DMA engine does complicated things, such as performing partial I/Os or synchronizing multiple accesses to a single IOMemoryDescriptor, you should write your driver assuming that the memory will be bounced. You don’t need to add code that checks for bouncing, because IODMACommand functions, such as synchronize, are no-ops when they are unnecessary."
Does this means, that i'm free of doing pre/post- read/write- synchronization operations?
------------------
6 Infinite Loop
M/S 306-2MS
Cupertino CA 95014
phone: (408) 974-4033
fax: (408) 862-7577
email: sar...@apple.com
My main problem was in that i've tried to set kIOMaximumByteCountReadKey from ReportHBAConstraints() method.
Not to praise, but to mention: the whole stack is better than what i've have to deal with in other operating systems.