]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
qlcnic: Fix mailbox completion handling during spurious interrupt
authorRajesh Borundia <rajesh.borundia@qlogic.com>
Tue, 8 Mar 2016 07:39:58 +0000 (02:39 -0500)
committerChuck Anderson <chuck.anderson@oracle.com>
Fri, 8 Jul 2016 18:31:22 +0000 (11:31 -0700)
o While the driver is in the middle of a MB completion processing
and it receives a spurious MB interrupt, it is mistaken as a good MB
completion interrupt leading to premature completion of the next MB
request. Fix the driver to guard against this by checking the current
state of MB processing and ignore the spurious interrupt.
Also added a stats counter to record this condition.

Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23711389
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c

index 5ab6a380d1e068d4faedf9a279b7e95843070774..f9640d5ce6baa774d1f980a2c6eb652fc301eab8 100644 (file)
@@ -4057,6 +4057,7 @@ static void qlcnic_83xx_mailbox_worker(struct work_struct *work)
        struct list_head *head = &mbx->cmd_q;
        struct qlcnic_hardware_context *ahw;
        struct qlcnic_cmd_args *cmd = NULL;
+       unsigned long flags;
 
        ahw = adapter->ahw;
 
@@ -4066,7 +4067,9 @@ static void qlcnic_83xx_mailbox_worker(struct work_struct *work)
                        return;
                }
 
+               spin_lock_irqsave(&mbx->aen_lock, flags);
                mbx->rsp_status = QLC_83XX_MBX_RESPONSE_WAIT;
+               spin_unlock_irqrestore(&mbx->aen_lock, flags);
 
                spin_lock(&mbx->queue_lock);