.blk_size = 0x10,
.e2_size = 0x800,
},
+ {
+ /* 24XX32 */
+ .has_dev_addr = true,
+ .blk_size = 0x20,
+ .e2_size = 0x1000,
+ },
+ {
+ /* 24XX64 */
+ .has_dev_addr = true,
+ .blk_size = 0x20,
+ .e2_size = 0x2000,
+ },
+ {
+ /* 24XX128 */
+ .has_dev_addr = true,
+ .blk_size = 0x40,
+ .e2_size = 0x4000,
+ },
{
/* 24XX256 */
.has_dev_addr = true,
STATIC_ASSERT(countof(addr_buf) <= sizeof(e2addr_t));
-
/* clamp size to memory limit (otherwise may roll back) */
- ASSERT(idx <= blk->blk_cnt);
+ ASSERT(idx < blk->priv.blk_start + blk->blk_cnt);
size = MIN(size, blk->blk_size - offset);
if (mem_info[eep->type].has_dev_addr)
STATIC_ASSERT(countof(addr_buf) <= sizeof(e2addr_t));
/* clamp size to memory limit (otherwise may roll back) */
- ASSERT(idx <= blk->blk.blk_cnt);
+ ASSERT(idx < blk->blk.priv.blk_start + blk->blk.blk_cnt);
size = MIN(size, blk->blk.blk_size - offset);
e2dev_addr_t dev_addr;