opnsense-src/sys/dev/mpr
Mariusz Zaborski 0d87082b2e mpr: fix copying of event_mask
Before the commit 6cc44223cb6717795afdac4348bbe7e2a968a07d the
field event_mask was fully copied to the EventMasks field.
After this commit the event_mask (uint8_t) is 4 times casted to
EventMask (uint32_t). Because of that 24 bits of each event_mask array
is lost.

This commits brings back simple copying of field, and after words
converting 32 bits field to the requested endian.

I don't think we need more sophisticated method,
as the array is of size 4 (for 32 bits version).

Reviewed by:	imp
MFC after:	1 week
Sponsored by:	Klara Inc.
Differential Revision:	https://reviews.freebsd.org/D39562

(cherry picked from commit ea6597c38c)
(cherry picked from commit e7a3a08febd01c95b74185bb971ec29cca64b8e1)

Approved by:	so
Security:	FreeBSD-EN-23:07.mpr
2023-06-21 09:59:33 +02:00
..
mpi mpr: clean up empty lines in .c and .h files 2020-09-01 22:07:12 +00:00
mpr.c mpr: fix copying of event_mask 2023-06-21 09:59:33 +02:00
mpr_config.c mps/mpr: Add missing newlines in error messages. 2022-03-01 21:39:10 -05:00
mpr_ioctl.h mpr: clean up empty lines in .c and .h files 2020-09-01 22:07:12 +00:00
mpr_mapping.c mpr/mps(4): Make device mapping some more robust. 2021-05-24 10:43:39 -04:00
mpr_mapping.h Update copyright information 2018-12-26 10:43:31 +00:00
mpr_pci.c Refine the busdma template interface. Provide tools for filling in fields 2020-09-14 05:58:12 +00:00
mpr_sas.c Fix "set but not used" warnings in the mpr driver. This fixes a minor 2022-01-06 14:08:50 -05:00
mpr_sas.h mpr(4): Handle mprsas_alloc_tm() errors on device removal. 2021-09-02 20:35:27 -04:00
mpr_sas_lsi.c mps/mpr: Add missing newlines in error messages. 2022-03-01 21:39:10 -05:00
mpr_table.c Fix "set but not used" warnings in the mpr driver. This fixes a minor 2022-01-06 14:08:50 -05:00
mpr_table.h Convert some in-line printing of diagnostic into tables. 2017-09-09 22:02:36 +00:00
mpr_user.c mpr/mps/mpt: verify cfg page ioctl lengths 2022-04-04 12:24:05 -04:00
mprvar.h mpr(4): Handle mprsas_alloc_tm() errors on device removal. 2021-09-02 20:35:27 -04:00