Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F143312707
D4353.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D4353.diff
View Options
Index: head/sys/dev/sfxge/common/efx_impl.h
===================================================================
--- head/sys/dev/sfxge/common/efx_impl.h
+++ head/sys/dev/sfxge/common/efx_impl.h
@@ -536,7 +536,8 @@
__in uint32_t partn,
__out_opt size_t *sizep,
__out_opt uint32_t *addressp,
- __out_opt uint32_t *erase_sizep);
+ __out_opt uint32_t *erase_sizep,
+ __out_opt uint32_t *write_sizep);
__checkReturn efx_rc_t
efx_mcdi_nvram_update_start(
Index: head/sys/dev/sfxge/common/efx_nvram.c
===================================================================
--- head/sys/dev/sfxge/common/efx_nvram.c
+++ head/sys/dev/sfxge/common/efx_nvram.c
@@ -567,10 +567,11 @@
__in uint32_t partn,
__out_opt size_t *sizep,
__out_opt uint32_t *addressp,
- __out_opt uint32_t *erase_sizep)
+ __out_opt uint32_t *erase_sizep,
+ __out_opt uint32_t *write_sizep)
{
uint8_t payload[MAX(MC_CMD_NVRAM_INFO_IN_LEN,
- MC_CMD_NVRAM_INFO_OUT_LEN)];
+ MC_CMD_NVRAM_INFO_V2_OUT_LEN)];
efx_mcdi_req_t req;
efx_rc_t rc;
@@ -579,7 +580,7 @@
req.emr_in_buf = payload;
req.emr_in_length = MC_CMD_NVRAM_INFO_IN_LEN;
req.emr_out_buf = payload;
- req.emr_out_length = MC_CMD_NVRAM_INFO_OUT_LEN;
+ req.emr_out_length = MC_CMD_NVRAM_INFO_V2_OUT_LEN;
MCDI_IN_SET_DWORD(req, NVRAM_INFO_IN_TYPE, partn);
@@ -604,6 +605,13 @@
if (erase_sizep)
*erase_sizep = MCDI_OUT_DWORD(req, NVRAM_INFO_OUT_ERASESIZE);
+ if (write_sizep) {
+ *write_sizep =
+ (req.emr_out_length_used <
+ MC_CMD_NVRAM_INFO_V2_OUT_LEN) ?
+ 0 : MCDI_OUT_DWORD(req, NVRAM_INFO_V2_OUT_WRITESIZE);
+ }
+
return (0);
fail2:
Index: head/sys/dev/sfxge/common/hunt_nvram.c
===================================================================
--- head/sys/dev/sfxge/common/hunt_nvram.c
+++ head/sys/dev/sfxge/common/hunt_nvram.c
@@ -1295,7 +1295,8 @@
{
efx_rc_t rc;
- if ((rc = efx_mcdi_nvram_info(enp, partn, sizep, NULL, NULL)) != 0)
+ if ((rc = efx_mcdi_nvram_info(enp, partn, sizep,
+ NULL, NULL, NULL)) != 0)
goto fail1;
return (0);
Index: head/sys/dev/sfxge/common/hunt_vpd.c
===================================================================
--- head/sys/dev/sfxge/common/hunt_vpd.c
+++ head/sys/dev/sfxge/common/hunt_vpd.c
@@ -113,7 +113,7 @@
* which is the size of the DYNAMIC_CONFIG partition.
*/
if ((rc = efx_mcdi_nvram_info(enp, NVRAM_PARTITION_TYPE_DYNAMIC_CONFIG,
- sizep, NULL, NULL)) != 0)
+ sizep, NULL, NULL, NULL)) != 0)
goto fail1;
return (0);
Index: head/sys/dev/sfxge/common/siena_nvram.c
===================================================================
--- head/sys/dev/sfxge/common/siena_nvram.c
+++ head/sys/dev/sfxge/common/siena_nvram.c
@@ -54,7 +54,8 @@
goto fail1;
}
- if ((rc = efx_mcdi_nvram_info(enp, partn, sizep, NULL, NULL)) != 0) {
+ if ((rc = efx_mcdi_nvram_info(enp, partn, sizep,
+ NULL, NULL, NULL)) != 0) {
goto fail2;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 29, 6:53 PM (8 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28088667
Default Alt Text
D4353.diff (2 KB)
Attached To
Mode
D4353: sfxge: add additional WRITESIZE value for NVRAM_INFO command
Attached
Detach File
Event Timeline
Log In to Comment