/* To prevent lock contention we defer cleanup when the locks are contended with a terminal timeout that forces cleanup and catches completion notification errors.  */
static void ioat1_cleanup(struct ioat_dma_chan *ioat)
/* To prevent lock contention we defer cleanup when the locks are contended with a terminal timeout that forces cleanup and catches completion notification errors.  */
static void ioat1_cleanup(struct ioat_dma_chan *ioat)
{
	struct ioat_chan_common *chan = &ioat->base;
	unsigned long phys_complete;
	prefetch(chan->completion);
	if (!spin_trylock_bh(&chan->cleanup_lock))
		return;
	if (!ioat_cleanup_preamble(chan, &phys_complete)) {
		spin_unlock_bh(&chan->cleanup_lock);
		return;
	}
	if (!spin_trylock_bh(&ioat->desc_lock)) {
		spin_unlock_bh(&chan->cleanup_lock);
		return;
	}
	__cleanup(ioat, phys_complete);
	spin_unlock_bh(&ioat->desc_lock);
	spin_unlock_bh(&chan->cleanup_lock);
}