dmaengine: ioat: remove unnesesery double complition timer modification.
removing unnecessary mod_timer from timeout handler incase of ioat_cleanup_preamble() is true for cleaner code Acked-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Leonid Ravich <Leonid.Ravich@emc.com> Link: https://lore.kernel.org/r/1587589761-32690-2-git-send-email-leonid.ravich@dell.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
5a87c506ed
commit
2baedcb6a6
@ -922,17 +922,23 @@ void ioat_timer_event(struct timer_list *t)
|
|||||||
spin_lock_bh(&ioat_chan->prep_lock);
|
spin_lock_bh(&ioat_chan->prep_lock);
|
||||||
check_active(ioat_chan);
|
check_active(ioat_chan);
|
||||||
spin_unlock_bh(&ioat_chan->prep_lock);
|
spin_unlock_bh(&ioat_chan->prep_lock);
|
||||||
spin_unlock_bh(&ioat_chan->cleanup_lock);
|
goto unlock_out;
|
||||||
return;
|
}
|
||||||
|
|
||||||
|
/* handle the missed cleanup case */
|
||||||
|
if (ioat_cleanup_preamble(ioat_chan, &phys_complete)) {
|
||||||
|
/* timer restarted in ioat_cleanup_preamble
|
||||||
|
* and IOAT_COMPLETION_ACK cleared
|
||||||
|
*/
|
||||||
|
__cleanup(ioat_chan, phys_complete);
|
||||||
|
goto unlock_out;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if we haven't made progress and we have already
|
/* if we haven't made progress and we have already
|
||||||
* acknowledged a pending completion once, then be more
|
* acknowledged a pending completion once, then be more
|
||||||
* forceful with a restart
|
* forceful with a restart
|
||||||
*/
|
*/
|
||||||
if (ioat_cleanup_preamble(ioat_chan, &phys_complete))
|
if (test_bit(IOAT_COMPLETION_ACK, &ioat_chan->state)) {
|
||||||
__cleanup(ioat_chan, phys_complete);
|
|
||||||
else if (test_bit(IOAT_COMPLETION_ACK, &ioat_chan->state)) {
|
|
||||||
u32 chanerr;
|
u32 chanerr;
|
||||||
|
|
||||||
chanerr = readl(ioat_chan->reg_base + IOAT_CHANERR_OFFSET);
|
chanerr = readl(ioat_chan->reg_base + IOAT_CHANERR_OFFSET);
|
||||||
@ -945,12 +951,13 @@ void ioat_timer_event(struct timer_list *t)
|
|||||||
ioat_ring_active(ioat_chan));
|
ioat_ring_active(ioat_chan));
|
||||||
|
|
||||||
ioat_reboot_chan(ioat_chan);
|
ioat_reboot_chan(ioat_chan);
|
||||||
spin_unlock_bh(&ioat_chan->cleanup_lock);
|
|
||||||
return;
|
|
||||||
} else
|
|
||||||
set_bit(IOAT_COMPLETION_ACK, &ioat_chan->state);
|
|
||||||
|
|
||||||
|
goto unlock_out;
|
||||||
|
}
|
||||||
|
|
||||||
|
set_bit(IOAT_COMPLETION_ACK, &ioat_chan->state);
|
||||||
mod_timer(&ioat_chan->timer, jiffies + COMPLETION_TIMEOUT);
|
mod_timer(&ioat_chan->timer, jiffies + COMPLETION_TIMEOUT);
|
||||||
|
unlock_out:
|
||||||
spin_unlock_bh(&ioat_chan->cleanup_lock);
|
spin_unlock_bh(&ioat_chan->cleanup_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user