ADC Home > Reference Library > Reference > Darwin > Kernel Framework Reference
|
IOFireWireSBP2LSIWorkaroundDescriptor |
Inherits from: |
IOGeneralMemoryDescriptor
|
Declared In: |
This is a subclass of IOGeneralMemoryDescriptor, designed to work around a hardware problem in a common SBP2 target.
This subclass of IOGeneralMemoryDescriptor takes a memory descriptor as an argument. It retains this descriptor and returns a new one with resegmented physical segments and potentially some "unfixable" segments double buffered.
If the transfer will cause data to be sent from the Mac, syncBuffersForOutput must be called before the transfer.
If the transfer will cause data to be recieve by the Mac, syncBuffersForInput must be called after the transfer.
This class calculates the new segmentation only once when it is created. Any changes to the structure of the original memory descriptor will render this one useless. It must be released and a new IOFireWireSBP2LSIWorkaroundDescriptor can be created.
LSI Bridge Workaround Algorithm Details
Goals:
Solution: Write a page table such that the bridge will nor use packets smaller than 16 bytes. In other words, rearrange the memory descriptor to avoid the bug, and do it such that the SBP-2 layer will not break up a segment (du ro the 64k-1 limit) and re-introduces the problem
SBP-2 defines the kFWSBP2MaxPageClusterSize constant. We simply make sure none of our segments are larger than this size and SBP-2 will not break them up when it writes the SBP-2 page table.
Notes: - Some double buffering is unavoidable. Discontiguous pages may yield page fragments at the start or end of the buffer (or both, with non-512x buffers). solution uses less than 33 bytes of double-buffer per segment in original memory descriptor. - If driver must break up IO to meet ATA limit of 255 (250?) blocks, assume the driver does this at a higher level (before applying workaround). - It is expected that the original memory descriptor has been prepared (wired).
|
Last Updated: 2008-12-19