On Mon, May 14 2018, Kamal Heib wrote: > Remove unused variable 'condition' which was set but not used. > > Signed-off-by: Kamal Heib <kamalheib1@xxxxxxxxx> Reviewed-by: NeilBrown <neil@xxxxxxxxxx> This is the same patch as Commit: f03b06f3bae8 ("net: ethernet: mediatek: remove useless code in mtk_poll_tx()") which applies to drivers/net/ethernet/mediatek/mtk_eth_soc.c It would be really good to migrate the staging driver to be close to the main line drivers so that the differences become obvious. My understanding is that the mainline driver is written/tested for ARM SOCs, and the staging driver works on (nearly) the same ethernet controller in MIPS SOCs. One difference that I noticed is that in the ARM there appear to be separate interrupts for send and receive. In the MIPS there is just one. Also the MIPS driver has both "pdma" (paged DMA I think) and "qdma" (which might be quick DMA). The ARM only has qdma. I couldn't make the MIPS work with qdma, though I didn't try very hard. John Crispin wrote: There are 2 types of DMA engine, PDMA and the newer QDMA. PDMA uses a typical ring buffer while QDMA uses a linked list. Unfortunatley we have the MT7621 which has a few silicon issues. Due to these issues we need to PDMA for RX and QDMA for TX. All SoCs newer than the MT7621 can can run on QDMA exclusively. so we would eventually need to add PDMA to the mainline driver, but and make the QDMA in the staging drive looks exactly like the QDMA in th mainline driver. The other issue here is interfacing with drivers/net/dsa/mt7530.c That might not be difficult, but I haven't had a chance to look at the code yet. Thanks for your contributions and anything else you might contribute in any of these areas. NeilBrown > --- > drivers/staging/mt7621-eth/mtk_eth_soc.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/drivers/staging/mt7621-eth/mtk_eth_soc.c b/drivers/staging/mt7621-eth/mtk_eth_soc.c > index 86209b3d0a0e..2c7a2e666bfb 100644 > --- a/drivers/staging/mt7621-eth/mtk_eth_soc.c > +++ b/drivers/staging/mt7621-eth/mtk_eth_soc.c > @@ -1194,7 +1194,6 @@ static int mtk_qdma_tx_poll(struct mtk_eth *eth, int budget, bool *tx_again) > int total = 0, done[MTK_MAX_DEVS]; > unsigned int bytes[MTK_MAX_DEVS]; > u32 cpu, dma; > - static int condition; > int i; > > memset(done, 0, sizeof(done)); > @@ -1219,10 +1218,8 @@ static int mtk_qdma_tx_poll(struct mtk_eth *eth, int budget, bool *tx_again) > > tx_buf = mtk_desc_to_tx_buf(ring, desc); > skb = tx_buf->skb; > - if (!skb) { > - condition = 1; > + if (!skb) > break; > - } > > if (skb != (struct sk_buff *)DMA_DUMMY_DESC) { > bytes[mac] += skb->len; > -- > 2.14.3
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel