Patch "qlcnic: Remove unnecessary usage of atomic_t" has been added to the 4.5-stable tree
This is a note to let you know that I've just added the patch titled
qlcnic: Remove unnecessary usage of atomic_t
to the 4.5-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
qlcnic-remove-unnecessary-usage-of-atomic_t.patch
and it can be found in the queue-4.5 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Sat Apr 16 09:15:18 PDT 2016
From: Rajesh Borundia <[email protected]>
Date: Tue, 8 Mar 2016 02:39:57 -0500
Subject: qlcnic: Remove unnecessary usage of atomic_t
From: Rajesh Borundia <[email protected]>
[ Upstream commit 5bf93251cee1fb66141d1d2eaff86e04a9397bdf ]
o atomic_t usage is incorrect as we are not implementing any atomicity.
--- drivers/net/ethernet/qlogic/qlcnic/qlcnic.h | 2 +- drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-)
drivers/net/ethernet/qlogic/qlcnic/qlcnic.h +1 -1
@@ -1099,7 +1099,7 @@ struct qlcnic_mailbox {unsigned long status;spinlock_t queue_lock;/* Mailbox queue lock */ spinlock_t aen_lock;/* Mailbox response/AEN lock */ -atomic_t rsp_status; +u32 rsp_status;u32 num_cmds; };
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c +4 -5
@@ -491,7 +491,7 @@ irqreturn_t qlcnic_83xx_clear_legacy_intstatic inline void qlcnic_83xx_notify_mbx_response (struct qlcnic_mailbox *mbx) { -atomic_set (&mbx->rsp_status,QLC_83XX_MBX_RESPONSE_ARRIVED ); + mbx->rsp_status =QLC_83XX_MBX_RESPONSE_ARRIVED ;complete (&mbx->completion); }
@@ -510,7 +510,7 @@ static void qlcnic_83xx_poll_process_aenif (event &QLCNIC_MBX_ASYNC_EVENT ) {__qlcnic_83xx_process_aen (adapter); }else { -if (atomic_read (&mbx->rsp_status) != rsp_status) +if (mbx->rsp_status != rsp_status)qlcnic_83xx_notify_mbx_response (mbx); } out:
@@ -1023,7 +1023,7 @@ static void qlcnic_83xx_process_aen(struif (event &QLCNIC_MBX_ASYNC_EVENT ) {__qlcnic_83xx_process_aen (adapter); }else { -if (atomic_read (&mbx->rsp_status) != rsp_status) +if (mbx->rsp_status != rsp_status)qlcnic_83xx_notify_mbx_response (mbx); } }
@@ -4050,7 +4050,6 @@ static void qlcnic_83xx_mailbox_worker(sstruct qlcnic_adapter *adapter = mbx->adapter;const struct qlcnic_mbx_ops *mbx_ops = mbx->ops;struct device *dev = &adapter->pdev->dev; -atomic_t *rsp_status = &mbx->rsp_status;struct list_head *head = &mbx->cmd_q;struct qlcnic_hardware_context *ahw;struct qlcnic_cmd_args *cmd =NULL ;
@@ -4063,7 +4062,7 @@ static void qlcnic_83xx_mailbox_worker(sreturn ; } -atomic_set (rsp_status,QLC_83XX_MBX_RESPONSE_WAIT ); + mbx->rsp_status =QLC_83XX_MBX_RESPONSE_WAIT ;spin_lock (&mbx->queue_lock);
Patches currently in stable-queue which might be from [email protected] are
queue-4.5/qlcnic-remove-unnecessary-usage-of-atomic_t.patch queue-4.5/qlcnic-fix-mailbox-completion-handling-during-spurious-interrupt.patch