From: Marek Vasut <marex@denx.de>
To: netdev@vger.kernel.org
Cc: Marek Vasut <marex@denx.de>, Andrew Lunn <andrew@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
Lukas Wunner <lukas@wunner.de>, Petr Stetiar <ynezz@true.cz>,
YueHaibing <yuehaibing@huawei.com>
Subject: [PATCH V6 15/20] net: ks8851: Permit overridding interrupt enable register
Date: Sun, 17 May 2020 02:33:49 +0200 [thread overview]
Message-ID: <20200517003354.233373-16-marex@denx.de> (raw)
In-Reply-To: <20200517003354.233373-1-marex@denx.de>
The parallel bus variant does not need to use the TX interrupt at all
as it writes the TX FIFO directly with in .ndo_start_xmit, permit the
drivers to configure the interrupt enable bits.
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: David S. Miller <davem@davemloft.net>
Cc: Lukas Wunner <lukas@wunner.de>
Cc: Petr Stetiar <ynezz@true.cz>
Cc: YueHaibing <yuehaibing@huawei.com>
---
V3: New patch
V4: No change
V5: No change
V6: No change
---
drivers/net/ethernet/micrel/ks8851.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/net/ethernet/micrel/ks8851.c b/drivers/net/ethernet/micrel/ks8851.c
index 458c86903ac0..baf424f9893b 100644
--- a/drivers/net/ethernet/micrel/ks8851.c
+++ b/drivers/net/ethernet/micrel/ks8851.c
@@ -859,17 +859,8 @@ static int ks8851_net_open(struct net_device *dev)
ks8851_wrreg16(ks, KS_RXQCR, ks->rc_rxqcr);
/* clear then enable interrupts */
-
-#define STD_IRQ (IRQ_LCI | /* Link Change */ \
- IRQ_TXI | /* TX done */ \
- IRQ_RXI | /* RX done */ \
- IRQ_SPIBEI | /* SPI bus error */ \
- IRQ_TXPSI | /* TX process stop */ \
- IRQ_RXPSI) /* RX process stop */
-
- ks->rc_ier = STD_IRQ;
- ks8851_wrreg16(ks, KS_ISR, STD_IRQ);
- ks8851_wrreg16(ks, KS_IER, STD_IRQ);
+ ks8851_wrreg16(ks, KS_ISR, ks->rc_ier);
+ ks8851_wrreg16(ks, KS_IER, ks->rc_ier);
netif_start_queue(ks->netdev);
@@ -1599,6 +1590,15 @@ static int ks8851_probe(struct spi_device *spi)
spi->bits_per_word = 8;
ks = netdev_priv(netdev);
+
+#define STD_IRQ (IRQ_LCI | /* Link Change */ \
+ IRQ_TXI | /* TX done */ \
+ IRQ_RXI | /* RX done */ \
+ IRQ_SPIBEI | /* SPI bus error */ \
+ IRQ_TXPSI | /* TX process stop */ \
+ IRQ_RXPSI) /* RX process stop */
+ ks->rc_ier = STD_IRQ;
+
kss = to_ks8851_spi(ks);
kss->spidev = spi;
--
2.25.1
next prev parent reply other threads:[~2020-05-17 0:34 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-17 0:33 [PATCH V6 00/20] net: ks8851: Unify KS8851 SPI and MLL drivers Marek Vasut
2020-05-17 0:33 ` [PATCH V6 01/20] net: ks8851: Factor out spi->dev in probe()/remove() Marek Vasut
2020-05-17 0:33 ` [PATCH V6 02/20] net: ks8851: Rename ndev to netdev in probe Marek Vasut
2020-05-17 0:33 ` [PATCH V6 03/20] net: ks8851: Replace dev_err() with netdev_err() in IRQ handler Marek Vasut
2020-05-17 0:33 ` [PATCH V6 04/20] net: ks8851: Pass device node into ks8851_init_mac() Marek Vasut
2020-05-17 0:33 ` [PATCH V6 05/20] net: ks8851: Use devm_alloc_etherdev() Marek Vasut
2020-05-17 0:33 ` [PATCH V6 06/20] net: ks8851: Use dev_{get,set}_drvdata() Marek Vasut
2020-05-17 0:33 ` [PATCH V6 07/20] net: ks8851: Remove ks8851_rdreg32() Marek Vasut
2020-05-17 0:33 ` [PATCH V6 08/20] net: ks8851: Use 16-bit writes to program MAC address Marek Vasut
2020-05-17 0:33 ` [PATCH V6 09/20] net: ks8851: Use 16-bit read of RXFC register Marek Vasut
2020-05-17 19:44 ` Andrew Lunn
2020-05-17 20:02 ` Marek Vasut
2020-05-17 0:33 ` [PATCH V6 10/20] net: ks8851: Factor out bus lock handling Marek Vasut
2020-05-17 0:33 ` [PATCH V6 11/20] net: ks8851: Factor out SKB receive function Marek Vasut
2020-05-17 0:33 ` [PATCH V6 12/20] net: ks8851: Split out SPI specific entries in struct ks8851_net Marek Vasut
2020-05-17 0:33 ` [PATCH V6 13/20] net: ks8851: Split out SPI specific code from probe() and remove() Marek Vasut
2020-05-17 0:33 ` [PATCH V6 14/20] net: ks8851: Factor out TX work flush function Marek Vasut
2020-05-17 0:33 ` Marek Vasut [this message]
2020-05-17 0:33 ` [PATCH V6 16/20] net: ks8851: Implement register, FIFO, lock accessor callbacks Marek Vasut
2020-05-18 16:34 ` Jakub Kicinski
2020-05-18 17:06 ` Marek Vasut
2020-05-18 17:29 ` Jakub Kicinski
2020-05-17 0:33 ` [PATCH V6 17/20] net: ks8851: Separate SPI operations into separate file Marek Vasut
2020-05-17 0:33 ` [PATCH V6 18/20] net: ks8851: Implement Parallel bus operations Marek Vasut
2020-05-18 16:33 ` Jakub Kicinski
2020-05-17 0:33 ` [PATCH V6 19/20] net: ks8851: Remove ks8851_mll.c Marek Vasut
2020-05-17 0:33 ` [PATCH V6 20/20] net: ks8851: Drop define debug and pr_fmt() Marek Vasut
2020-05-17 2:01 ` Joe Perches
2020-05-17 2:28 ` Marek Vasut
2020-05-17 2:37 ` Joe Perches
2020-05-17 2:47 ` Marek Vasut
2020-05-17 2:55 ` Joe Perches
2020-05-18 17:07 ` Marek Vasut
2020-05-17 2:02 ` [PATCH V6 00/20] net: ks8851: Unify KS8851 SPI and MLL drivers David Miller
2020-05-17 2:27 ` Marek Vasut
2020-05-17 19:26 ` Andrew Lunn
2020-05-17 20:08 ` Marek Vasut
2020-05-17 7:13 ` Lukas Wunner
2020-05-17 12:36 ` Marek Vasut
2020-05-17 19:16 ` Andrew Lunn
2020-05-17 19:30 ` David Miller
2020-05-21 13:11 ` Marek Vasut
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200517003354.233373-16-marex@denx.de \
--to=marex@denx.de \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=lukas@wunner.de \
--cc=netdev@vger.kernel.org \
--cc=ynezz@true.cz \
--cc=yuehaibing@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).