mpt2sas: Refcount fw_events and fix unsafe list usage
The fw_event_work struct is concurrently referenced at shutdown, so
add a refcount to protect it, and refactor the code to use it.
Additionally, refactor _scsih_fw_event_cleanup_queue() such that it
no longer iterates over the list without holding the lock, since
_firmware_event_work() concurrently deletes items from the list.
Signed-off-by: Calvin Owens <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Nicholas Bellinger <[email protected]>
Tested-by: Chaitra Basappa <[email protected]>
Acked-by: Sreekanth Reddy <[email protected]>
Signed-off-by: James Bottomley <[email protected]>