[PATCH v2 net-next 04/15] net: ethernet: mtk_eth_soc: add txd_size to mtk_soc_data

Lorenzo Bianconi lorenzo at kernel.org
Wed May 18 01:29:48 PDT 2022


> On Mon, 16 May 2022 18:06:31 +0200 Lorenzo Bianconi wrote:
> >  	eth->scratch_ring = dma_alloc_coherent(eth->dma_dev,
> > -					       cnt * sizeof(struct mtk_tx_dma),
> > +					       cnt * soc->txrx.txd_size,
> >  					       &eth->phy_scratch_ring,
> >  					       GFP_ATOMIC);
> >  	if (unlikely(!eth->scratch_ring))
> >  		return -ENOMEM;
> >  
> > -	eth->scratch_head = kcalloc(cnt, MTK_QDMA_PAGE_SIZE,
> > -				    GFP_KERNEL);
> > +	eth->scratch_head = kcalloc(cnt, MTK_QDMA_PAGE_SIZE, GFP_KERNEL);
> 
> Unrelated, but GFP_ATOMIC right next to GFP_KERNEL caught my attention.

ack, mtk_init_fq_dma() is run by mtk_open() so it is ok to use GFP_KERNEL. I
will fix it in v3.

Regards,
Lorenzo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mediatek/attachments/20220518/fed78c07/attachment.sig>


More information about the Linux-mediatek mailing list