From: "Dmitry Kravkov" <redacted>
Date: Tue, 6 Aug 2013 00:35:40 +0300
Add locking to protect different statistics flows from
running simultaneously.
This in order to serialize statistics requests sent to FW,
otherwise two outstanding queries may cause FW assert.
Signed-off-by: Dmitry Kravkov <redacted>
Signed-off-by: Ariel Elior <redacted>
Signed-off-by: Eilon Greenstein <redacted>
Please do not reinvent the wheel, use a standard semaphore
and down_timeout().
Anytime you feel that you have to implement your own fancy locking
primitives, you are doing it wrong.