Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/sfxge/common/efx_bootcfg.c
Show First 20 Lines • Show All 355 Lines • ▼ Show 20 Lines | #endif | ||||
if ((rc = efx_nvram_rw_finish(enp, EFX_NVRAM_BOOTROM_CFG, NULL)) != 0) | if ((rc = efx_nvram_rw_finish(enp, EFX_NVRAM_BOOTROM_CFG, NULL)) != 0) | ||||
goto fail7; | goto fail7; | ||||
/* Verify that the area is correctly formatted and checksummed */ | /* Verify that the area is correctly formatted and checksummed */ | ||||
rc = efx_bootcfg_verify(enp, (caddr_t)payload, sector_length, | rc = efx_bootcfg_verify(enp, (caddr_t)payload, sector_length, | ||||
&used_bytes); | &used_bytes); | ||||
if (rc != 0 || used_bytes == 0) { | if (rc != 0 || used_bytes == 0) { | ||||
payload[0] = (uint8_t)~DHCP_END; | payload[0] = (uint8_t)(~DHCP_END & 0xff); | ||||
payload[1] = DHCP_END; | payload[1] = DHCP_END; | ||||
used_bytes = 2; | used_bytes = 2; | ||||
} | } | ||||
EFSYS_ASSERT(used_bytes >= 2); /* checksum and DHCP_END */ | EFSYS_ASSERT(used_bytes >= 2); /* checksum and DHCP_END */ | ||||
EFSYS_ASSERT(used_bytes <= sector_length); | EFSYS_ASSERT(used_bytes <= sector_length); | ||||
/* | /* | ||||
▲ Show 20 Lines • Show All 196 Lines • Show Last 20 Lines |