Commit 12a26d08 authored by Mark Haverkamp's avatar Mark Haverkamp Committed by James Bottomley

[SCSI] aacraid: aif registration timeout fix

Received from Mark Salyzyn from Adaptec:

If the Adapter is quiet and does not produce an AIF event packets to be
picked up by the management applications for longer than the timeout
interval of two minutes, the cleanup code that deals with aging out
registrants could erroneously drop the registration. The timeout is
there to clean up should the management application die and fail to poll
for updated AIF event packets.

Moving the timer update from the ioctl code that delivers an AIF to the
polling registrant to the bottom of the ioctl means the timeout is reset
with any management application polling activity regardless if an AIF is
delivered or not removing the erroneous timeout cleanups.
Signed-off-by: default avatarMark Haverkamp <markh@osdl.org>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent e53cb35a
...@@ -287,7 +287,6 @@ return_fib: ...@@ -287,7 +287,6 @@ return_fib:
kfree(fib->hw_fib); kfree(fib->hw_fib);
kfree(fib); kfree(fib);
status = 0; status = 0;
fibctx->jiffies = jiffies/HZ;
} else { } else {
spin_unlock_irqrestore(&dev->fib_lock, flags); spin_unlock_irqrestore(&dev->fib_lock, flags);
if (f.wait) { if (f.wait) {
...@@ -302,6 +301,7 @@ return_fib: ...@@ -302,6 +301,7 @@ return_fib:
status = -EAGAIN; status = -EAGAIN;
} }
} }
fibctx->jiffies = jiffies/HZ;
return status; return status;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment