From: =?utf-8?Q?Bj=C3=B8rn_Mork?= Subject: Re: [PATCH 0/3]: net: dsa: mt7530: support MT7530 in the MT7621 SoC Date: Mon, 03 Dec 2018 12:34:23 +0100 Message-ID: <87k1kqlu80.fsf@miraculix.mork.no> References: <20181130075737.8041-1-gerg@kernel.org> <87r2f2pxpa.fsf@miraculix.mork.no> <0ef5a725-a88a-0a6e-1a69-9106cead6b65@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: sean.wang@mediatek.com, andrew@lunn.ch, vivien.didelot@savoirfairelinux.com, f.fainelli@gmail.com, netdev@vger.kernel.org, John Crispin , neil@brown.name, =?utf-8?Q?Ren=C3=A9?= van Dorst To: Greg Ungerer Return-path: Received: from canardo.mork.no ([148.122.252.1]:48717 "EHLO canardo.mork.no" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726146AbeLCLgd (ORCPT ); Mon, 3 Dec 2018 06:36:33 -0500 In-Reply-To: <0ef5a725-a88a-0a6e-1a69-9106cead6b65@kernel.org> (Greg Ungerer's message of "Mon, 3 Dec 2018 17:20:10 +1000") Sender: netdev-owner@vger.kernel.org List-ID: [ fixed Johns address - the openwrt.org email was apparently never restored= ? ] Greg Ungerer writes: > The following change helped alot, but I still get some problems under > sustained load and some types of port setups. Still trying to figure > out what exactly is going on. > > --- a/linux/drivers/net/ethernet/mediatek/mtk_eth_soc.c > +++ b/linux/drivers/net/ethernet/mediatek/mtk_eth_soc.c > @@ -1750,8 +1750,8 @@ static irqreturn_t mtk_handle_irq_rx(int irq, void = *_eth) > if (likely(napi_schedule_prep(ð->rx_napi))) { > __napi_schedule(ð->rx_napi); > - mtk_rx_irq_disable(eth, MTK_RX_DONE_INT); > } > + mtk_rx_irq_disable(eth, MTK_RX_DONE_INT); > return IRQ_HANDLED; > } > @@ -1762,11 +1762,53 @@ static irqreturn_t mtk_handle_irq_tx(int irq, voi= d *_eth) > if (likely(napi_schedule_prep(ð->tx_napi))) { > __napi_schedule(ð->tx_napi); > - mtk_tx_irq_disable(eth, MTK_TX_DONE_INT); > } > + mtk_tx_irq_disable(eth, MTK_TX_DONE_INT); > return IRQ_HANDLED; > } Yes, sorry I didn't point to that as well. Just to be clear: I have no clue how this thing is actually wired up, or if you could use three interrupts on the MT7621 too. I just messed with it until I got something to work, based on Ren=C3=A9s original idea and code. > Anyway, this really looks like the right approach to me. This driver is > clearly capable of supporting the mt7621 ethernet ports. No need for the > staging driver. Great! Thanks for doing this. I did make a feeble attempt at testing this with current mainline myself, but the only MT7621 board I have is using NAND flash. So I started trying to forward port the mtk-nand2 driver from OpenWrt. And failed. Probably a simple mixup while trying to adjust to the many changes in the raw NAND API between v4.14 and v.4.20. Then I optimistically attempted to use the mainline mtk-nand driver instead, assuming it would be as simple as with the mtk-eth driver. Which it wasn't, of course. I guess there are a lot of things I do not understand wrt flash and HW ECC etc... Short version: I won't be able to test the mainline mtk-eth driver with MT7621 on newer kernels before smarter people like John upgrade the OpenWrt kernel. Bj=C3=B8rn