Lines Matching refs:snip
40 sfxge_nvram_rw(sfxge_t *sp, sfxge_nvram_ioc_t *snip, efx_nvram_type_t type, in sfxge_nvram_rw() argument
55 while (snip->sni_size) { in sfxge_nvram_rw()
56 size_t len = MIN(chunk_size, snip->sni_size); in sfxge_nvram_rw()
57 caddr_t buf = (caddr_t)(&snip->sni_data[off]); in sfxge_nvram_rw()
59 if ((rc = op(enp, type, snip->sni_offset + off, buf, len)) != 0) in sfxge_nvram_rw()
62 snip->sni_size -= len; in sfxge_nvram_rw()
79 sfxge_nvram_erase(sfxge_t *sp, sfxge_nvram_ioc_t *snip, efx_nvram_type_t type) in sfxge_nvram_erase() argument
84 _NOTE(ARGUNUSED(snip)); in sfxge_nvram_erase()
104 sfxge_nvram_ioctl(sfxge_t *sp, sfxge_nvram_ioc_t *snip) in sfxge_nvram_ioctl() argument
110 switch (snip->sni_type) { in sfxge_nvram_ioctl()
122 if (snip->sni_op == SFXGE_NVRAM_OP_WRITE || in sfxge_nvram_ioctl()
123 snip->sni_op == SFXGE_NVRAM_OP_ERASE || in sfxge_nvram_ioctl()
124 snip->sni_op == SFXGE_NVRAM_OP_SET_VER) { in sfxge_nvram_ioctl()
155 if (snip->sni_size > sizeof (snip->sni_data)) { in sfxge_nvram_ioctl()
160 switch (snip->sni_op) { in sfxge_nvram_ioctl()
166 snip->sni_size = (uint32_t)size; in sfxge_nvram_ioctl()
170 if ((rc = sfxge_nvram_rw(sp, snip, type, B_FALSE)) != 0) in sfxge_nvram_ioctl()
174 if ((rc = sfxge_nvram_rw(sp, snip, type, B_TRUE)) != 0) in sfxge_nvram_ioctl()
178 if ((rc = sfxge_nvram_erase(sp, snip, type)) != 0) in sfxge_nvram_ioctl()
182 if ((rc = efx_nvram_get_version(enp, type, &snip->sni_subtype, in sfxge_nvram_ioctl()
183 &snip->sni_version[0])) != 0) in sfxge_nvram_ioctl()
188 &snip->sni_version[0])) != 0) in sfxge_nvram_ioctl()