nvmesensor: Update MTU and frequency for MI ports
This CL adds the support to change the local and remote MTU
to maximum supported by the endpoint. Also, change the frequency to
400kHz. The CL performs the following steps in order:
1. setup MCTP ep
2. open nvme EP
3. read mi_data_structure_subsys_info to find Number of Ports
4. iterate the mi_data_structure_port_info to find SMBus Port
5. nvme_mi_mi_config_get_smbus_freq() to find max supported frequency
6. nvme_mi_mi_config_set_smbus_freq() change freq to 400kHz (if not)
7. nvme_mi_mi_config_set_mctp_mtu() change MTU to maximum supported
8. miConfigureLocalRouteMtu() change local route MTU
Tested:
https://paste.googleplex.com/6307677318676480
Change-Id: I256a433f530730895cd5727040cdd15732dbebe5
Signed-off-by: Muhammad Usama <muhammadusama@google.com>
2 files changed