IOMMU Archive on lore.kernel.org
 help / color / Atom feed
* regression in ath10k dma allocation
@ 2019-08-16 16:08 Tobias Klausmann
  2019-08-16 16:43 ` Christoph Hellwig
  0 siblings, 1 reply; 14+ messages in thread
From: Tobias Klausmann @ 2019-08-16 16:08 UTC (permalink / raw)
  To: kvalo, davem, ath10k, linux-wireless, netdev, linux-kernel,
	nicoleotsuka, hch, m.szyprowski, robin.murphy, iommu
  Cc: tobias.klausmann

Hello all,

within the current development cycle i noted the ath10k driver failing 
to setup:

[    3.185660] ath10k_pci 0000:02:00.0: failed to alloc CE dest ring 1: -12
[    3.185664] ath10k_pci 0000:02:00.0: failed to allocate copy engine 
pipe 1: -12
[    3.185667] ath10k_pci 0000:02:00.0: failed to allocate copy engine 
pipes: -12
[    3.185669] ath10k_pci 0000:02:00.0: failed to setup resource: -12
[    3.185692] ath10k_pci: probe of 0000:02:00.0 failed with error -12

the actual failure comes from [1] and indeed bisecting brought me to a 
related commit "dma-contiguous: add dma_{alloc,free}_contiguous() 
helpers" [2]. Reverting the commit fixes the problem, yet this might 
just be the driver abusing the dma infrastructure, so hopefully someone 
can have a look at it, as i'm not familiar with the code!


[1]: 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/wireless/ath/ath10k/ce.c?h=v5.3-rc4#n1650

[2]: 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b1d2dc009dece4cd7e629419b52266ba51960a6b


Greetings,

Tobias

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

^ permalink raw reply	[flat|nested] 14+ messages in thread
* Re: regression in ath10k dma allocation
@ 2019-08-20  2:29 Hillf Danton
  0 siblings, 0 replies; 14+ messages in thread
From: Hillf Danton @ 2019-08-20  2:29 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: netdev, linux-wireless, linux-kernel, ath10k, Nicolin Chen,
	iommu, tobias.klausmann, Tobias Klausmann, robin.murphy, davem,
	kvalo


On Tue, 20 Aug 2019 10:15:01 +0800 Christoph Hellwig wrote:
> On Mon, Aug 19, 2019 at 06:58:52PM -0700, Nicolin Chen wrote:
> > Right...the condition was in-between. However, not every caller
> > of dma_alloc_contiguous() is supposed to have a coherent check.
> > So we either add a 'bool coherent_ok' to the API or revert the
> > dma-direct part back to the original. Probably former option is
> > better?
> >
> > Thank you for the debugging. I have been a bit distracted, may
> > not be able to submit a fix very soon. Would you like to help?
> 
> Yeah, it turns out that while the idea for the dma_alloc_contiguous
> helper was neat it didn't work out at all, and me pushing Nicolin
> down that route was not a very smart idea.  Sorry for causing this
> mess.
> 
> I think we'll just need to open code it for dma-direct for 5.3.
> Hillf do you want to cook up a patch or should I do it?

Feel free to do that, Sir.

Thanks
Hillf

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, back to index

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-16 16:08 regression in ath10k dma allocation Tobias Klausmann
2019-08-16 16:43 ` Christoph Hellwig
2019-08-16 20:16   ` Tobias Klausmann
2019-08-16 22:25     ` Nicolin Chen
2019-08-16 22:42       ` Tobias Klausmann
2019-08-18  3:13       ` Hillf Danton
2019-08-18 22:38         ` Tobias Klausmann
2019-08-20  1:58           ` Nicolin Chen
2019-08-20  2:14             ` Christoph Hellwig
2019-08-20  3:05           ` Christoph Hellwig
2019-08-20  6:58           ` Hillf Danton
2019-08-20  7:12             ` Christoph Hellwig
2019-08-20 20:24               ` Tobias Klausmann
2019-08-20  2:29 Hillf Danton

IOMMU Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-iommu/0 linux-iommu/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-iommu linux-iommu/ https://lore.kernel.org/linux-iommu \
		iommu@lists.linux-foundation.org
	public-inbox-index linux-iommu

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.linux-foundation.lists.iommu


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git