Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147834265
D4896.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D4896.diff
View Options
Index: head/sys/dev/sfxge/common/hunt_nic.c
===================================================================
--- head/sys/dev/sfxge/common/hunt_nic.c
+++ head/sys/dev/sfxge/common/hunt_nic.c
@@ -426,11 +426,12 @@
static __checkReturn efx_rc_t
efx_mcdi_get_capabilities(
__in efx_nic_t *enp,
- __out efx_dword_t *flagsp)
+ __out efx_dword_t *flagsp,
+ __out efx_dword_t *flags2p)
{
efx_mcdi_req_t req;
uint8_t payload[MAX(MC_CMD_GET_CAPABILITIES_IN_LEN,
- MC_CMD_GET_CAPABILITIES_OUT_LEN)];
+ MC_CMD_GET_CAPABILITIES_V2_OUT_LEN)];
efx_rc_t rc;
(void) memset(payload, 0, sizeof (payload));
@@ -438,7 +439,7 @@
req.emr_in_buf = payload;
req.emr_in_length = MC_CMD_GET_CAPABILITIES_IN_LEN;
req.emr_out_buf = payload;
- req.emr_out_length = MC_CMD_GET_CAPABILITIES_OUT_LEN;
+ req.emr_out_length = MC_CMD_GET_CAPABILITIES_V2_OUT_LEN;
efx_mcdi_execute(enp, &req);
@@ -454,6 +455,12 @@
*flagsp = *MCDI_OUT2(req, efx_dword_t, GET_CAPABILITIES_OUT_FLAGS1);
+ if (req.emr_out_length_used < MC_CMD_GET_CAPABILITIES_V2_OUT_LEN)
+ EFX_ZERO_DWORD(*flags2p);
+ else
+ *flags2p = *MCDI_OUT2(req, efx_dword_t,
+ GET_CAPABILITIES_V2_OUT_FLAGS2);
+
return (0);
fail2:
@@ -887,9 +894,11 @@
{
efx_nic_cfg_t *encp = &(enp->en_nic_cfg);
efx_dword_t datapath_capabilities;
+ efx_dword_t datapath_capabilities_v2;
efx_rc_t rc;
- if ((rc = efx_mcdi_get_capabilities(enp, &datapath_capabilities)) != 0)
+ if ((rc = efx_mcdi_get_capabilities(enp, &datapath_capabilities,
+ &datapath_capabilities_v2)) != 0)
goto fail1;
/*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 15, 1:08 AM (9 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29695353
Default Alt Text
D4896.diff (1 KB)
Attached To
Mode
D4896: sfxge: support MC_CMD_GET_CAPABILITIES_V2
Attached
Detach File
Event Timeline
Log In to Comment