Lines Matching refs:sector_length
136 size_t sector_length; in efx_bootcfg_read() local
139 rc = efx_nvram_size(enp, EFX_NVRAM_BOOTROM_CFG, §or_length); in efx_bootcfg_read()
149 if (sector_length > BOOTCFG_MAX_SIZE) in efx_bootcfg_read()
150 sector_length = BOOTCFG_MAX_SIZE; in efx_bootcfg_read()
151 if (sector_length > size) { in efx_bootcfg_read()
152 EFSYS_KMEM_ALLOC(enp->en_esip, sector_length, payload); in efx_bootcfg_read()
164 (caddr_t)payload, sector_length); in efx_bootcfg_read()
172 rc = efx_bootcfg_verify(enp, (caddr_t)payload, sector_length, in efx_bootcfg_read()
181 EFSYS_ASSERT(used_bytes <= sector_length); in efx_bootcfg_read()
190 if (used_bytes + 1 > sector_length) { in efx_bootcfg_read()
207 if (sector_length > size) { in efx_bootcfg_read()
209 EFSYS_KMEM_FREE(enp->en_esip, sector_length, payload); in efx_bootcfg_read()
231 if (sector_length > size) in efx_bootcfg_read()
232 EFSYS_KMEM_FREE(enp->en_esip, sector_length, payload); in efx_bootcfg_read()
249 size_t sector_length; in efx_bootcfg_write() local
256 rc = efx_nvram_size(enp, EFX_NVRAM_BOOTROM_CFG, §or_length); in efx_bootcfg_write()
260 if (sector_length > BOOTCFG_MAX_SIZE) in efx_bootcfg_write()
261 sector_length = BOOTCFG_MAX_SIZE; in efx_bootcfg_write()
274 if (used_bytes > MIN(sector_length, BOOTCFG_MAX_SIZE)) { in efx_bootcfg_write()
297 for (offset = 0; offset < sector_length; offset += remaining) { in efx_bootcfg_write()
298 remaining = MIN(chunk_length, sector_length - offset); in efx_bootcfg_write()