aboutsummaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2010-09-12 19:11:59 +0100
committerMichael Brown <mcb30@ipxe.org>2010-09-12 22:46:01 +0100
commit46c7f99c66e18bf1735a68ada35aa963c979d59b (patch)
treeaac3a1922b5504fa75f5e2f8ea19f9b6c81a605d /src/include
parent30e7d7efa1b451d4b518e452887fc08ec666fb2e (diff)
downloadipxe-46c7f99c66e18bf1735a68ada35aa963c979d59b.tar.gz
[hermon] Use correct alignment for doorbell records
Doorbell records are currently embedded within the completion queue and receive work queue strucures, which are allocated using zalloc() and so have an alignment guarantee of only sizeof(void*), i.e. four bytes. This is sufficient for the receive work queue, but not for the completion queue, which requires an alignment guarantee of eight bytes. Though not guaranteed, it so happens that zalloc() will always return a pointer that is exactly four bytes above a sixteen-byte boundary. The completion queue doorbell record is therefore always misaligned, and the value passed to the hardware via SW2HW_CQ is actually always pointing to the page_offset value within the MTT descriptor (which directly precedes the inline doorbell record). Provided that the page offset is greater than 0x100, this looks to the hardware like an update_ci value of greater than 0x010000 (taking into account endianness differences), and so the hardware will happily deliver more than 0x010000 completions before stopping. Hence this problem is rarely observable. Fix by allocating the doorbell records separately and using the correct alignment constraints. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include')
0 files changed, 0 insertions, 0 deletions