scsi: mpt3sas: Add persistent trigger pages support
The user can set trigger values in order to collect the IOC's host trace
buffer automatically upon detecting certain conditions. However, the
trigger values that the user sets are not persistent across system reboot
or reload of the driver.
In order to make the user trigger settings persistent, these trigger values
need to be saved in the IOC's NVRAM pages:
- Driver Persistent Trigger Page 0:
This page is used to store list of trigger types that are enabled
- Driver Persistent Trigger Page 1:
This page stores the list of Master triggers that are enabled
- Driver Persistent Trigger Page 2:
This page stores the list of MPI Event Triggers that are enabled
- Driver Persistent Trigger Page 3:
This page stores the list of SCSI Sense Triggers that are enabled
- Driver Persistent Trigger Page 4:
This page stores the list of IOCStatus-LogInfo Triggers that are
enabled.
Whenever user configures triggers, the driver persists the values in the
corresponding trigger pages. When the driver is subsequently reloaded, the
driver reads the values from the trigger pages and configures the triggers
accordingly.
During firmware upload operation, if the newer firmware supports the
trigger page feature, then driver persists the configured diag trigger
values to NVRAM.
Link: https://lore.kernel.org/r/20201126094311.8686-3-suganath-prabu.subramani@broadcom.com
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Suganath Prabu S <suganath-prabu.subramani@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>