mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
sfc: Fix MCDI structure field lookup
The least significant bit number (LBN) of a field within an MCDI structure is counted from the start of the structure, not the containing dword. In MCDI_ARRAY_FIELD() we need to mask it rather than using the usual EFX_DWORD_FIELD() macro. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
This commit is contained in:
parent
9724a8504c
commit
0a6e5008a9
1 changed files with 4 additions and 2 deletions
|
@ -113,11 +113,13 @@ extern void efx_mcdi_sensor_event(struct efx_nic *efx, efx_qword_t *ev);
|
|||
#define MCDI_EVENT_FIELD(_ev, _field) \
|
||||
EFX_QWORD_FIELD(_ev, MCDI_EVENT_ ## _field)
|
||||
#define MCDI_ARRAY_FIELD(_buf, _field1, _type, _index, _field2) \
|
||||
EFX_DWORD_FIELD( \
|
||||
EFX_EXTRACT_DWORD( \
|
||||
*((efx_dword_t *) \
|
||||
(MCDI_ARRAY_PTR(_buf, _field1, _type, _index) + \
|
||||
(MC_CMD_ ## _type ## _TYPEDEF_ ## _field2 ## _OFST & ~3))), \
|
||||
MC_CMD_ ## _type ## _TYPEDEF_ ## _field2)
|
||||
MC_CMD_ ## _type ## _TYPEDEF_ ## _field2 ## _LBN & 0x1f, \
|
||||
(MC_CMD_ ## _type ## _TYPEDEF_ ## _field2 ## _LBN & 0x1f) + \
|
||||
MC_CMD_ ## _type ## _TYPEDEF_ ## _field2 ## _WIDTH - 1)
|
||||
|
||||
extern void efx_mcdi_print_fwver(struct efx_nic *efx, char *buf, size_t len);
|
||||
extern int efx_mcdi_drv_attach(struct efx_nic *efx, bool driver_operating,
|
||||
|
|
Loading…
Reference in a new issue