mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* BUG: Wrong dma queue handling in ixp4 driver
@ 2016-07-19 11:05 Lino Sanfilippo
  2016-07-19 11:31 ` Aw: " Lino Sanfilippo
  0 siblings, 1 reply; 4+ messages in thread
From: Lino Sanfilippo @ 2016-07-19 11:05 UTC (permalink / raw)
  To: khalasa; +Cc: netdev, linux-kernel


Hi,

maybe I miss something, but the ixp4 ethernet driver seems to handle dma pools 
in a wrong way: In init_queues() it creates a dma pool for descriptors and then
 only allocates a single descriptor from this pool. The author seems to assume the whole
table has been allocated already, since after that the complete pool size is zeroed:

<snip> 
static int init_queues(struct port *port)
{
	int i;

	if (!ports_open) {
		dma_pool = dma_pool_create(DRV_NAME, &port->netdev->dev,
					   POOL_ALLOC_SIZE, 32, 0);
		if (!dma_pool)
			return -ENOMEM;
	}

	if (!(port->desc_tab = dma_pool_alloc(dma_pool, GFP_KERNEL,
					      &port->desc_tab_phys)))
		return -ENOMEM;
	memset(port->desc_tab, 0, POOL_ALLOC_SIZE);
<snap>

Regards,
Lino

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

end of thread, other threads:[~2016-07-22 11:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-19 11:05 BUG: Wrong dma queue handling in ixp4 driver Lino Sanfilippo
2016-07-19 11:31 ` Aw: " Lino Sanfilippo
2016-07-22 10:14   ` Krzysztof Hałasa
2016-07-22 11:10     ` Aw: " Lino Sanfilippo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome