mirror of
https://github.com/AuxXxilium/synology-igc.git
synced 2024-11-23 15:01:06 +07:00
igc: Fix infinite loop in release_swfw_sync
backport from 907862e9ae
Signed-off-by: Jim Ma <majinjing3@gmail.com>
This commit is contained in:
parent
8637c18ef5
commit
e52503cd8f
11
igc_i225.c
11
igc_i225.c
@ -156,8 +156,15 @@ void igc_release_swfw_sync_i225(struct igc_hw *hw, u16 mask)
|
||||
{
|
||||
u32 swfw_sync;
|
||||
|
||||
while (igc_get_hw_semaphore_i225(hw))
|
||||
; /* Empty */
|
||||
/* Releasing the resource requires first getting the HW semaphore.
|
||||
* If we fail to get the semaphore, there is nothing we can do,
|
||||
* except log an error and quit. We are not allowed to hang here
|
||||
* indefinitely, as it may cause denial of service or system crash.
|
||||
*/
|
||||
if (igc_get_hw_semaphore_i225(hw)) {
|
||||
hw_dbg("Failed to release SW_FW_SYNC.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
swfw_sync = rd32(IGC_SW_FW_SYNC);
|
||||
swfw_sync &= ~mask;
|
||||
|
Loading…
Reference in New Issue
Block a user